label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | block_crypto_open_opts_init(QCryptoBlockFormat format, QemuOpts *opts, Error **errp) { Visitor *v; QCryptoBlockOpenOptions *ret = NULL; Error *local_err = NULL; ret = g_new0(QCryptoBlockOpenOptions, 1); ret->format = format; v = opts_visitor_new(opts); visit_start_struct(v, NULL, NULL, 0, &local_err); if (local_err) { ... | 14,810 |
0 | gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb, bool search_pc) { CPUState *cs = CPU(cpu); CPUCRISState *env = &cpu->env; uint32_t pc_start; unsigned int insn_len; int j, lj; struct DisasContext ctx; struct DisasContext *dc = &ctx; uint32_t next_page_start; target_ulong npc; int num_insns; int max_in... | 14,811 |
0 | uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) { int64_t v; v = int64_to_float64(INT64_MIN STATUS_VAR); v = float64_to_int64_round_to_zero((a + v) STATUS_VAR); return v - INT64_MIN; } | 14,812 |
1 | static AHCIQState *ahci_boot(void) { AHCIQState *s; const char *cli; s = g_malloc0(sizeof(AHCIQState)); cli = "-drive if=none,id=drive0,file=%s,cache=writeback,serial=%s" ",format=raw" " -M q35 " "-device ide-hd,drive=drive0 " "-global ide-hd.ver=%s"; s->parent = qtest_pc_boot(cli, tmp_path, "testdisk", "version"); /* ... | 14,815 |
1 | static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx) { HEVCParserContext *ctx = s->priv_data; HEVCContext *h = &ctx->h; GetBitContext *gb; SliceHeader *sh = &h->sh; HEVCParamSets *ps = &h->ps; HEVCPacket *pkt = &ctx->pkt; const uint8_t *buf_end = buf + buf_... | 14,817 |
1 | static void decode_colskip(uint8_t* plane, int width, int height, int stride, VC9Context *v){ int x, y; GetBitContext *gb = &v->s.gb; for (x=0; x<width; x++){ if (!get_bits(gb, 1)) //colskip for (y=0; y<height; y++) plane[y*stride] = 0; else for (y=0; y<height; y++) plane[y*stride] = get_bits(gb, 1); plane ++; } } | 14,820 |
1 | gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb, int search_pc) { DisasContext ctx; target_ulong pc_start; uint16_t *gen_opc_end; int j, lj = -1; if (search_pc && loglevel) fprintf (logfile, "search pc %d\n", search_pc); pc_start = tb->pc; gen_opc_end = gen_opc_buf + OPC_MAX_SIZE; ctx.pc = pc_start;... | 14,821 |
1 | e1000_autoneg_timer(void *opaque) { E1000State *s = opaque; qemu_get_queue(s->nic)->link_down = false; e1000_link_up(s); s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE; DBGOUT(PHY, "Auto negotiation is completed\n"); } | 14,824 |
1 | blkdebug_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BDRVBlkdebugState *s = bs->opaque; BlkdebugRule *rule = NULL; QSIMPLEQ_FOREACH(rule, &s->active_rules, active_next) { uint64_t inject_offset = rule->options.inject.offset; if (inject_offset == -1 || (inject_offse... | 14,825 |
1 | static void vc1_h_overlap_c(uint8_t* src, int stride) { int i; int a, b, c, d; int d1, d2; int rnd = 1; for(i = 0; i < 8; i++) { a = src[-2]; b = src[-1]; c = src[0]; d = src[1]; d1 = (a - d + 3 + rnd) >> 3; d2 = (a - d + b - c + 4 - rnd) >> 3; src[-2] = a - d1; src[-1] = b - d2; src[0] = c + d2; src[1] = d + d1; src +... | 14,826 |
1 | int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block, int n, int coded, const uint8_t *scan_table) { int level, i, last, run, run_diff; int av_uninit(dc_pred_dir); RLTable *rl; RL_VLC_ELEM *rl_vlc; int qmul, qadd; if (s->mb_intra) { qmul=1; qadd=0; /* DC coef */ level = msmpeg4_decode_dc(s, n, &dc_pred_dir);... | 14,827 |
1 | static int svq1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; SVQ1Context *s = avctx->priv_data; AVFrame *cur = data; uint8_t *current; int result, i, x, y, width, height; svq1_pmv *pmv; /* initialize bit buffer */ init_g... | 14,828 |
0 | static void pci_get_node_name(char *nodename, int len, PCIDevice *dev) { int slot = PCI_SLOT(dev->devfn); int func = PCI_FUNC(dev->devfn); uint32_t ccode = pci_default_read_config(dev, PCI_CLASS_PROG, 3); const char *name; name = pci_find_device_name((ccode >> 16) & 0xff, (ccode >> 8) & 0xff, ccode & 0xff); if (func !=... | 14,830 |
0 | void kqemu_flush_page(CPUState *env, target_ulong addr) { LOG_INT("kqemu_flush_page: addr=" TARGET_FMT_lx "\n", addr); if (nb_pages_to_flush >= KQEMU_MAX_PAGES_TO_FLUSH) nb_pages_to_flush = KQEMU_FLUSH_ALL; else pages_to_flush[nb_pages_to_flush++] = addr; } | 14,831 |
0 | void helper_lcall_real_T0_T1(int shift, int next_eip) { int new_cs, new_eip; uint32_t esp, esp_mask; uint8_t *ssp; new_cs = T0; new_eip = T1; esp = env->regs[R_ESP]; esp_mask = 0xffffffff; if (!(env->segs[R_SS].flags & DESC_B_MASK)) esp_mask = 0xffff; ssp = env->segs[R_SS].base; if (shift) { esp -= 4; stl(ssp + (esp & ... | 14,832 |
0 | static void handle_port_owner_write(EHCIState *s, int port, uint32_t owner) { USBDevice *dev = s->ports[port].dev; uint32_t *portsc = &s->portsc[port]; uint32_t orig; if (s->companion_ports[port] == NULL) return; owner = owner & PORTSC_POWNER; orig = *portsc & PORTSC_POWNER; if (!(owner ^ orig)) { return; } if (dev) { ... | 14,833 |
0 | static void test_visitor_out_native_list_str(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_STRING); } | 14,834 |
0 | PCIBus *i440fx_init(const char *host_type, const char *pci_type, PCII440FXState **pi440fx_state, int *piix3_devfn, ISABus **isa_bus, qemu_irq *pic, MemoryRegion *address_space_mem, MemoryRegion *address_space_io, ram_addr_t ram_size, ram_addr_t below_4g_mem_size, ram_addr_t above_4g_mem_size, MemoryRegion *pci_address_... | 14,835 |
0 | void qio_channel_socket_connect_async(QIOChannelSocket *ioc, SocketAddressLegacy *addr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy) { QIOTask *task = qio_task_new( OBJECT(ioc), callback, opaque, destroy); SocketAddressLegacy *addrCopy; addrCopy = QAPI_CLONE(SocketAddressLegacy, addr); /* socket_conne... | 14,836 |
0 | static av_cold int targa_encode_close(AVCodecContext *avctx) { av_frame_free(&avctx->coded_frame); return 0; } | 14,837 |
0 | static int vnc_set_x509_credential_dir(VncDisplay *vs, const char *certdir) { if (vnc_set_x509_credential(vs, certdir, X509_CA_CERT_FILE, &vs->x509cacert, 0) < 0) goto cleanup; if (vnc_set_x509_credential(vs, certdir, X509_CA_CRL_FILE, &vs->x509cacrl, 1) < 0) goto cleanup; if (vnc_set_x509_credential(vs, certdir, X509_... | 14,838 |
0 | static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i) { return shared_page->vcpu_iodata[i].vp_eport; } | 14,839 |
0 | int bdrv_flush_all(void) { BlockDriverState *bs = NULL; int result = 0; while ((bs = bdrv_next(bs))) { AioContext *aio_context = bdrv_get_aio_context(bs); int ret; aio_context_acquire(aio_context); ret = bdrv_flush(bs); if (ret < 0 && !result) { result = ret; } aio_context_release(aio_context); } return result; } | 14,841 |
0 | static inline void gen_movcf_s (int fs, int fd, int cc, int tf) { uint32_t ccbit; int cond; TCGv r_tmp1 = tcg_temp_local_new(TCG_TYPE_I32); TCGv fp0 = tcg_temp_local_new(TCG_TYPE_I32); TCGv fp1 = tcg_temp_local_new(TCG_TYPE_I32); int l1 = gen_new_label(); if (cc) ccbit = 1 << (24 + cc); else ccbit = 1 << 23; if (tf) co... | 14,843 |
0 | static void notdirty_mem_writel(void *opaque, target_phys_addr_t ram_addr, uint32_t val) { int dirty_flags; dirty_flags = phys_ram_dirty[ram_addr >> TARGET_PAGE_BITS]; if (!(dirty_flags & CODE_DIRTY_FLAG)) { #if !defined(CONFIG_USER_ONLY) tb_invalidate_phys_page_fast(ram_addr, 4); dirty_flags = phys_ram_dirty[ram_addr ... | 14,844 |
0 | static void qcow2_invalidate_cache(BlockDriverState *bs, Error **errp) { BDRVQcow2State *s = bs->opaque; int flags = s->flags; QCryptoCipher *cipher = NULL; QDict *options; Error *local_err = NULL; int ret; /* * Backing files are read-only which makes all of their metadata immutable, * that means we don't have to worry... | 14,845 |
0 | static inline void gen_evmwumiaa(DisasContext *ctx) { TCGv_i64 acc; TCGv_i64 tmp; if (unlikely(!ctx->spe_enabled)) { gen_exception(ctx, POWERPC_EXCP_APU); return; } gen_evmwumi(ctx); /* rD := rA * rB */ acc = tcg_temp_new_i64(); tmp = tcg_temp_new_i64(); /* tmp := rD */ gen_load_gpr64(tmp, rD(ctx->opcode)); /* Load acc... | 14,847 |
0 | void qemu_system_reset(void) { QEMUResetEntry *re, *nre; /* reset all devices */ TAILQ_FOREACH_SAFE(re, &reset_handlers, entry, nre) { re->func(re->opaque); } } | 14,849 |
0 | static int cpu_can_run(CPUState *env) { if (env->stop) return 0; if (env->stopped) return 0; if (!vm_running) return 0; return 1; } | 14,851 |
0 | static void cpu_common_parse_features(const char *typename, char *features, Error **errp) { char *featurestr; /* Single "key=value" string being parsed */ char *val; static bool cpu_globals_initialized; /* TODO: all callers of ->parse_features() need to be changed to * call it only once, so we can remove this check (or... | 14,852 |
0 | static void ich9_lpc_update_apic(ICH9LPCState *lpc, int gsi) { int level = 0; assert(gsi >= ICH9_LPC_PIC_NUM_PINS); level |= pci_bus_get_irq_level(lpc->d.bus, ich9_gsi_to_pirq(gsi)); if (gsi == lpc->sci_gsi) { level |= lpc->sci_level; } qemu_set_irq(lpc->gsi[gsi], level); } | 14,853 |
0 | static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); uint64_t nb_sectors; uint8_t *outbuf; int buflen; switch (req->cmd.buf[0]) { case INQUIRY: case MODE_SENSE: case MODE_SENSE_10: case ... | 14,855 |
0 | static void qmp_input_start_list(Visitor *v, const char *name, GenericList **list, size_t size, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); QObject *qobj = qmp_input_get_object(qiv, name, true, errp); const QListEntry *entry; if (!qobj) { return; } if (qobject_type(qobj) != QTYPE_QLIST) { if (list) { *list = NULL... | 14,856 |
0 | static int pci_e1000_init(PCIDevice *pci_dev) { E1000State *d = DO_UPCAST(E1000State, dev, pci_dev); uint8_t *pci_conf; uint16_t checksum = 0; int i; uint8_t *macaddr; pci_conf = d->dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, E1000_DEVID); *(uint16_t *)(pci_co... | 14,857 |
0 | void qemu_clock_notify(QEMUClockType type) { QEMUTimerList *timer_list; QEMUClock *clock = qemu_clock_ptr(type); QLIST_FOREACH(timer_list, &clock->timerlists, list) { timerlist_notify(timer_list); } } | 14,858 |
0 | static void backward_filter(RA288Context *ractx) { float temp1[37]; // RTMP in the spec float temp2[11]; // GPTPMP in the spec do_hybrid_window(36, 40, 35, ractx->sp_block, temp1, ractx->sp_hist, ractx->sp_rec, syn_window); if (!eval_lpc_coeffs(temp1, ractx->sp_lpc, 36)) colmult(ractx->sp_lpc, ractx->sp_lpc, syn_bw_tab... | 14,859 |
0 | int target_mprotect(abi_ulong start, abi_ulong len, int prot) { abi_ulong end, host_start, host_end, addr; int prot1, ret; #ifdef DEBUG_MMAP printf("mprotect: start=0x" TARGET_FMT_lx "len=0x" TARGET_FMT_lx " prot=%c%c%c\n", start, len, prot & PROT_READ ? 'r' : '-', prot & PROT_WRITE ? 'w' : '-', prot & PROT_EXEC ? 'x' ... | 14,860 |
0 | static int local_open(FsContext *ctx, V9fsPath *fs_path, int flags, V9fsFidOpenState *fs) { char buffer[PATH_MAX]; char *path = fs_path->data; fs->fd = open(rpath(ctx, path, buffer), flags | O_NOFOLLOW); return fs->fd; } | 14,861 |
0 | void qmp_block_commit(const char *device, bool has_base, const char *base, bool has_top, const char *top, bool has_backing_file, const char *backing_file, bool has_speed, int64_t speed, Error **errp) { BlockDriverState *bs; BlockDriverState *base_bs, *top_bs; Error *local_err = NULL; /* This will be part of the QMP com... | 14,862 |
0 | void do_commit(Monitor *mon, const QDict *qdict) { const char *device = qdict_get_str(qdict, "device"); BlockDriverState *bs; if (!strcmp(device, "all")) { bdrv_commit_all(); } else { bs = bdrv_find(device); if (!bs) { qerror_report(QERR_DEVICE_NOT_FOUND, device); return; } bdrv_commit(bs); } } | 14,863 |
0 | static QmpOutputVisitor *to_qov(Visitor *v) { return container_of(v, QmpOutputVisitor, visitor); } | 14,864 |
0 | static void vc1_inv_trans_8x8_c(DCTELEM block[64]) { int i; register int t1,t2,t3,t4,t5,t6,t7,t8; DCTELEM *src, *dst, temp[64]; src = block; dst = temp; for(i = 0; i < 8; i++){ t1 = 12 * (src[ 0] + src[32]) + 4; t2 = 12 * (src[ 0] - src[32]) + 4; t3 = 16 * src[16] + 6 * src[48]; t4 = 6 * src[16] - 16 * src[48]; t5 = t1... | 14,866 |
0 | static void avc_loopfilter_luma_intra_edge_ver_msa(uint8_t *data, uint8_t alpha_in, uint8_t beta_in, uint32_t img_width) { uint8_t *src; v16u8 alpha, beta, p0_asub_q0; v16u8 is_less_than_alpha, is_less_than; v16u8 is_less_than_beta, negate_is_less_than_beta; v8i16 p2_r = { 0 }; v8i16 p1_r = { 0 }; v8i16 p0_r = { 0 }; v... | 14,867 |
0 | static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt) { struct dshow_ctx *ctx = s->priv_data; AVPacketList *pktl = NULL; while (!pktl) { WaitForSingleObject(ctx->mutex, INFINITE); pktl = ctx->pktl; if (pktl) { *pkt = pktl->pkt; ctx->pktl = ctx->pktl->next; av_free(pktl); ctx->curbufsize -= pkt->size; } ResetE... | 14,868 |
0 | static void blend_image(AVFilterContext *ctx, AVFilterBufferRef *dst, AVFilterBufferRef *src, int x, int y) { OverlayContext *over = ctx->priv; int i, j, k; int width = src->video->w; int height = src->video->h; if (over->main_is_packed_rgb) { uint8_t *dp = dst->data[0] + x * over->main_pix_step[0] + y * dst->linesize[... | 14,869 |
0 | static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize, int64_t pts) { MBContext *mb = ctx->priv; int x,y,i, in_cidx=0, next_cidx=0, tmp_cidx; double scale= mb->start_scale*pow(mb->end_scale/mb->start_scale, pts/mb->end_pts); int use_zyklus=0; fill_from_cache(ctx, NULL, &in_cidx, NULL, mb->star... | 14,871 |
0 | static void opt_mb_qmax(const char *arg) { video_mb_qmax = atoi(arg); if (video_mb_qmax < 0 || video_mb_qmax > 31) { fprintf(stderr, "qmax must be >= 1 and <= 31\n"); exit(1); } } | 14,873 |
0 | static void create_vorbis_context(venc_context_t * venc, AVCodecContext * avccontext) { codebook_t * cb; floor_t * fc; residue_t * rc; mapping_t * mc; int i, book; venc->channels = avccontext->channels; venc->sample_rate = avccontext->sample_rate; venc->blocksize[0] = venc->blocksize[1] = 11; venc->ncodebooks = 29; ven... | 14,874 |
0 | static RawAIOCB *raw_aio_setup(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque) { BDRVRawState *s = bs->opaque; RawAIOCB *acb; if (fd_open(bs) < 0) return NULL; acb = qemu_aio_get(bs, cb, opaque); if (!acb) return NULL; acb->fd = raw_fd_pool_get(s); ac... | 14,875 |
0 | static uint32_t tpm_tis_data_read(TPMState *s, uint8_t locty) { TPMTISEmuState *tis = &s->s.tis; uint32_t ret = TPM_TIS_NO_DATA_BYTE; uint16_t len; if ((tis->loc[locty].sts & TPM_TIS_STS_DATA_AVAILABLE)) { len = tpm_tis_get_size_from_buffer(&tis->loc[locty].r_buffer); ret = tis->loc[locty].r_buffer.buffer[tis->loc[loct... | 14,876 |
0 | cpu_x86_dump_seg_cache(CPUState *env, FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), const char *name, struct SegmentCache *sc) { #ifdef TARGET_X86_64 if (env->hflags & HF_CS64_MASK) { cpu_fprintf(f, "%-3s=%04x %016" PRIx64 " %08x %08x", name, sc->selector, sc->base, sc->limit, sc->flags); } else #endif { ... | 14,877 |
0 | static int qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf, const char *filename) { SocketAddress *gsconf; URI *uri; QueryParams *qp = NULL; bool is_unix = false; int ret = 0; uri = uri_parse(filename); if (!uri) { return -EINVAL; } gconf->server = g_new0(SocketAddressList, 1); gconf->server->value = gsconf = g_ne... | 14,878 |
0 | static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, HANDLE hfile, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque, int type) { RawWin32AIOData *acb = g_slice_new(RawWin32AIOData); acb->bs = bs; acb->hfile = hfile; acb->aio_type = type; if (qiov) { acb->aio_iov ... | 14,879 |
0 | static void special_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { qemu_log("pci: special write cycle"); } | 14,880 |
0 | MemoryRegionSection *phys_page_find(AddressSpaceDispatch *d, hwaddr index) { PhysPageEntry lp = d->phys_map; PhysPageEntry *p; int i; for (i = P_L2_LEVELS - 1; i >= 0 && !lp.is_leaf; i--) { if (lp.ptr == PHYS_MAP_NODE_NIL) { return &phys_sections[phys_section_unassigned]; } p = phys_map_nodes[lp.ptr]; lp = p[(index >> ... | 14,881 |
0 | static inline int qemu_gluster_zerofill(struct glfs_fd *fd, int64_t offset, int64_t size) { return glfs_zerofill(fd, offset, size); } | 14,882 |
0 | static void write_cont (void *opaque, uint32_t nport, uint32_t data) { struct dma_cont *d = opaque; int iport, ichan; iport = (nport >> d->dshift) & 0x0f; switch (iport) { case 8: /* command */ if (data && (data | CMD_NOT_SUPPORTED)) { log ("command %#x not supported\n", data); goto error; } d->command = data; break; c... | 14,883 |
0 | static void test_visitor_in_fail_list(TestInputVisitorData *data, const void *unused) { int64_t i64 = -1; Visitor *v; /* Unvisited list tail */ v = visitor_input_test_init(data, "[ 1, 2, 3 ]"); visit_start_list(v, NULL, NULL, 0, &error_abort); visit_type_int(v, NULL, &i64, &error_abort); g_assert_cmpint(i64, ==, 1); vi... | 14,885 |
0 | void qemu_console_copy(QEMUConsole *console, int src_x, int src_y, int dst_x, int dst_y, int w, int h) { if (active_console == console) { if (console->ds->dpy_copy) console->ds->dpy_copy(console->ds, src_x, src_y, dst_x, dst_y, w, h); else { /* TODO */ console->ds->dpy_update(console->ds, dst_x, dst_y, w, h); } } } | 14,886 |
0 | static inline void tcg_out_ldst(TCGContext *s, int ret, int addr, int offset, int op) { if (offset == (offset & 0xfff)) tcg_out32(s, op | INSN_RD(ret) | INSN_RS1(addr) | INSN_IMM13(offset)); else fprintf(stderr, "unimplemented %s with offset %d\n", __func__, offset); } | 14,888 |
0 | static int i440fx_initfn(PCIDevice *dev) { PCII440FXState *d = DO_UPCAST(PCII440FXState, dev, dev); pci_config_set_vendor_id(d->dev.config, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(d->dev.config, PCI_DEVICE_ID_INTEL_82441); d->dev.config[0x08] = 0x02; // revision pci_config_set_class(d->dev.config, PCI_CLASS_BRID... | 14,889 |
0 | void cpu_register_physical_memory_log(MemoryRegionSection *section, bool readonly) { MemoryRegionSection now = *section, remain = *section; if ((now.offset_within_address_space & ~TARGET_PAGE_MASK) || (now.size < TARGET_PAGE_SIZE)) { now.size = MIN(TARGET_PAGE_ALIGN(now.offset_within_address_space) - now.offset_within_... | 14,891 |
0 | static void virtio_blk_handle_flush(BlockRequest *blkreq, int *num_writes, VirtIOBlockReq *req) { BlockDriverAIOCB *acb; /* * Make sure all outstanding writes are posted to the backing device. */ if (*num_writes > 0) { do_multiwrite(req->dev->bs, blkreq, *num_writes); } *num_writes = 0; acb = bdrv_aio_flush(req->dev->b... | 14,892 |
0 | static void gd_update_cursor(VirtualConsole *vc) { GtkDisplayState *s = vc->s; GdkWindow *window; if (vc->type != GD_VC_GFX) { return; } window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area)); if (s->full_screen || qemu_input_is_absolute() || gd_is_grab_active(s)) { gdk_window_set_cursor(window, s->null_curso... | 14,893 |
0 | static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) { bool page_aligned = false; unsigned int n, begin; const uint16_t block_size = s->blksize & 0x0fff; uint32_t boundary_chk = 1 << (((s->blksize & 0xf000) >> 12) + 12); uint32_t boundary_count = boundary_chk - (s->sdmasysad % boundary_chk); /* XXX: Some sd/mmc ... | 14,894 |
0 | static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MLPDecodeContext *m = avctx->priv_data; GetBitContext gb; unsigned int length, substr; unsigned int substream_start; unsigned int header_size = 4; unsigned int ... | 14,895 |
0 | static int coroutine_fn blkreplay_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { uint64_t reqid = request_id++; int ret = bdrv_co_preadv(bs->file->bs, offset, bytes, qiov, flags); block_request_create(reqid, bs, qemu_coroutine_self()); qemu_coroutine_yield(); return re... | 14,896 |
0 | void s390x_tod_timer(void *opaque) { S390CPU *cpu = opaque; CPUS390XState *env = &cpu->env; env->pending_int |= INTERRUPT_TOD; cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD); } | 14,897 |
0 | static uint8_t qpci_spapr_io_readb(QPCIBus *bus, void *addr) { QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus); uint64_t port = (uintptr_t)addr; uint8_t v; if (port < s->pio.size) { v = readb(s->pio_cpu_base + port); } else { v = readb(s->mmio_cpu_base + port); } return v; } | 14,898 |
0 | static void bench_cb(void *opaque, int ret) { BenchData *b = opaque; BlockAIOCB *acb; if (ret < 0) { error_report("Failed request: %s\n", strerror(-ret)); exit(EXIT_FAILURE); } if (b->in_flush) { /* Just finished a flush with drained queue: Start next requests */ assert(b->in_flight == 0); b->in_flush = false; } else i... | 14,899 |
0 | static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, int64_t offset, int64_t length, uint64_t addend, bool decrease, enum qcow2_discard_type type) { BDRVQcowState *s = bs->opaque; int64_t start, last, cluster_offset; void *refcount_block = NULL; int64_t old_table_index = -1; int ret; #ifdef DEBUG_AL... | 14,900 |
0 | static void virtio_scsi_clear_aio(VirtIOSCSI *s) { VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); int i; if (s->ctrl_vring) { aio_set_event_notifier(s->ctx, &s->ctrl_vring->host_notifier, false, NULL); } if (s->event_vring) { aio_set_event_notifier(s->ctx, &s->event_vring->host_notifier, false, NULL); } if (s->cmd_vring... | 14,901 |
0 | create_iovec(BlockBackend *blk, QEMUIOVector *qiov, char **argv, int nr_iov, int pattern) { size_t *sizes = g_new0(size_t, nr_iov); size_t count = 0; void *buf = NULL; void *p; int i; for (i = 0; i < nr_iov; i++) { char *arg = argv[i]; int64_t len; len = cvtnum(arg); if (len < 0) { print_cvtnum_err(len, arg); goto fail... | 14,903 |
0 | static void pflash_update(pflash_t *pfl, int offset, int size) { int offset_end; if (pfl->bs) { offset_end = offset + size; /* round to sectors */ offset = offset >> 9; offset_end = (offset_end + 511) >> 9; bdrv_write(pfl->bs, offset, pfl->storage + (offset << 9), offset_end - offset); } } | 14,905 |
0 | static int piix4_initfn(PCIDevice *d) { uint8_t *pci_conf; isa_bus_new(&d->qdev); register_savevm("PIIX4", 0, 2, piix_save, piix_load, d); pci_conf = d->config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_0); // 82371AB/EB/MB PIIX4 PCI-to-ISA b... | 14,906 |
0 | void nbd_client_session_detach_aio_context(NbdClientSession *client) { aio_set_fd_handler(bdrv_get_aio_context(client->bs), client->sock, NULL, NULL, NULL); } | 14,907 |
0 | static void fd_put_notify(void *opaque) { QEMUFileFD *s = opaque; /* Remove writable callback and do a put notify */ qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); qemu_file_put_notify(s->file); } | 14,908 |
0 | int qemu_savevm_state_iterate(Monitor *mon, QEMUFile *f) { SaveStateEntry *se; int ret = 1; QTAILQ_FOREACH(se, &savevm_handlers, entry) { if (se->save_live_state == NULL) continue; /* Section type */ qemu_put_byte(f, QEMU_VM_SECTION_PART); qemu_put_be32(f, se->section_id); ret = se->save_live_state(mon, f, QEMU_VM_SECT... | 14,909 |
0 | int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, int n_start, int n_end, int *num, uint64_t *host_offset, QCowL2Meta **m) { BDRVQcowState *s = bs->opaque; uint64_t start, remaining; uint64_t cluster_offset; uint64_t cur_bytes; int ret; trace_qcow2_alloc_clusters_offset(qemu_coroutine_self(), offset... | 14,910 |
0 | QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, const GraphicHwOps *hw_ops, void *opaque) { int width = 640; int height = 480; QemuConsole *s; DisplayState *ds; ds = get_alloc_displaystate(); trace_console_gfx_new(); s = new_console(ds, GRAPHIC_CONSOLE, head); s->hw_ops = hw_ops; s->hw = opaque; if (... | 14,912 |
0 | static inline void stw_phys_internal(target_phys_addr_t addr, uint32_t val, enum device_endian endian) { uint8_t *ptr; MemoryRegionSection *section; section = phys_page_find(addr >> TARGET_PAGE_BITS); if (!memory_region_is_ram(section->mr) || section->readonly) { addr = memory_region_section_addr(section, addr); if (me... | 14,914 |
0 | bool virtio_disk_is_eckd(void) { if (guessed_disk_nature) { return (blk_cfg.blk_size == 4096); } return (blk_cfg.geometry.heads == 15) && (blk_cfg.geometry.sectors == 12) && (blk_cfg.blk_size == 4096); } | 14,915 |
0 | static int nbd_send_option_request(QIOChannel *ioc, uint32_t opt, uint32_t len, const char *data, Error **errp) { nbd_option req; QEMU_BUILD_BUG_ON(sizeof(req) != 16); if (len == -1) { req.length = len = strlen(data); } TRACE("Sending option request %" PRIu32", len %" PRIu32, opt, len); stq_be_p(&req.magic, NBD_OPTS_MA... | 14,916 |
0 | static void rtas_ibm_write_pci_config(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { uint32_t val, size, addr; uint64_t buid = ((uint64_t)rtas_ld(args, 1) << 32) | rtas_ld(args, 2); PCIDevice *dev = find_dev(spapr, buid, rtas_ld(args, 0)); if (!dev) { rta... | 14,917 |
0 | static void *show_parts(void *arg) { char *device = arg; int nbd; /* linux just needs an open() to trigger * the partition table update * but remember to load the module with max_part != 0 : * modprobe nbd max_part=63 */ nbd = open(device, O_RDWR); if (nbd != -1) { close(nbd); } return NULL; } | 14,919 |
0 | static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr, TCGArg *args, TCGOpDef *tcg_op_defs) { int i, nb_ops, op_index, nb_temps, nb_globals, nb_call_args; TCGOpcode op; const TCGOpDef *def; TCGArg *gen_args; TCGArg tmp; TCGCond cond; /* Array VALS has an element for each temp. If this temp holds a co... | 14,920 |
0 | static inline void tcg_out_sety(TCGContext *s, tcg_target_long val) { if (val == 0 || val == -1) tcg_out32(s, WRY | INSN_IMM13(val)); else fprintf(stderr, "unimplemented sety %ld\n", (long)val); } | 14,921 |
0 | static void test_hba_spec(void) { AHCIQState *ahci; ahci = ahci_boot(); ahci_pci_enable(ahci); ahci_test_hba_spec(ahci); ahci_shutdown(ahci); } | 14,922 |
0 | void pdu_free(V9fsPDU *pdu) { if (pdu) { V9fsState *s = pdu->s; /* * Cancelled pdu are added back to the freelist * by flush request . */ if (!pdu->cancelled) { QLIST_REMOVE(pdu, next); QLIST_INSERT_HEAD(&s->free_list, pdu, next); } } } | 14,923 |
0 | static av_noinline void emulated_edge_mc_mmxext(uint8_t *buf, const uint8_t *src, ptrdiff_t buf_stride, ptrdiff_t src_stride, int block_w, int block_h, int src_x, int src_y, int w, int h) { emulated_edge_mc(buf, src, buf_stride, src_stride, block_w, block_h, src_x, src_y, w, h, vfixtbl_mmx, &ff_emu_edge_vvar_mmx, hfixt... | 14,924 |
0 | static int token_is_operator(QObject *obj, char op) { const char *val; if (token_get_type(obj) != JSON_OPERATOR) { return 0; } val = token_get_value(obj); return (val[0] == op) && (val[1] == 0); } | 14,925 |
0 | static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target, const char *replaces, int64_t speed, int64_t granularity, int64_t buf_size, BlockdevOnError on_source_error, BlockdevOnError on_target_error, BlockCompletionFunc *cb, void *opaque, Error **errp, const BlockJobDriver *driver, bool is_none_mode,... | 14,926 |
0 | static void vnc_connect(VncDisplay *vd, QIOChannelSocket *sioc, bool skipauth, bool websocket) { VncState *vs = g_new0(VncState, 1); int i; vs->sioc = sioc; object_ref(OBJECT(vs->sioc)); vs->ioc = QIO_CHANNEL(sioc); object_ref(OBJECT(vs->ioc)); vs->vd = vd; buffer_init(&vs->input, "vnc-input/%p", sioc); buffer_init(&vs... | 14,927 |
0 | static inline void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, unsigned long start, unsigned long length) { unsigned long addr; if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) { addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend; if ((addr - start) < length) { tlb_entry->add... | 14,928 |
0 | static inline void gen_evmergehi(DisasContext *ctx) { if (unlikely(!ctx->spe_enabled)) { gen_exception(ctx, POWERPC_EXCP_APU); return; } #if defined(TARGET_PPC64) TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rB(ctx->opcode)], 32); tcg_gen_andi_tl(t1, cpu_gpr[rA(ctx->opcode)], 0xFFFFFF... | 14,929 |
0 | static void simple_dict(void) { int i; struct { const char *encoded; LiteralQObject decoded; } test_cases[] = { { .encoded = "{\"foo\": 42, \"bar\": \"hello world\"}", .decoded = QLIT_QDICT(((LiteralQDictEntry[]){ { "foo", QLIT_QINT(42) }, { "bar", QLIT_QSTR("hello world") }, { } })), }, { .encoded = "{}", .decoded = Q... | 14,930 |
0 | static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, int flags, FsCred *credp) { char *path; int fd = -1; int err = -1; int serrno = 0; V9fsString fullname; char buffer[PATH_MAX]; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name); path = fullname.data;... | 14,931 |
0 | static void do_savevm(int argc, const char **argv) { if (argc != 2) { help_cmd(argv[0]); return; } if (qemu_savevm(argv[1]) < 0) term_printf("I/O error when saving VM to '%s'\n", argv[1]); } | 14,932 |
0 | static void evaluate_flags_writeback(uint32_t flags) { int x; /* Extended arithmetics, leave the z flag alone. */ x = env->cc_x; if ((x || env->cc_op == CC_OP_ADDC) && flags & Z_FLAG) env->cc_mask &= ~Z_FLAG; /* all insn clear the x-flag except setf or clrf. */ env->pregs[PR_CCS] &= ~(env->cc_mask | X_FLAG); flags &= e... | 14,934 |
0 | static int epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, int P[5][2], int pred_x, int pred_y, int xmin, int ymin, int xmax, int ymax, uint8_t * ref_picture) { int best[2]={0, 0}; int d, dmin; UINT8 *new_pic, *old_pic; const int pic_stride= s->linesize; const int pic_xy= (s->mb_y*pic_stride + s->mb_x)... | 14,935 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.