Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
qemu | hw/acpi/cpu_hotplug.c | void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
AcpiCpuHotplug *gpe_cpu, uint16_t base)
{
CPUState *cpu;
CPU_FOREACH(cpu) { acpi_set_cpu_present_bit(gpe_cpu, cpu, &error_abort); }
memory_region_init_io(&gpe_cpu->io, owner, &AcpiCpuHotplug_ops,
... | [
0,
0
] |
qemu | hw/9pfs/cofs.c | static int local_remove(FsContext *ctx, const char *path)
{
int err;
struct stat stbuf;
char buffer[PATH_MAX];
if (ctx->export_flags & V9FS_SM_MAPPED_FILE) {
err = lstat(rpath(ctx, path, buffer), &stbuf);
if (err) {
goto err_out;
}
/*
* If directory remove .virtfs_metadata c... | [
1,
0
] |
qemu | block/block-backend.c | static void collie_init(MachineState *machine)
{
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
StrongARMState *s;
DriveInfo *dinfo;
Me... | [
1,
0
] |
FFmpeg | libavfilter/vf_overlay.c | static void blend_image_rgb_pm(AVFilterContext *ctx, AVFrame *dst,
const AVFrame *src, int x, int y)
{
blend_image_packed_rgb(ctx, dst, src, 0, x, y, 1);
} | [
0,
0
] |
qemu | Makefile.objs | static void cpudef_init(void)
{
#if defined(cpudef_setup)
cpudef_setup(); /* parse cpu definitions in target config file */
#endif
} | [
0,
0
] |
qemu | block/qed-cluster.c | static void qed_unplug_allocating_write_reqs(BDRVQEDState *s)
{
assert(s->allocating_write_reqs_plugged);
s->allocating_write_reqs_plugged = false;
qemu_co_enter_next(&s->allocating_write_reqs);
} | [
0,
0
] |
qemu | target-ppc/fpu_helper.c | uint64_t helper_fadd(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_infinity(farg2.d) &&
float64_is_neg(farg1.d) != float64_is_neg(farg2.d))) {
/* Magnitude subtractio... | [
0,
0
] |
qemu | hw/net/vhost_net.c | static int vhost_dev_set_features(struct vhost_dev *dev, bool enable_log)
{
uint64_t features = dev->acked_features;
int r;
if (enable_log) {
features |= 0x1ULL << VHOST_F_LOG_ALL;
}
r = dev->vhost_ops->vhost_set_features(dev, features);
if (r < 0) {
VHOST_OPS_DEBUG("vhost_set_features faile... | [
0,
0
] |
qemu | block/backup.c | static int ccid_card_init(DeviceState *qdev)
{
CCIDCardState *card = CCID_CARD(qdev);
USBDevice *dev = USB_DEVICE(qdev->parent_bus->parent);
USBCCIDState *s = USB_CCID_DEV(dev);
int ret = 0;
if (card->slot != 0) {
error_report("Warning: usb-ccid supports one slot, can't add %d",
c... | [
0,
0
] |
qemu | target-s390x/fpu_helper.c | uint32_t HELPER(lpdbr)(CPUS390XState *env, uint32_t f1, uint32_t f2)
{
float64 v1;
float64 v2 = env->fregs[f2].d;
v1 = float64_abs(v2);
env->fregs[f1].d = v1;
return set_cc_nz_f64(v1);
} | [
0,
0
] |
qemu | exec-i386.c | void cpu_x86_frstor(CPUX86State *s, uint8_t *ptr, int data32)
{
CPUX86State *saved_env;
saved_env = env;
env = s;
helper_frstor(ptr, data32);
env = saved_env;
} | [
0,
0
] |
qemu | block/sheepdog.c | static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
int64_t pos, int size, int load)
{
bool create;
int fd, ret = 0, remaining = size;
unsigned int data_len;
uint64_t vmstate_oid;
uint32_t vdi_index;
uint64_t offset;
fd = connect_to_sdog(s->addr, s... | [
0,
0
] |
qemu | target-i386/kvm.c | int kvm_on_sigbus(int code, void *addr)
{
#if defined(KVM_CAP_MCE)
if ((first_cpu->mcg_cap & MCG_SER_P) && addr && code == BUS_MCEERR_AO) {
uint64_t status;
void *vaddr;
ram_addr_t ram_addr;
target_phys_addr_t paddr;
/* Hope we are lucky for AO MCE */
vaddr = addr;
if (qemu_ram_a... | [
0,
0
] |
qemu | target-i386/kvm.c | static int kvm_get_fpu(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
struct kvm_fpu fpu;
int i, ret;
ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_FPU, &fpu);
if (ret < 0) {
return ret;
}
env->fpstt = (fpu.fsw >> 11) & 7;
env->fpus = fpu.fsw;
env->fpuc = fpu.fcw;
env->fpop = fpu.last_opcode;
... | [
1,
0
] |
qemu | block/qcow2-cluster.c | static int qcow_read(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors)
{
BDRVQcowState *s = bs->opaque;
int ret, index_in_cluster, n, n1;
uint64_t cluster_offset;
while (nb_sectors > 0) {
n = nb_sectors;
cluster_offset = qcow2_get_cluster_offset(bs, sec... | [
1,
0
] |
FFmpeg | libavfilter/fifo.c | void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
{
ff_start_frame(link->dst->outputs[0], picref);
} | [
0,
0
] |
qemu | exec.c | static uint64_t memory_region_dispatch_read1(MemoryRegion *mr,
hwaddr addr,
unsigned size)
{
uint64_t data = 0;
if (!memory_region_access_valid(mr, addr, size, false)) {
return -1U; /* FIXME: better signalling */
}... | [
1,
1
] |
qemu | hw/block/virtio-blk.c | void virtio_queue_set_notification(VirtQueue *vq, int enable)
{
vq->notification = enable;
if (virtio_has_feature(vq->vdev, VIRTIO_RING_F_EVENT_IDX)) {
vring_set_avail_event(vq, vring_avail_idx(vq));
} else if (enable) {
vring_used_flags_unset_bit(vq, VRING_USED_F_NO_NOTIFY);
} else {
vring_... | [
0,
0
] |
qemu | qemu-char.c | void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
{
char buf[READ_BUF_LEN];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
qemu_chr_fe_write(s, (uint8_t *)buf, strlen(buf));
va_end(ap);
} | [
1,
0
] |
FFmpeg | libavformat/avformat.h | void ff_read_frame_flush(AVFormatContext *s)
{
AVStream *st;
int i, j;
flush_packet_queue(s);
s->cur_st = NULL;
/* for each stream, reset read state */
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
if (st->parser) {
av_parser_close(st->parser);
st->parser = NULL;
... | [
1,
0
] |
FFmpeg | cmdutils.c | void av_register_input_format(AVInputFormat *format)
{
AVInputFormat **p = &first_iformat;
while (*p != NULL)
p = &(*p)->next;
*p = format;
format->next = NULL;
} | [
0,
0
] |
qemu | cpu-exec.c | void helper_lock(void)
{
spin_lock(&global_cpu_lock);
} | [
0,
0
] |
qemu | hw/vfio/pci-quirks.c | bool vfio_blacklist_opt_rom(VFIOPCIDevice *vdev)
{
PCIDevice *pdev = &vdev->pdev;
uint16_t vendor_id, device_id;
int count = 0;
vendor_id = pci_get_word(pdev->config + PCI_VENDOR_ID);
device_id = pci_get_word(pdev->config + PCI_DEVICE_ID);
while (count < ARRAY_SIZE(romblacklist)) {
if (romblackl... | [
0,
0
] |
qemu | hw/cirrus_vga.c | static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
const char *name, int devfn,
PCIConfigReadFunc *config_read,
PCIConfigWriteFunc *config_write)
{
if (devfn < 0) {
... | [
1,
0
] |
qemu | hw/9pfs/virtio-9p-device.c | static void virtio_9p_get_config(VirtIODevice *vdev, uint8_t *config)
{
struct virtio_9p_config *cfg;
V9fsState *s = to_virtio_9p(vdev);
cfg = g_malloc0(sizeof(struct virtio_9p_config) +
s->tag_len);
stw_raw(&cfg->tag_len, s->tag_len);
memcpy(cfg->tag, s->tag, s->tag_len);
memcpy(c... | [
1,
0
] |
qemu | target-arm/translate-a64.c | static void do_fp_st(DisasContext *s, int srcidx, TCGv_i64 tcg_addr, int size)
{
/* This writes the bottom N bits of a 128 bit wide vector to memory */
TCGv_i64 tmp = tcg_temp_new_i64();
tcg_gen_ld_i64(tmp, cpu_env, fp_reg_offset(srcidx, MO_64));
if (size < 4) {
tcg_gen_qemu_st_i64(tmp, tcg_addr, get_... | [
0,
0
] |
qemu | hw/nvram/spapr_nvram.c | static void rtas_set_xive(sPAPREnvironment *spapr, uint32_t token,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets)
{
struct ics_state *ics = spapr->icp->ics;
uint32_t nr, server, priority;
if ((nargs != 3) || (nret != 1)) {
rtas_s... | [
1,
0
] |
qemu | migration.c | static int migrate_fd_cleanup(MigrationState *s)
{
int ret = 0;
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
if (s->file) {
DPRINTF("closing file\n");
if (qemu_fclose(s->file) != 0) {
ret = -1;
}
s->file = NULL;
} else {
if (s->mon) {
monitor_resume(s->mon);
... | [
1,
0
] |
qemu | block/vpc.c | static int vpc_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
{
BDRVVPCState *s = (BDRVVPCState *)bs->opaque;
VHDFooter *footer = (VHDFooter *)s->footer_buf;
if (cpu_to_be32(footer->type) != VHD_FIXED) {
bdi->cluster_size = s->block_size;
}
bdi->unallocated_blocks_are_zero = true;
return 0;... | [
1,
0
] |
qemu | target-cris/helper.h | void helper_evaluate_flags_mcp(void)
{
uint32_t src;
uint32_t dst;
uint32_t res;
uint32_t flags = 0;
src = env->cc_src;
dst = env->cc_dest;
res = env->cc_result;
if ((res & 0x80000000L) != 0L)
{
flags |= N_FLAG;
if (((src & 0x80000000L) == 0L)
&& ((dst & 0x80000000L) == 0L... | [
1,
0
] |
FFmpeg | libavcodec/exif.c | static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes,
int le,
int depth, AVDictionary **metadata)
{
int ret, cur_pos;
unsigned id, count;
enum TiffTypes type;
if (depth > 2) {
return 0;
}
ff_tread_tag(gbytes, le, &id, &typ... | [
0,
0
] |
qemu | linux-user/signal.c | static int setup_sigcontext(struct target_sigcontext *sc, CPUAlphaState *env,
abi_ulong frame_addr, target_sigset_t *set)
{
int i, err = 0;
__put_user(on_sig_stack(frame_addr), &sc->sc_onstack);
__put_user(set->sig[0], &sc->sc_mask);
__put_user(env->pc, &sc->sc_pc);
__put_us... | [
0,
1
] |
qemu | HACKING | static void lsi_mmio_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
LSIState *s = opaque;
lsi_reg_writeb(s, addr & 0xff, val);
} | [
0,
0
] |
qemu | tests/bios-tables-test.c | static void test_dst_table(AcpiSdtTable *sdt_table, uint32_t addr)
{
uint8_t checksum;
memset(sdt_table, 0, sizeof(*sdt_table));
ACPI_READ_TABLE_HEADER(&sdt_table->header, addr);
sdt_table->aml_len = le32_to_cpu(sdt_table->header.length)
- sizeof(AcpiTableHeader);
sdt_table->aml ... | [
1,
0
] |
qemu | hw/acpi/piix4.c | static void piix4_device_plug_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
PIIX4PMState *s = PIIX4_PM(hotplug_dev);
if (s->acpi_memory_hotplug.is_enabled &&
object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
if (object_dynamic_cast(OBJECT(dev), TY... | [
0,
0
] |
qemu | qga/commands-posix.c | GuestFileWrite *qmp_guest_file_write(int64_t handle, const char *buf_b64,
bool has_count, int64_t count,
Error **errp) {
GuestFileWrite *write_data = NULL;
guchar *buf;
gsize buf_len;
int write_count;
GuestFileHandle *gfh = guest_file_h... | [
1,
0
] |
FFmpeg | libavcodec/sbrdsp_fixed.c | static av_always_inline void sbr_hf_apply_noise(int (*Y)[2],
const SoftFloat *s_m,
const SoftFloat *q_filt,
int noise,
int p... | [
1,
0
] |
FFmpeg | libavfilter/vf_il.c | static int query_formats(AVFilterContext *ctx)
{
AVFilterFormats *formats = NULL;
int fmt;
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
if (!(desc->flags & PIX_FMT_PAL ||
fmt == AV_PIX_FMT_NV21 ||
fmt == AV_PIX_FMT_NV12)... | [
1,
0
] |
qemu | include/qemu/osdep.h | size_t qemu_mempath_getpagesize(const char *mem_path)
{
#ifdef CONFIG_LINUX
struct statfs fs;
int ret;
do {
ret = statfs(mem_path, &fs);
} while (ret != 0 && errno == EINTR);
if (ret != 0) {
fprintf(stderr, "Couldn't statfs() memory path: %s\n",
strerror(errno));
exit(1);
... | [
1,
0
] |
FFmpeg | libswscale/cs_test.c | static inline void
RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc,
const uint8_t *vsrc,
uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height, long lumStride, long chromStride)
{
/* Y Plane */
memcpy(ydst, ysrc, width * height... | [
1,
1
] |
qemu | util/hbitmap.c | void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len)
{
assert(qiov->nalloc != -1);
if (qiov->niov == qiov->nalloc) {
qiov->nalloc = 2 * qiov->nalloc + 1;
qiov->iov = g_realloc(qiov->iov, qiov->nalloc * sizeof(struct iovec));
}
qiov->iov[qiov->niov].iov_base = base;
qiov->iov[qiov->ni... | [
1,
0
] |
qemu | fsdev/virtfs-proxy-helper.c | static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
const struct timespec *buf)
{
int ret;
#ifdef CONFIG_UTIMENSAT
int fd;
struct handle_data *data = (struct handle_data *)ctx->private;
fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
if (fd < 0) {
... | [
1,
0
] |
qemu | qom/object.c | void object_property_add_str(Object *obj, const char *name,
char *(*get)(Object *, Error **),
void (*set)(Object *, const char *, Error **),
Error **errp)
{
StringProperty *prop = g_malloc0(sizeof(*prop));
prop->get = get;
... | [
1,
0
] |
qemu | target-arm/translate.c | static int disas_cp14_write(CPUState *env, DisasContext *s, uint32_t insn)
{
int crn = (insn >> 16) & 0xf;
int crm = insn & 0xf;
int op1 = (insn >> 21) & 7;
int op2 = (insn >> 5) & 7;
int rt = (insn >> 12) & 0xf;
TCGv tmp;
if (arm_feature(env, ARM_FEATURE_THUMB2EE)) {
if (op1 == 6 && crn == 0... | [
1,
0
] |
qemu | hw/mc146818rtc.c | static void visit_type_int32(Visitor *v, int *value, const char *name,
Error **errp)
{
int64_t val = *value;
visit_type_int(v, &val, name, errp);
} | [
1,
1
] |
qemu | hw/ppc/Makefile.objs | uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)
{
uint64_t val;
spapr_tce_dma_read(dev, taddr, &val, sizeof(val));
return tswap64(val);
} | [
1,
0
] |
qemu | net.c | int net_init_dump(QemuOpts *opts, const char *name, VLANState *vlan)
{
int len;
const char *file;
char def_file[128];
assert(vlan);
file = qemu_opt_get(opts, "file");
if (!file) {
snprintf(def_file, sizeof(def_file), "qemu-vlan%d.pcap", vlan->id);
file = def_file;
}
len = qemu_opt_get_... | [
1,
0
] |
qemu | hw/block/xen_disk.c | static int blk_free(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
struct ioreq *ioreq;
if (blkdev->blk || blkdev->sring) {
blk_disconnect(xendev);
}
/* Free persistent grants */
if (blkdev->feature_persistent) {
g_tree_destroy(blkdev->... | [
1,
0
] |
qemu | migration/migration.c | MigrationIncomingState *migration_incoming_state_new(QEMUFile *f)
{
mis_current = g_malloc0(sizeof(MigrationIncomingState));
mis_current->file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
return mis_current;
} | [
1,
0
] |
qemu | block/linux-aio.c | static void laio_cancel(BlockDriverAIOCB *blockacb)
{
struct qemu_laiocb *laiocb = (struct qemu_laiocb *)blockacb;
struct io_event event;
int ret;
if (laiocb->ret != -EINPROGRESS)
return;
/*
* Note that as of Linux 2.6.31 neither the block device code nor any
* filesystem implements cancell... | [
1,
0
] |
qemu | ui/gtk.c | static void gd_menu_switch_vc(GtkMenuItem *item, void *opaque) {
GtkDisplayState *s = opaque;
VirtualConsole *vc = gd_vc_find_by_menu(s);
GtkNotebook *nb = GTK_NOTEBOOK(s->notebook);
gint page;
gtk_release_modifiers(s);
if (vc) {
page = gtk_notebook_page_num(nb, vc->tab_item);
gtk_notebook_set_curre... | [
1,
0
] |
qemu | block/block-backend.c | void blockdev_mark_auto_del(BlockDriverState *bs)
{
BlockBackend *blk = bs->blk;
DriveInfo *dinfo = blk_legacy_dinfo(blk);
if (dinfo && !dinfo->enable_auto_del) {
return;
}
if (bs->job) {
block_job_cancel(bs->job);
}
if (dinfo) {
dinfo->auto_del = 1;
}
} | [
0,
0
] |
qemu | HACKING | static uint32_t isa_mmio_readb(void *opaque, target_phys_addr_t addr)
{
return cpu_inb(addr & IOPORTS_MASK);
} | [
0,
0
] |
qemu | target-arm/helpers.h | static void gen_neon_unzip(int reg, int q, int tmp, int size)
{
int n;
TCGv t0, t1;
for (n = 0; n < q + 1; n += 2) {
t0 = neon_load_reg(reg, n);
t1 = neon_load_reg(reg, n + 1);
switch (size) {
case 0:
gen_neon_unzip_u8(t0, t1);
break;
case 1:
gen_neon_zip_u16(t0, t1)... | [
1,
0
] |
FFmpeg | Changelog | static inline int show_tags(WriterContext *wctx, AVDictionary *tags,
int section_id)
{
AVDictionaryEntry *tag = NULL;
int ret = 0;
if (!tags)
return 0;
writer_print_section_header(wctx, section_id);
while ((tag = av_dict_get(tags, "", tag, AV_DICT_IGNORE_SUFFIX))) {
... | [
0,
0
] |
qemu | include/exec/gen-icount.h | static void gen_dozi(DisasContext *ctx)
{
target_long simm = SIMM(ctx->opcode);
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_LT, cpu_gpr[rA(ctx->opcode)], simm, l1);
tcg_gen_subfi_tl(cpu_gpr[rD(ctx->opcode)], simm, cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l2);
gen_s... | [
0,
0
] |
qemu | hw/e1000.c | e1000_can_receive(NetClientState *nc)
{
E1000State *s = qemu_get_nic_opaque(nc);
return (s->mac_reg[RCTL] & E1000_RCTL_EN) && e1000_has_rxbufs(s, 1);
} | [
1,
0
] |
FFmpeg | libavformat/mxfdec.c | static int mxf_read_source_package(void *arg, AVIOContext *pb, int tag,
int size, UID uid)
{
MXFPackage *package = arg;
switch (tag) {
case 0x4403:
package->tracks_count = avio_rb32(pb);
if (package->tracks_count >= UINT_MAX / sizeof(UID))
return -1;
pa... | [
1,
0
] |
qemu | ui/vnc.c | static void vnc_desktop_resize(VncState *vs)
{
DisplaySurface *ds = vs->vd->ds;
if (vs->csock == -1 || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) {
return;
}
if (vs->client_width == surface_width(ds) &&
vs->client_height == surface_height(ds)) {
return;
}
vs->client_width = surface_widt... | [
1,
0
] |
FFmpeg | libavcodec/lzf.c | int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
{
int ret = 0;
uint8_t *p = *buf;
int64_t len = 0;
while (bytestream2_get_bytes_left(gb) > 2) {
uint8_t s = bytestream2_get_byte(gb);
if (s < LZF_LITERAL_MAX) {
s++;
if (s > *size - len) {
*size += *siz... | [
1,
0
] |
qemu | hw/char/serial-pci.c | static void multi_serial_pci_realize(PCIDevice *dev, Error **errp)
{
PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
PCIMultiSerialState *pci = DO_UPCAST(PCIMultiSerialState, dev, dev);
SerialState *s;
Error *err = NULL;
int i;
switch (pc->device_id) {
case 0x0003:
pci->ports = 2;
break;... | [
1,
0
] |
qemu | target-arm/cpu.h | static int get_phys_addr_mpu(CPUARMState *env, uint32_t address,
int access_type, int is_user,
hwaddr *phys_ptr, int *prot)
{
int n;
uint32_t mask;
uint32_t base;
*phys_ptr = address;
for (n = 7; n >= 0; n--) {
base = env->cp15.c6_region[n... | [
1,
0
] |
qemu | fsdev/file-op-9p.h | static int local_fstat(FsContext *fs_ctx, int fd, struct stat *stbuf)
{
int err;
err = fstat(fd, stbuf);
if (err) {
return err;
}
if (fs_ctx->fs_sm == SM_MAPPED) {
/* Actual credentials are part of extended attrs */
uid_t tmp_uid;
gid_t tmp_gid;
mode_t tmp_mode;
dev_t tmp_de... | [
1,
0
] |
qemu | dump.c | static bool get_next_page(GuestPhysBlock **blockptr, uint64_t *pfnptr,
uint8_t **bufptr, DumpState *s)
{
GuestPhysBlock *block = *blockptr;
hwaddr addr;
uint8_t *buf;
/* block == NULL means the start of the iteration */
if (!block) {
block = QTAILQ_FIRST(&s->guest_phys_bl... | [
0,
0
] |
qemu | block/qapi.c | static void test_visitor_in_native_list_int8(TestInputVisitorData *data,
const void *unused)
{
test_native_list_integer_helper(data, unused,
USER_DEF_NATIVE_LIST_UNION_KIND_S8);
} | [
0,
0
] |
qemu | fpu/softfloat-specialize.h | int32 float32_to_int32_round_to_zero(float32 a STATUS_PARAM)
{
flag aSign;
int16 aExp, shiftCount;
bits32 aSig;
int32 z;
aSig = extractFloat32Frac(a);
aExp = extractFloat32Exp(a);
aSign = extractFloat32Sign(a);
shiftCount = aExp - 0x9E;
if (0 <= shiftCount) {
if (a != 0xCF000000) {
... | [
1,
0
] |
qemu | cpus.c | static void qemu_account_warp_timer(void)
{
if (!use_icount || !icount_sleep) {
return;
}
/* Nothing to do if the VM is stopped: QEMU_CLOCK_VIRTUAL timers
* do not fire, so computing the deadline does not make sense.
*/
if (!runstate_is_running()) {
return;
}
/* warp clock determinist... | [
0,
0
] |
qemu | hw/virtio/vhost.c | static void kvm_log_start(MemoryListener *listener,
MemoryRegionSection *section)
{
int r;
r = kvm_dirty_pages_log_change(section->offset_within_address_space,
int128_get64(section->size), true);
if (r < 0) {
abort();
}
} | [
0,
0
] |
qemu | Makefile.objs | void async_context_pop(void)
{} | [
0,
0
] |
qemu | thread-pool.c | static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)
{
if (!ctx) {
ctx = qemu_get_aio_context();
}
memset(pool, 0, sizeof(*pool));
event_notifier_init(&pool->notifier, false);
pool->ctx = ctx;
qemu_mutex_init(&pool->lock);
qemu_cond_init(&pool->check_cancel);
qemu_cond_init(&... | [
1,
0
] |
qemu | cpu-exec.c | static always_inline void gen_cmov(TCGCond inv_cond,
int ra, int rb, int rc,
int islit, uint8_t lit, int mask)
{
int l1;
if (unlikely(rc == 31))
return;
l1 = gen_new_label();
if (ra != 31) {
if (mask) {
TCGv tmp = tcg_... | [
0,
0
] |
FFmpeg | libavcodec/ac3dec.c | static inline void downmix_3f_to_stereo(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] += samples[i + 256];
samples[i + 256] = samples[i + 512];
samples[i + 512] = 0;
}
} | [
0,
0
] |
FFmpeg | libavcodec/acelp_filters.c | void ff_acelp_interpolate(
int16_t *out,
const int16_t *in,
const int16_t *filter_coeffs,
int precision,
int frac_pos,
int filter_length,
int length)
{
int n, i;
assert(pitch_delay_frac >= 0 && pitch_delay_frac < precision);
for (n = 0; n < length; n++)
{
int idx = 0... | [
1,
0
] |
qemu | include/qapi/visitor.h | static void qobject_input_type_str(Visitor *v, const char *name, char **obj,
Error **errp)
{
QObjectInputVisitor *qiv = to_qiv(v);
QObject *qobj = qobject_input_get_object(qiv, name, true, errp);
QString *qstr;
*obj = NULL;
if (!qobj) {
return;
}
qstr = qobj... | [
1,
0
] |
qemu | target-mips/op_helper.c | target_ulong helper_dvpe(CPUMIPSState *env)
{
CPUMIPSState *other_cpu = first_cpu;
target_ulong prev = env->mvp->CP0_MVPControl;
do {
/* Turn off all VPEs except the one executing the dvpe. */
if (other_cpu != env) {
other_cpu->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP);
mips_vpe_sle... | [
1,
0
] |
qemu | hw/ide/pci.c | static void bmdma_irq(void *opaque, int n, int level)
{
BMDMAState *bm = opaque;
if (!level) {
/* pass through lower */
qemu_set_irq(bm->irq, level);
return;
}
if (bm) {
bm->status |= BM_STATUS_INT;
}
/* trigger the real irq */
qemu_set_irq(bm->irq, level);
} | [
1,
0
] |
qemu | hw/pci/pci.c | static void do_pci_unregister_device(PCIDevice *pci_dev)
{
pci_dev->bus->devices[pci_dev->devfn] = NULL;
pci_config_free(pci_dev);
memory_region_del_subregion(&pci_dev->bus_master_container_region,
&pci_dev->bus_master_enable_region);
address_space_destroy(&pci_dev->bus_maste... | [
1,
0
] |
qemu | hw/net/virtio-net.c | static void virtio_net_tx_timer(void *opaque)
{
VirtIONetQueue *q = opaque;
VirtIONet *n = q->n;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
assert(vdev->vm_running);
q->tx_waiting = 0;
/* Just in case the driver is not ready on more */
if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) {
return;
... | [
0,
0
] |
qemu | HACKING | static uint64_t omap_pwl_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
struct omap_pwl_s *s = (struct omap_pwl_s *)opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
return omap_badwidth_read8(opaque, addr);
}
switch (offset) {
case 0x00... | [
1,
0
] |
FFmpeg | libavfilter/formats.c | int ff_parse_packing_format(int *ret, const char *arg, void *log_ctx)
{
char *tail;
int planar = strtol(arg, &tail, 10);
if (*tail) {
planar = (strcmp(arg, "packed") != 0);
} else if (planar != 0 && planar != 1) {
av_log(log_ctx, AV_LOG_ERROR, "Invalid packing format '%s'\n", arg);
return AV... | [
1,
0
] |
qemu | hw/usb/bus.c | int usb_claim_port(USBDevice *dev)
{
USBBus *bus = usb_bus_from_device(dev);
USBPort *port;
assert(dev->port == NULL);
if (dev->port_path) {
QTAILQ_FOREACH(port, &bus->free, next) {
if (strcmp(port->path, dev->port_path) == 0) {
break;
}
}
if (port == NULL) {
erro... | [
1,
0
] |
qemu | hw/display/xenfb.c | static void xen_init_pv(MachineState *machine)
{
DriveInfo *dinfo;
int i;
/* Initialize backend core & drivers */
if (xen_be_init() != 0) {
fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__);
exit(1);
}
switch (xen_mode) {
case XEN_ATTACH:
/* nothing to do, xend han... | [
1,
0
] |
qemu | MAINTAINERS | static uint32_t qpi_mem_readw(void *opaque, target_phys_addr_t addr)
{
return 0;
} | [
0,
0
] |
FFmpeg | libavcodec/mips/h264qpel_msa.c | void ff_avg_h264_qpel4_mc02_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_and_aver_dst_4x4_msa(src - (stride * 2), stride, dst, stride);
} | [
0,
0
] |
qemu | block/commit.c | static void commit_complete(BlockJob *job, void *opaque)
{
CommitBlockJob *s = container_of(job, CommitBlockJob, common);
CommitCompleteData *data = opaque;
BlockDriverState *active = s->active;
BlockDriverState *top = blk_bs(s->top);
BlockDriverState *base = blk_bs(s->base);
BlockDriverState *overla... | [
1,
0
] |
qemu | target-xtensa/op_helper.c | void HELPER(wsr_ibreakenable)(uint32_t v)
{
uint32_t change = v ^ env->sregs[IBREAKENABLE];
unsigned i;
for (i = 0; i < env->config->nibreak; ++i) {
if (change & (1 << i)) {
tb_invalidate_phys_page_range(
env->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0);
}
}
env->sregs[... | [
1,
0
] |
qemu | cpu-exec.c | static void gen_logicq_cc(TCGv val)
{
TCGv tmp = new_tmp();
gen_helper_logicq_cc(tmp, val);
gen_logic_CC(tmp);
dead_tmp(tmp);
} | [
0,
0
] |
qemu | block/block-backend.c | static void ide_init1(IDEBus *bus, int unit)
{
static int drive_serial = 1;
IDEState *s = &bus->ifs[unit];
s->bus = bus;
s->unit = unit;
s->drive_serial = drive_serial++;
/* we need at least 2k alignment for accessing CDROMs using O_DIRECT */
s->io_buffer_total_len = IDE_DMA_BUF_SECTORS * 512 + 4;... | [
1,
0
] |
qemu | hw/intc/arm_gic.c | static void translate_priority(GICState *s, int irq, int cpu,
uint32_t *field, bool to_kernel)
{
if (to_kernel) {
*field = GIC_GET_PRIORITY(irq, cpu) & 0xff;
} else {
gic_set_priority(s, cpu, irq, *field & 0xff);
}
} | [
1,
0
] |
qemu | HACKING | static int omap_validate_imif_addr(struct omap_mpu_state_s *s,
target_phys_addr_t addr)
{
return range_covers_byte(OMAP_IMIF_BASE, s->sram_size, addr);
} | [
0,
0
] |
qemu | hw/ppc/spapr_drc.c | static void rtas_set_indicator(PowerPCCPU *cpu, sPAPRMachineState *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
target_ulong rets)
{
uint32_t sensor_type;
uint32_t sensor_index;
uint32_t... | [
1,
0
] |
qemu | exec.c | static void openrisc_cpu_class_init(ObjectClass *oc, void *data)
{
OpenRISCCPUClass *occ = OPENRISC_CPU_CLASS(oc);
CPUClass *cc = CPU_CLASS(occ);
DeviceClass *dc = DEVICE_CLASS(oc);
occ->parent_realize = dc->realize;
dc->realize = openrisc_cpu_realizefn;
occ->parent_reset = cc->reset;
cc->reset = ... | [
1,
0
] |
qemu | hw/acpi/piix4.c | static void bonito_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = bonito_initfn;
k->vendor_id = 0xdf53;
k->device_id = 0x00d5;
k->revision = 0x01;
k->class_id = PCI_CLASS_BRIDGE_HOST;
dc->desc = "Host br... | [
1,
0
] |
FFmpeg | libavformat/matroskadec.c | static int matroska_deliver_packet(MatroskaDemuxContext *matroska,
AVPacket *pkt)
{
if (matroska->num_packets > 0) {
memcpy(pkt, matroska->packets[0], sizeof(AVPacket));
av_free(matroska->packets[0]);
if (matroska->num_packets > 1) {
memmove(&matroska->packe... | [
1,
0
] |
qemu | block/qcow2-cluster.c | static uint64_t *l2_allocate(BlockDriverState *bs, int l1_index)
{
BDRVQcowState *s = bs->opaque;
int min_index;
uint64_t old_l2_offset;
uint64_t *l2_table, l2_offset;
old_l2_offset = s->l1_table[l1_index];
/* allocate a new l2 entry */
l2_offset = qcow2_alloc_clusters(bs, s->l2_size * sizeof(uint... | [
1,
0
] |
qemu | acl.c | struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
target_ulong pc)
{
struct kvm_sw_breakpoint *bp;
TAILQ_FOREACH(bp, &env->kvm_state->kvm_sw_breakpoints, entry) {
if (bp->pc == pc)
return bp;
}
return NULL;
} | [
0,
0
] |
qemu | audio/audio.c | static int kvm_virtio_pci_irqfd_use(VirtIOPCIProxy *proxy,
unsigned int queue_no,
unsigned int vector)
{
VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
VirtQueue *vq = virtio_... | [
0,
0
] |
qemu | acl.c | static void ioreq_finish(struct ioreq *ioreq)
{
struct XenBlkDev *blkdev = ioreq->blkdev;
LIST_REMOVE(ioreq, list);
LIST_INSERT_HEAD(&blkdev->finished, ioreq, list);
blkdev->requests_inflight--;
blkdev->requests_finished++;
} | [
0,
0
] |
qemu | ui/sdl.c | static void handle_mousemotion(DisplayState *ds, SDL_Event *ev)
{
int max_x, max_y;
if (is_graphic_console() &&
(kbd_mouse_is_absolute() || absolute_enabled)) {
max_x = real_screen->w - 1;
max_y = real_screen->h - 1;
if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 ||
... | [
1,
0
] |
qemu | target-i386/helper.h | void helper_mwait(CPUX86State *env, int next_eip_addend)
{
CPUState *cs;
X86CPU *cpu;
if ((uint32_t)env->regs[R_ECX] != 0) {
raise_exception(env, EXCP0D_GPF);
}
cpu_svm_check_intercept_param(env, SVM_EXIT_MWAIT, 0);
env->eip += next_eip_addend;
cpu = x86_env_get_cpu(env);
cs = CPU(cpu);
... | [
1,
1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.