label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | CPUPPCState *cpu_ppc_init(void){ CPUPPCState *env; cpu_exec_init(); env = qemu_mallocz(sizeof(CPUPPCState)); if (!env) return NULL;#if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE) setup_machine(env, 0);#else// env->spr[PVR] = 0; /* Basic PPC */ env->spr[PVR] = 0x00080100; /* G3 CPU */// env->spr[PVR] = 0x0... |
0 | static void vmxnet3_net_init(VMXNET3State *s){ DeviceState *d = DEVICE(s); VMW_CBPRN("vmxnet3_net_init called..."); qemu_macaddr_default_if_unset(&s->conf.macaddr); /* Windows guest will query the address that was set on init */ memcpy(&s->perm_mac.a, &s->conf.macaddr.a, sizeof(s->perm_mac.a)); s->mcast_list = NULL; s-... |
0 | static hwaddr ppc_hash32_htab_lookup(PowerPCCPU *cpu, target_ulong sr, target_ulong eaddr, ppc_hash_pte32_t *pte){ CPUPPCState *env = &cpu->env; hwaddr pteg_off, pte_offset; hwaddr hash; uint32_t vsid, pgidx, ptem; vsid = sr & SR32_VSID; pgidx = (eaddr & ~SEGMENT_MASK_256M) >> TARGET_PAGE_BITS; hash = vsid ^ pgidx; pte... |
1 | int av_expr_parse(AVExpr **expr, const char *s, const char * const *const_names, const char * const *func1_names, double (* const *funcs1)(void *, double), const char * const *func2_names, double (* const *funcs2)(void *, double, double), int log_offset, void *log_ctx){ Parser p = { 0 }; AVExpr *e = NULL; char *w = av_... |
1 | void spapr_create_phb(sPAPREnvironment *spapr, const char *busname, uint64_t buid, uint64_t mem_win_addr, uint64_t mem_win_size, uint64_t io_win_addr, uint64_t msi_win_addr){ DeviceState *dev; dev = qdev_create(NULL, TYPE_SPAPR_PCI_HOST_BRIDGE); if (busname) { qdev_prop_set_string(dev, "busname", g_strdup(busname)); } ... |
1 | static int expand_zero_clusters_in_l1(BlockDriverState *bs, uint64_t *l1_table, int l1_size, uint8_t **expanded_clusters, uint64_t *nb_clusters){ BDRVQcowState *s = bs->opaque; bool is_active_l1 = (l1_table == s->l1_table); uint64_t *l2_table = NULL; int ret; int i, j; if (!is_active_l1) { /* inactive L2 tables require... |
1 | static void virtio_scsi_bad_req(void){ error_report("wrong size for virtio-scsi headers"); exit(1);} |
1 | static int h261_decode_mb(H261Context *h, DCTELEM block[6][64]){ MpegEncContext * const s = &h->s; int i, cbp, xy, old_mtype; cbp = 63; // Read mba do{ h->mba_diff = get_vlc2(&s->gb, h261_mba_vlc.table, H261_MBA_VLC_BITS, 2)+1; } while( h->mba_diff == MAX_MBA + 1 ); // stuffing if ( h->mba_diff < 0 ) return -1; h->curr... |
1 | static void IRQ_check(OpenPICState *opp, IRQ_queue_t *q){ int next, i; int priority; next = -1; priority = -1; if (!q->pending) { /* IRQ bitmap is empty */ goto out; } for (i = 0; i < opp->max_irq; i++) { if (IRQ_testbit(q, i)) { DPRINTF("IRQ_check: irq %d set ipvp_pr=%d pr=%d\n", i, IPVP_PRIORITY(opp->src[i].ipvp), pr... |
1 | static void test_visitor_out_alternate(TestOutputVisitorData *data, const void *unused){ QObject *arg; UserDefAlternate *tmp; QDict *qdict; tmp = g_new0(UserDefAlternate, 1); tmp->type = QTYPE_QINT; tmp->u.i = 42; visit_type_UserDefAlternate(data->ov, NULL, &tmp, &error_abort); arg = qmp_output_get_qobject(data->qov); ... |
1 | static double get_volume(CompandContext *s, double in_lin){ CompandSegment *cs; double in_log, out_log; int i; if (in_lin < s->in_min_lin) return s->out_min_lin; in_log = log(in_lin); for (i = 1;; i++) if (in_log <= s->segments[i + 1].x) break; cs = &s->segments[i]; in_log -= cs->x; out_log = cs->y + in_log * (cs->a * ... |
1 | static void qemu_co_queue_next_bh(void *opaque){ struct unlock_bh *unlock_bh = opaque; Coroutine *next; trace_qemu_co_queue_next_bh(); while ((next = QTAILQ_FIRST(&unlock_bh_queue))) { QTAILQ_REMOVE(&unlock_bh_queue, next, co_queue_next); qemu_coroutine_enter(next, NULL); } qemu_bh_delete(unlock_bh->bh); qemu_free(unlo... |
1 | PPC_OP(addeo){ do_addeo(); RETURN();} |
1 | static void store_reg(DisasContext *s, int reg, TCGv var){ if (reg == 15) { tcg_gen_andi_i32(var, var, ~1); s->is_jmp = DISAS_JUMP; } tcg_gen_mov_i32(cpu_R[reg], var); dead_tmp(var);} |
1 | static int vnc_display_get_addresses(QemuOpts *opts, bool reverse, SocketAddress ***retsaddr, size_t *retnsaddr, SocketAddress ***retwsaddr, size_t *retnwsaddr, Error **errp){ SocketAddress *saddr = NULL; SocketAddress *wsaddr = NULL; QemuOptsIter addriter; const char *addr; int to = qemu_opt_get_number(opts, "to", 0);... |
1 | uint64_t HELPER(neon_abdl_u64)(uint32_t a, uint32_t b){ uint64_t result; DO_ABD(result, a, b, uint32_t); return result;} |
1 | static void virtio_net_handle_tx(VirtIODevice *vdev, VirtQueue *vq){ VirtIONet *n = to_virtio_net(vdev); if (n->tx_waiting) { virtio_queue_set_notification(vq, 1); qemu_del_timer(n->tx_timer); n->tx_waiting = 0; virtio_net_flush_tx(n, vq); } else { qemu_mod_timer(n->tx_timer, qemu_get_clock(vm_clock) + n->tx_timeout); ... |
1 | static void encode_picture(MpegEncContext *s, int picture_number){ int mb_x, mb_y, last_gob, pdif = 0; int i; int bits; MpegEncContext best_s, backup_s; UINT8 bit_buf[7][3000]; //FIXME check that this is ALLWAYS large enogh for a MB s->picture_number = picture_number; s->block_wrap[0]= s->block_wrap[1]= s->block_wrap[2... |
0 | static void store_word(DBDMA_channel *ch, int key, uint32_t addr, uint16_t len){ dbdma_cmd *current = &ch->current; uint32_t val; DBDMA_DPRINTF("store_word\n"); /* only implements KEY_SYSTEM */ if (key != KEY_SYSTEM) { printf("DBDMA: STORE_WORD, unimplemented key %x\n", key); kill_channel(ch); return; } val = current->... |
0 | static int decode_cabac_mb_ref( H264Context *h, int list, int n ) { int refa = h->ref_cache[list][scan8[n] - 1]; int refb = h->ref_cache[list][scan8[n] - 8]; int ref = 0; int ctx = 0; if( h->slice_type_nos == FF_B_TYPE) { if( refa > 0 && !h->direct_cache[scan8[n] - 1] ) ctx++; if( refb > 0 && !h->direct_cache[scan8[n] ... |
0 | static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel){ const char *rn = "invalid"; if (sel != 0) check_insn(ctx, ISA_MIPS32); if (use_icount) gen_io_start(); switch (reg) { case 0: switch (sel) { case 0: gen_helper_mtc0_index(cpu_env, arg); rn = "Index"; break; case 1: CP0_CHECK(ctx->insn_flags & ASE_MT);... |
0 | void module_call_init(module_init_type type){ ModuleTypeList *l; ModuleEntry *e; l = find_type(type); TAILQ_FOREACH(e, l, node) { e->init(); }} |
0 | static void qmp_output_free(Visitor *v){ QmpOutputVisitor *qov = to_qov(v); QStackEntry *e; while (!QSLIST_EMPTY(&qov->stack)) { e = QSLIST_FIRST(&qov->stack); QSLIST_REMOVE_HEAD(&qov->stack, node); g_free(e); } qobject_decref(qov->root); g_free(qov);} |
0 | static void cpu_x86_register(X86CPU *cpu, const char *name, Error **errp){ CPUX86State *env = &cpu->env; x86_def_t def1, *def = &def1; memset(def, 0, sizeof(*def)); if (cpu_x86_find_by_name(cpu, def, name) < 0) { error_setg(errp, "Unable to find CPU definition: %s", name); return; } object_property_set_str(OBJECT(cpu),... |
0 | static void gem_init(NICInfo *nd, uint32_t base, qemu_irq irq){ DeviceState *dev; SysBusDevice *s; qemu_check_nic_model(nd, "cadence_gem"); dev = qdev_create(NULL, "cadence_gem"); qdev_set_nic_properties(dev, nd); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev); sysbus_mmio_map(s, 0, base); sysbus_connect_irq(s, 0, irq)... |
0 | static void monitor_json_emitter(Monitor *mon, const QObject *data){ QString *json; json = qobject_to_json(data); assert(json != NULL); mon->mc->print_enabled = 1; monitor_printf(mon, "%s\n", qstring_get_str(json)); mon->mc->print_enabled = 0; QDECREF(json);} |
0 | void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge){ int i; X86CPU *cpu = NULL; Error *error = NULL; unsigned long apic_id_limit; /* init CPUs */ if (cpu_model == NULL) {#ifdef TARGET_X86_64 cpu_model = "qemu64";#else cpu_model = "qemu32";#endif } current_cpu_model = cpu_model; apic_id_limit = pc_apic_id_... |
0 | static void cpu_exit_tb_from_sighandler(CPUState *cpu, void *puc){#ifdef __linux__ struct ucontext *uc = puc;#elif defined(__OpenBSD__) struct sigcontext *uc = puc;#endif /* XXX: use siglongjmp ? */#ifdef __linux__#ifdef __ia64 sigprocmask(SIG_SETMASK, (sigset_t *)&uc->uc_sigmask, NULL);#else sigprocmask(SIG_SETMASK, &... |
0 | static int ioreq_runio_qemu_aio(struct ioreq *ioreq){ struct XenBlkDev *blkdev = ioreq->blkdev; if (ioreq->req.nr_segments && ioreq_map(ioreq) == -1) { goto err_no_map; } ioreq->aio_inflight++; if (ioreq->presync) { bdrv_aio_flush(ioreq->blkdev->bs, qemu_aio_complete, ioreq); return 0; } switch (ioreq->req.operation) {... |
0 | static int decode_subframe_lpc(ShortenContext *s, int command, int channel, int residual_size, int32_t coffset){ int pred_order, sum, qshift, init_sum, i, j; const int *coeffs; if (command == FN_QLPC) { /* read/validate prediction order */ pred_order = get_ur_golomb_shorten(&s->gb, LPCQSIZE); if (pred_order > s->nwrap)... |
0 | static int coroutine_fn blkreplay_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags){ uint64_t reqid = request_id++; int ret = bdrv_co_pwritev(bs->file->bs, offset, bytes, qiov, flags); block_request_create(reqid, bs, qemu_coroutine_self()); qemu_coroutine_yield(); return r... |
0 | static void hmp_handle_error(Monitor *mon, Error **errp){ if (error_is_set(errp)) { monitor_printf(mon, "%s\n", error_get_pretty(*errp)); error_free(*errp); }} |
0 | void mips_r4k_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model){ char *filename; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *bios; MemoryReg... |
0 | static int dmg_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVDMGState *s = bs->opaque; DmgHeaderState ds; uint64_t rsrc_fork_offset, rsrc_fork_length; uint64_t plist_xml_offset, plist_xml_length; int64_t offset; int ret; bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, false... |
0 | void bdrv_detach_aio_context(BlockDriverState *bs){ BdrvAioNotifier *baf; if (!bs->drv) { return; } QLIST_FOREACH(baf, &bs->aio_notifiers, list) { baf->detach_aio_context(baf->opaque); } if (bs->io_limits_enabled) { throttle_timers_detach_aio_context(&bs->throttle_timers); } if (bs->drv->bdrv_detach_aio_context) { bs->... |
0 | static int virtio_rng_load(QEMUFile *f, void *opaque, int version_id){ VirtIORNG *vrng = opaque; VirtIODevice *vdev = VIRTIO_DEVICE(vrng); if (version_id != 1) { return -EINVAL; } virtio_load(vdev, f, version_id); /* We may have an element ready but couldn't process it due to a quota * limit. Make sure to try again aft... |
0 | static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx){ ROQDPCMContext *context = avctx->priv_data; if (avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n"); return -1; } if (avctx->sample_rate != 22050) { av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n"); return -1; } if (... |
0 | static void kvm_mce_inj_srar_dataload(CPUState *env, target_phys_addr_t paddr){ struct kvm_x86_mce mce = { .bank = 9, .status = MCI_STATUS_VAL | MCI_STATUS_UC | MCI_STATUS_EN | MCI_STATUS_MISCV | MCI_STATUS_ADDRV | MCI_STATUS_S | MCI_STATUS_AR | 0x134, .mcg_status = MCG_STATUS_MCIP | MCG_STATUS_EIPV, .addr = paddr, .mi... |
0 | int qemu_global_option(const char *str){ char driver[64], property[64]; QemuOpts *opts; int rc, offset; rc = sscanf(str, "%63[^.].%63[^=]%n", driver, property, &offset); if (rc < 2 || str[offset] != '=') { error_report("can't parse: \"%s\"", str); return -1; } opts = qemu_opts_create(&qemu_global_opts, NULL, 0, &error_... |
0 | static void uhci_ioport_writew(void *opaque, uint32_t addr, uint32_t val){ UHCIState *s = opaque; addr &= 0x1f; DPRINTF("uhci: writew port=0x%04x val=0x%04x\n", addr, val); switch(addr) { case 0x00: if ((val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { /* start frame processing */ s->expire_time = qemu_get_clock_ns(vm_... |
0 | static void tlb_info_pae32(Monitor *mon, CPUState *env){ int l1, l2, l3; uint64_t pdpe, pde, pte; uint64_t pdp_addr, pd_addr, pt_addr; pdp_addr = env->cr[3] & ~0x1f; for (l1 = 0; l1 < 4; l1++) { cpu_physical_memory_read(pdp_addr + l1 * 8, &pdpe, 8); pdpe = le64_to_cpu(pdpe); if (pdpe & PG_PRESENT_MASK) { pd_addr = pdpe... |
0 | void *paio_init(void){ struct sigaction act; PosixAioState *s; int fds[2]; int ret; if (posix_aio_state) return posix_aio_state; s = qemu_malloc(sizeof(PosixAioState)); sigfillset(&act.sa_mask); act.sa_flags = 0; /* do not restart syscalls to interrupt select() */ act.sa_handler = aio_signal_handler; sigaction(SIGUSR2,... |
1 | static void close_slaves(AVFormatContext *avf){ TeeContext *tee = avf->priv_data; AVFormatContext *avf2; unsigned i, j; for (i = 0; i < tee->nb_slaves; i++) { avf2 = tee->slaves[i].avf; for (j = 0; j < avf2->nb_streams; j++) { AVBitStreamFilterContext *bsf_next, *bsf = tee->slaves[i].bsfs[j]; while (bsf) { bsf_next = b... |
1 | static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, int for_user){ int err = 0; if (dst != src) { dst->sub_id = src->sub_id; dst->time_base = src->time_base; dst->width = src->width; dst->height = src->height; dst->pix_fmt = src->pix_fmt; dst->coded_width = src->coded_width; dst->coded_heigh... |
1 | static int v4l2_set_parameters(AVFormatContext *s1){ struct video_data *s = s1->priv_data; struct v4l2_standard standard = { 0 }; struct v4l2_streamparm streamparm = { 0 }; struct v4l2_fract *tpf; AVRational framerate_q = { 0 }; int i, ret; if (s->framerate && (ret = av_parse_video_rate(&framerate_q, s->framerate)) < 0... |
1 | static target_long monitor_get_tbu (const struct MonitorDef *md, int val){ CPUState *env = mon_get_cpu(); if (!env) return 0; return cpu_ppc_load_tbu(env);} |
1 | static void decorrelation(PSContext *ps, INTFLOAT (*out)[32][2], const INTFLOAT (*s)[32][2], int is34){ LOCAL_ALIGNED_16(INTFLOAT, power, [34], [PS_QMF_TIME_SLOTS]); LOCAL_ALIGNED_16(INTFLOAT, transient_gain, [34], [PS_QMF_TIME_SLOTS]); INTFLOAT *peak_decay_nrg = ps->peak_decay_nrg; INTFLOAT *power_smooth = ps->power_s... |
1 | void tcg_gen_ld8s_i64(TCGv_i64 ret, TCGv_ptr arg2, tcg_target_long offset){ tcg_gen_ld8s_i32(TCGV_LOW(ret), arg2, offset); tcg_gen_sari_i32(TCGV_HIGH(ret), TCGV_HIGH(ret), 31);} |
1 | static int load_glyph(AVFilterContext *ctx, Glyph **glyph_ptr, uint32_t code){ DrawTextContext *s = ctx->priv; FT_BitmapGlyph bitmapglyph; Glyph *glyph; struct AVTreeNode *node = NULL; int ret; /* load glyph into s->face->glyph */ if (FT_Load_Char(s->face, code, s->ft_load_flags)) return AVERROR(EINVAL); /* save glyph ... |
0 | QError *qobject_to_qerror(const QObject *obj){ if (qobject_type(obj) != QTYPE_QERROR) { return NULL; } return container_of(obj, QError, base);} |
0 | uint64_t helper_fmul(CPUPPCState *env, uint64_t arg1, uint64_t arg2){ CPU_DoubleU farg1, farg2; farg1.ll = arg1; farg2.ll = arg2; if (unlikely((float64_is_infinity(farg1.d) && float64_is_zero(farg2.d)) || (float64_is_zero(farg1.d) && float64_is_infinity(farg2.d)))) { /* Multiplication of zero by infinity */ farg1.ll = ... |
0 | static QObject *parse_value(JSONParserContext *ctxt, va_list *ap){ QObject *token; token = parser_context_peek_token(ctxt); if (token == NULL) { parse_error(ctxt, NULL, "premature EOI"); return NULL; } switch (token_get_type(token)) { case JSON_LCURLY: return parse_object(ctxt, ap); case JSON_LSQUARE: return parse_arra... |
0 | ssize_t virtio_pdu_vmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, va_list ap){ V9fsState *s = pdu->s; V9fsVirtioState *v = container_of(s, V9fsVirtioState, state); VirtQueueElement *elem = &v->elems[pdu->idx]; return v9fs_iov_vmarshal(elem->in_sg, elem->in_num, offset, 1, fmt, ap);} |
0 | static void curl_multi_check_completion(BDRVCURLState *s){ int msgs_in_queue; /* Try to find done transfers, so we can free the easy * handle again. */ do { CURLMsg *msg; msg = curl_multi_info_read(s->multi, &msgs_in_queue); if (!msg) break; if (msg->msg == CURLMSG_NONE) break; switch (msg->msg) { case CURLMSG_DONE: { ... |
0 | BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs, const char *backing_file){ char *filename_full = NULL; char *backing_file_full = NULL; char *filename_tmp = NULL; int is_protocol = 0; BlockDriverState *curr_bs = NULL; BlockDriverState *retval = NULL; if (!bs || !bs->drv || !backing_file) { return NULL; }... |
0 | iscsi_set_events(IscsiLun *iscsilun){ struct iscsi_context *iscsi = iscsilun->iscsi; int ev; /* We always register a read handler. */ ev = POLLIN; ev |= iscsi_which_events(iscsi); if (ev != iscsilun->events) { aio_set_fd_handler(iscsilun->aio_context, iscsi_get_fd(iscsi), iscsi_process_read, (ev & POLLOUT) ? iscsi_proc... |
0 | void s390_program_interrupt(CPUS390XState *env, uint32_t code, int ilen, uintptr_t ra){#ifdef CONFIG_TCG S390CPU *cpu = s390_env_get_cpu(env); if (tcg_enabled()) { cpu_restore_state(CPU(cpu), ra); }#endif program_interrupt(env, code, ilen);} |
0 | static void ipmi_sim_realize(DeviceState *dev, Error **errp){ IPMIBmc *b = IPMI_BMC(dev); unsigned int i; IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); qemu_mutex_init(&ibs->lock); QTAILQ_INIT(&ibs->rcvbufs); ibs->bmc_global_enables = (1 << IPMI_BMC_EVENT_LOG_BIT); ibs->device_id = 0x20; ibs->ipmi_version = 0x02; /* IPMI 2.... |
0 | static void spapr_machine_2_3_class_init(ObjectClass *oc, void *data){ MachineClass *mc = MACHINE_CLASS(oc); mc->name = "pseries-2.3"; mc->desc = "pSeries Logical Partition (PAPR compliant) v2.3"; mc->alias = "pseries"; mc->is_default = 1;} |
0 | static int l2_allocate(BlockDriverState *bs, int l1_index, uint64_t **table){ BDRVQcowState *s = bs->opaque; uint64_t old_l2_offset; uint64_t *l2_table; int64_t l2_offset; int ret; old_l2_offset = s->l1_table[l1_index]; trace_qcow2_l2_allocate(bs, l1_index); /* allocate a new l2 entry */ l2_offset = qcow2_alloc_cluster... |
0 | static inline direntry_t* create_short_and_long_name(BDRVVVFATState* s,unsigned int directory_start, const char* filename, int is_dot){ int i,j,long_index=s->directory.next; direntry_t* entry = NULL; direntry_t* entry_long = NULL; if(is_dot) {entry=array_get_next(&(s->directory));memset(entry->name,0x20,11);memcpy(entr... |
0 | int coroutine_fn bdrv_co_flush(BlockDriverState *bs){ int ret; if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { return 0; } /* Write back cached data to the OS even with cache=unsafe */ BLKDBG_EVENT(bs->file, BLKDBG_FLUSH_TO_OS); if (bs->drv->bdrv_co_flush_to_os) { ret = bs->drv->bdrv_co_flush_to_os(bs); if... |
0 | static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, uint32_t event, uint32_t reason){ VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); VirtIOSCSIReq *req; VirtIOSCSIEvent *evt; VirtIODevice *vdev = VIRTIO_DEVICE(s); int in_size; if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) { return; } req = virtio_scsi_... |
0 | static void gic_thiscpu_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size){ GICState *s = (GICState *)opaque; gic_cpu_write(s, gic_get_current_cpu(s), addr, value);} |
0 | static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end){ int pal_start, pal_count, i; if(buf_end - buf < 16) { av_log(s->avctx, AV_LOG_WARNING, "truncated header\n"); return; } s->width = AV_RL16(&buf[4]); s->height = AV_RL16(&buf[6]); if (s->avctx->width!=s->width || s->avctx->height!... |
0 | FWCfgState *fw_cfg_init_mem(hwaddr ctl_addr, hwaddr data_addr){ DeviceState *dev; SysBusDevice *sbd; dev = qdev_create(NULL, TYPE_FW_CFG_MEM); qdev_prop_set_uint32(dev, "data_width", fw_cfg_data_mem_ops.valid.max_access_size); fw_cfg_init1(dev); sbd = SYS_BUS_DEVICE(dev); sysbus_mmio_map(sbd, 0, ctl_addr); sysbus_mmio_... |
0 | static uint32_t mvc_asc(CPUS390XState *env, int64_t l, uint64_t a1, uint64_t mode1, uint64_t a2, uint64_t mode2){ CPUState *cs = CPU(s390_env_get_cpu(env)); target_ulong src, dest; int flags, cc = 0, i; if (!l) { return 0; } else if (l > 256) { /* max 256 */ l = 256; cc = 3; } if (mmu_translate(env, a1, 1, mode1, &dest... |
0 | static ssize_t qio_channel_file_writev(QIOChannel *ioc, const struct iovec *iov, size_t niov, int *fds, size_t nfds, Error **errp){ QIOChannelFile *fioc = QIO_CHANNEL_FILE(ioc); ssize_t ret; retry: ret = writev(fioc->fd, iov, niov); if (ret <= 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return QIO_CHANNEL_ERR_B... |
0 | static int ac97_initfn (PCIDevice *dev){ AC97LinkState *s = DO_UPCAST (AC97LinkState, dev, dev); uint8_t *c = s->dev.config; /* TODO: no need to override */ c[PCI_COMMAND] = 0x00; /* pcicmd pci command rw, ro */ c[PCI_COMMAND + 1] = 0x00; /* TODO: */ c[PCI_STATUS] = PCI_STATUS_FAST_BACK; /* pcists pci status rwc, ro */... |
0 | static Suite *qjson_suite(void){ Suite *suite; TCase *string_literals, *number_literals, *keyword_literals; TCase *dicts, *lists, *whitespace, *varargs; string_literals = tcase_create("String Literals"); tcase_add_test(string_literals, simple_string); tcase_add_test(string_literals, escaped_string); tcase_add_test(stri... |
0 | char_socket_get_addr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp){ SocketChardev *s = SOCKET_CHARDEV(obj); visit_type_SocketAddress(v, name, &s->addr, errp);} |
0 | static void invalidate_and_set_dirty(target_phys_addr_t addr, target_phys_addr_t length){ if (!cpu_physical_memory_is_dirty(addr)) { /* invalidate code */ tb_invalidate_phys_page_range(addr, addr + length, 0); /* set dirty bit */ cpu_physical_memory_set_dirty_flags(addr, (0xff & ~CODE_DIRTY_FLAG)); } xen_modified_memor... |
0 | static void raw_refresh_limits(BlockDriverState *bs, Error **errp){ BDRVRawState *s = bs->opaque; struct stat st; if (!fstat(s->fd, &st)) { if (S_ISBLK(st.st_mode)) { int ret = hdev_get_max_transfer_length(s->fd); if (ret >= 0) { bs->bl.max_transfer_length = ret; } } } raw_probe_alignment(bs, s->fd, errp); bs->bl.min_m... |
0 | static int cpudef_setfield(const char *name, const char *str, void *opaque){ x86_def_t *def = opaque; int err = 0; if (!strcmp(name, "name")) { def->name = strdup(str); } else if (!strcmp(name, "model_id")) { strncpy(def->model_id, str, sizeof (def->model_id)); } else if (!strcmp(name, "level")) { setscalar(&def->level... |
0 | aio_read_f(int argc, char **argv){int nr_iov, c;struct aio_ctx *ctx = calloc(1, sizeof(struct aio_ctx));BlockDriverAIOCB *acb;while ((c = getopt(argc, argv, "CP:qv")) != EOF) {switch (c) {case 'C':ctx->Cflag = 1;break;case 'P':ctx->Pflag = 1;ctx->pattern = atoi(optarg);break;case 'q':ctx->qflag = 1;break;case 'v':ctx->... |
0 | static void nvdimm_build_device_dsm(Aml *dev){ Aml *method; method = aml_method("_DSM", 4, AML_NOTSERIALIZED); aml_append(method, aml_return(aml_call4(NVDIMM_COMMON_DSM, aml_arg(0), aml_arg(1), aml_arg(2), aml_arg(3)))); aml_append(dev, method);} |
0 | void kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp){ struct kvm_s390_vm_cpu_processor prop = { .fac_list = { 0 }, }; struct kvm_device_attr attr = { .group = KVM_S390_VM_CPU_MODEL, .attr = KVM_S390_VM_CPU_PROCESSOR, .addr = (uint64_t) &prop, }; int rc; if (!model) { /* compatibility handling if cpu m... |
0 | static void qdm2_calculate_fft (QDM2Context *q, int channel, int sub_packet){ const float gain = (q->channels == 1 && q->nb_channels == 2) ? 0.5f : 1.0f; int i; q->fft.complex[channel][0].re *= 2.0f; q->fft.complex[channel][0].im = 0.0f; q->rdft_ctx.rdft_calc(&q->rdft_ctx, (FFTSample *)q->fft.complex[channel]); /* add ... |
0 | int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter){ int i, j; int usesVFilter, usesHFilter; int unscaled; SwsFilter dummyFilter= {NULL, NULL, NULL, NULL}; int srcW= c->srcW; int srcH= c->srcH; int dstW= c->dstW; int dstH= c->dstH; int dst_stride = FFALIGN(dstW * sizeof(int16_t)+66, 16); int... |
0 | static int ra144_decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; static const uint8_t sizes[LPC_ORDER] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; unsigned int refl_rms[NBLOCKS]; // RMS of the reflection co... |
0 | static TargetFdDataFunc fd_trans_host_to_target_data(int fd){ if (fd < target_fd_max && target_fd_trans[fd]) { return target_fd_trans[fd]->host_to_target_data; } return NULL;} |
0 | static uint64_t arm_sysctl_read(void *opaque, target_phys_addr_t offset, unsigned size){ arm_sysctl_state *s = (arm_sysctl_state *)opaque; switch (offset) { case 0x00: /* ID */ return s->sys_id; case 0x04: /* SW */ /* General purpose hardware switches. We don't have a useful way of exposing these to the user. */ return... |
0 | void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s){ BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev))); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); VirtIOBlock *vblk = VIRTIO_BLK(s->vdev); unsigned i; unsigned nvqs = s->conf->num_queues; if (!vblk->dataplane_started || s->stopping) { return; } /* Bett... |
0 | static uint32_t scoop_readb(void *opaque, target_phys_addr_t addr){ ScoopInfo *s = (ScoopInfo *) opaque; switch (addr) { case SCOOP_MCR: return s->mcr; case SCOOP_CDR: return s->cdr; case SCOOP_CSR: return s->status; case SCOOP_CPR: return s->power; case SCOOP_CCR: return s->ccr; case SCOOP_IRR_IRM: return s->irr; case... |
0 | static void acpi_build_update(void *build_opaque){ AcpiBuildState *build_state = build_opaque; AcpiBuildTables tables; /* No state to update or already patched? Nothing to do. */ if (!build_state || build_state->patched) { return; } build_state->patched = 1; acpi_build_tables_init(&tables); acpi_build(&tables, MACHINE(... |
0 | static ssize_t nbd_receive_request(QIOChannel *ioc, NBDRequest *request){ uint8_t buf[NBD_REQUEST_SIZE]; uint32_t magic; ssize_t ret; ret = read_sync(ioc, buf, sizeof(buf), NULL); if (ret < 0) { return ret; } /* Request [ 0 .. 3] magic (NBD_REQUEST_MAGIC) [ 4 .. 5] flags (NBD_CMD_FLAG_FUA, ...) [ 6 .. 7] type (NBD_CMD_... |
0 | static void change_parent_backing_link(BlockDriverState *from, BlockDriverState *to){ BdrvChild *c, *next, *to_c; QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) { if (c->role->stay_at_node) { continue; } if (c->role == &child_backing) { /* @from is generally not allowed to be a backing file, except for * when... |
0 | static void test_visitor_in_any(TestInputVisitorData *data, const void *unused){ QObject *res = NULL; Error *err = NULL; Visitor *v; QInt *qint; QBool *qbool; QString *qstring; QDict *qdict; QObject *qobj; v = visitor_input_test_init(data, "-42"); visit_type_any(v, &res, NULL, &err); g_assert(!err); qint = qobject_to_q... |
0 | void kvm_remove_all_breakpoints(CPUState *current_env){ struct kvm_sw_breakpoint *bp, *next; KVMState *s = current_env->kvm_state; CPUState *env; QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) { if (kvm_arch_remove_sw_breakpoint(current_env, bp) != 0) { /* Try harder to find a CPU that currently sees the ... |
0 | static void generate_new_codebooks(RoqContext *enc, RoqTempdata *tempData){ int i,j; RoqCodebooks *codebooks = &tempData->codebooks; int max = enc->width*enc->height/16; uint8_t mb2[3*4]; roq_cell *results4 = av_malloc(sizeof(roq_cell)*MAX_CBS_4x4*4); uint8_t *yuvClusters=av_malloc(sizeof(int)*max*6*4); int *points = a... |
0 | static void breakpoint_handler(CPUX86State *env){ CPUBreakpoint *bp; if (env->watchpoint_hit) { if (env->watchpoint_hit->flags & BP_CPU) { env->watchpoint_hit = NULL; if (check_hw_breakpoints(env, 0)) raise_exception_env(EXCP01_DB, env); else cpu_resume_from_signal(env, NULL); } } else { QTAILQ_FOREACH(bp, &env->breakp... |
0 | int usb_desc_msos(const USBDesc *desc, USBPacket *p, int index, uint8_t *dest, size_t len){ void *buf = g_malloc0(4096); int length = 0; switch (index) { case 0x0004: length = usb_desc_msos_compat(desc, buf); break; case 0x0005: length = usb_desc_msos_prop(desc, buf); break; } if (length > len) { length = len; } memcpy... |
0 | static void qemu_chr_parse_udp(QemuOpts *opts, ChardevBackend *backend, Error **errp){ const char *host = qemu_opt_get(opts, "host"); const char *port = qemu_opt_get(opts, "port"); const char *localaddr = qemu_opt_get(opts, "localaddr"); const char *localport = qemu_opt_get(opts, "localport"); bool has_local = false; S... |
0 | static int read_write_object(int fd, char *buf, uint64_t oid, int copies, unsigned int datalen, uint64_t offset, bool write, bool create, bool cache){ SheepdogObjReq hdr; SheepdogObjRsp *rsp = (SheepdogObjRsp *)&hdr; unsigned int wlen, rlen; int ret; memset(&hdr, 0, sizeof(hdr)); if (write) { wlen = datalen; rlen = 0; ... |
0 | static void vtd_do_iommu_translate(IntelIOMMUState *s, uint8_t bus_num, uint8_t devfn, hwaddr addr, bool is_write, IOMMUTLBEntry *entry){ VTDContextEntry ce; uint64_t slpte; uint32_t level; uint16_t source_id = vtd_make_source_id(bus_num, devfn); int ret_fr; bool is_fpd_set = false; bool reads = true; bool writes = tru... |
0 | bool qht_reset_size(struct qht *ht, size_t n_elems){ struct qht_map *new; struct qht_map *map; size_t n_buckets; bool resize = false; n_buckets = qht_elems_to_buckets(n_elems); qemu_mutex_lock(&ht->lock); map = ht->map; if (n_buckets != map->n_buckets) { new = qht_map_create(n_buckets); resize = true; } qht_map_lock_bu... |
0 | ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value, size_t vsize){ ssize_t size = 0; char buffer[PATH_MAX]; void *ovalue = value; XattrOperations *xops; char *orig_value, *orig_value_start; ssize_t xattr_len, parsed_len = 0, attr_len; /* Get the actual len */ xattr_len = llistxattr(rpath(ctx, path, b... |
0 | static int synth_superframe(AVCodecContext *ctx, float *samples, int *data_size){ WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb, s_gb; int n, res, n_samples = 480; double lsps[MAX_FRAMES][MAX_LSPS]; const double *mean_lsf = s->lsps == 16 ? wmavoice_mean_lsf16[s->lsp_def_mode] : wmavoice_mean_lsf10[s->... |
0 | int float64_lt( float64 a, float64 b STATUS_PARAM ){ flag aSign, bSign; if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) ) { float_raise( float_flag_invalid STATUS_VAR); return 0; } aSign = extractFloat64Sign( a ); bSign = extr... |
0 | void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce){ bs->enable_write_cache = wce; /* so a reopen() will preserve wce */ if (wce) { bs->open_flags |= BDRV_O_CACHE_WB; } else { bs->open_flags &= ~BDRV_O_CACHE_WB; }} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.