/qemu/hw/virtio/ |
H A D | cbor-helpers.c | 22 if (!success) { in qemu_cbor_map_add() 35 if (!success) { in qemu_cbor_array_push() 48 if (!key_cbor) { in qemu_cbor_add_bool_to_map() 52 if (!value_cbor) { in qemu_cbor_add_bool_to_map() 55 if (!qemu_cbor_map_add(map, key_cbor, value_cbor)) { in qemu_cbor_add_bool_to_map() 62 if (key_cbor) { in qemu_cbor_add_bool_to_map() 65 if (value_cbor) { in qemu_cbor_add_bool_to_map() 78 if (!key_cbor) { in qemu_cbor_add_uint8_to_map() 82 if (!value_cbor) { in qemu_cbor_add_uint8_to_map() 85 if (!qemu_cbor_map_add(map, key_cbor, value_cbor)) { in qemu_cbor_add_uint8_to_map() [all …]
|
H A D | virtio-nsm.c | 96 if (!root) { in error_response() 100 if (!qemu_cbor_add_string_to_map(root, "Error", error_string(error))) { in error_response() 105 if (len == 0) { in error_response() 114 if (root) { in error_response() 146 if (!root) { in handle_get_random() 150 if (!qemu_cbor_add_map_to_map(root, "GetRandom", 1, &nested_map)) { in handle_get_random() 156 if (!qemu_cbor_add_bytestring_to_map(nested_map, "random", rnd, in handle_get_random() 162 if (len == 0) { in handle_get_random() 163 if (error_response(response, NSM_INPUT_TOO_LARGE, errp)) { in handle_get_random() 173 if (root) { in handle_get_random() [all …]
|
/qemu/bsd-user/ |
H A D | mmap.c | 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 31 if (mmap_lock_count++ == 0) { in mmap_lock() 39 if (--mmap_lock_count == 0) { in mmap_unlock() 52 if (mmap_lock_count) in mmap_fork_start() 59 if (child) in mmap_fork_end() 76 if ((start & ~TARGET_PAGE_MASK) != 0) in target_mprotect() 80 if (end < start) in target_mprotect() 83 if (len == 0) in target_mprotect() 89 if (start > host_start) { in target_mprotect() 95 if (host_end == host_start + qemu_host_page_size) { in target_mprotect() [all …]
|
/qemu/block/ |
H A D | qapi-system.c | 47 if (!blk_name == !qdev_id) { in qmp_get_blk() 52 if (qdev_id) { in qmp_get_blk() 56 if (blk == NULL) { in qmp_get_blk() 67 * If @force, ignore its tray lock. 68 * Else, if the tray is locked, don't open it, but ask the guest to open it. 70 * If @device does not exist, return -ENODEV. 71 * If it has no removable media, return -ENOTSUP. 72 * If it has no tray, return -ENOSYS. 73 * If the guest was asked to open the tray, return -EINPROGRESS. 84 if (!blk) { in do_open_tray() [all …]
|
H A D | snapshot.c | 63 if (nb_sns < 0) { in bdrv_snapshot_find() 68 if (!strcmp(sn->name, name)) { in bdrv_snapshot_find() 88 * If both @id and @name are specified, find the first one with id @id and 90 * If only @id is specified, find the first one with id @id. 91 * If only @name is specified, find the first one with name @name. 92 * if none is specified, abort(). 95 * when error or not found. If all operation succeed but no matching one is 112 if (nb_sns < 0) { in bdrv_snapshot_find_by_id_and_name() 115 } else if (nb_sns == 0) { in bdrv_snapshot_find_by_id_and_name() 119 if (id && name) { in bdrv_snapshot_find_by_id_and_name() [all …]
|
H A D | io.c | 46 /* Maximum read size for checking if data reads as zero, in bytes */ 63 if (c == ignore) { in bdrv_parent_drained_begin() 77 if (c->klass->drained_end) { in bdrv_parent_drained_end_single() 90 if (c == ignore) { in bdrv_parent_drained_end() 101 if (c->klass->drained_poll) { in bdrv_parent_drained_poll_single() 117 if (c == ignore || (ignore_bds_parents && c->klass->parent_is_bds)) { in bdrv_parent_drained_poll() 133 if (c->klass->drained_begin) { in bdrv_parent_drained_begin_single() 182 if (tran) { in bdrv_refresh_limits() 193 if (!drv) { in bdrv_refresh_limits() 205 if (c->role & (BDRV_CHILD_DATA | BDRV_CHILD_FILTERED | BDRV_CHILD_COW)) in bdrv_refresh_limits() [all …]
|
H A D | file-posix.c | 46 #if defined(__APPLE__) && (__MACH__) 48 #if defined(HAVE_HOST_BLOCK_DEVICE) 72 #if defined(CONFIG_BLKZONED) 89 #if defined(CONFIG_FALLOCATE_PUNCH_HOLE) || defined(CONFIG_FALLOCATE_ZERO_RANGE) 92 #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) 128 /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ 153 * Even if each path is in a separate path group (path_grouping_policy set to 213 if (s->fd >= 0) { in fd_open() 257 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 268 if ((err) == EAGAIN || (err) == EACCES) { \ [all …]
|
/qemu/linux-user/ |
H A D | mmap.c | 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 43 if (mmap_lock_count++ == 0) { in mmap_lock() 51 if (--mmap_lock_count == 0) { in mmap_unlock() 64 if (mmap_lock_count) in mmap_fork_start() 71 if (child) { in mmap_fork_end() 96 if (i->start == start) { in shm_region_find() 109 if (i->start >= start && i->last <= last) { in shm_region_rm_complete() 119 * Return 0 if the target prot bitmask is invalid, otherwise 132 * The PROT_BTI bit is only accepted if the cpu supports the feature. in validate_prot_to_pageflags() 134 * the bit has been requested. If set and valid, record the bit in validate_prot_to_pageflags() [all …]
|
/qemu/target/arm/tcg/ |
H A D | hflags.c | 22 * Assuming fine-grained-traps are active, return true if we in fgt_svc() 25 * because if this is AArch32 EL1 then arm_fgt_active() is false. in fgt_svc() 33 /* Return true if memory alignment should be enforced. */ 40 if (sctlr & SCTLR_A) { in aprofile_require_alignment() 48 if (arm_feature(env, ARM_FEATURE_PMSA)) { in aprofile_require_alignment() 53 * With VMSA, if translation is disabled, then the default memory type in aprofile_require_alignment() 58 if (sctlr & SCTLR_M) { in aprofile_require_alignment() 62 if (el < 2 && (arm_hcr_el2_eff(env) & (HCR_DC | HCR_VM))) { in aprofile_require_alignment() 86 if (arm_singlestep_active(env)) { in rebuild_hflags_common() 99 if (sctlr_b) { in rebuild_hflags_common_32() [all …]
|
H A D | translate-vfp.c | 20 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 92 * register. If top is true, returns the top 16 bits; otherwise the bottom 98 #if HOST_BIG_ENDIAN in vfp_f16_offset() 99 if (!top) { in vfp_f16_offset() 103 if (top) { in vfp_f16_offset() 111 * Generate code for M-profile lazy FP state preservation if needed; 116 if (s->v7m_lspact) { in gen_preserve_fp_state() 122 if (translator_io_start(&s->base)) { in gen_preserve_fp_state() 127 * If the preserve_fp_state helper doesn't throw an exception in gen_preserve_fp_state() 135 * If we're about to create a new fp context then that in gen_preserve_fp_state() [all …]
|
/qemu/hw/9pfs/ |
H A D | 9p-local.c | 76 if (*c) { in local_open_nofollow() 87 if (fd != data->mountfd) { in local_open_nofollow() 128 if (mode[0] == 'r') { in local_fopenat() 130 } else if (mode[0] == 'w') { in local_fopenat() 137 if (fd == -1) { in local_fopenat() 141 if (!fp) { in local_fopenat() 155 if (strcmp(name, ".")) { in local_mapped_file_attr() 157 if (map_dirfd == -1) { in local_mapped_file_attr() 166 if (!fp) { in local_mapped_file_attr() 171 if (!strncmp(buf, "virtfs.uid", 10)) { in local_mapped_file_attr() [all …]
|
/qemu/target/xtensa/ |
H A D | overlay_tool.h | 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 174 #if XCHAL_HAVE_WINDOWED 345 #if XCHAL_HAVE_PTP_MMU 452 #if TARGET_BIG_ENDIAN == (XCHAL_HAVE_BE != 0) 551 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 2 554 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 3 557 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 4 560 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 5 563 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 6 566 #if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI + 1 <= 7 [all …]
|
/qemu/nbd/ |
H A D | client.c | 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 64 * a C string; and @data may be NULL if @len is 0). 65 * Return 0 if successful, -1 with errp set if it is impossible to 75 if (len == -1) { in nbd_send_option_request() 84 if (nbd_write(ioc, &req, sizeof(req), errp) < 0) { in nbd_send_option_request() 89 if (len && nbd_write(ioc, (char *) data, len, errp) < 0) { in nbd_send_option_request() 104 * even care if the request makes it to the server, let alone in nbd_send_opt_abort() 112 * payload. Return 0 if successful, -1 with errp set if it is 118 if (nbd_read(ioc, reply, sizeof(*reply), "option reply", errp) < 0) { in nbd_receive_option_reply() 131 if (reply->magic != NBD_REP_MAGIC) { in nbd_receive_option_reply() [all …]
|
/qemu/hw/i386/kvm/ |
H A D | xen_evtchn.c | 206 if (s->callback_param) { in xen_evtchn_post_load() 214 if (p->type == EVTCHNSTAT_pirq) { in xen_evtchn_post_load() 229 if (s->gsi_pirq[i]) { in xen_evtchn_post_load() 302 if (vi) { in gsi_assert_bh() 372 if (domain || !pcms) { in type_init() 377 if (!pdev) { in type_init() 382 if (r.mode != PCI_INTX_ENABLED) { in type_init() 397 if (!s) { in xen_evtchn_set_callback_level() 415 * • From guest vCPU context in the KVM exit handler, if the upcall in xen_evtchn_set_callback_level() 421 * Whichever context we come from if we aren't already holding the BQL in xen_evtchn_set_callback_level() [all …]
|
H A D | xenstore_impl.c | 81 if (tx->base_tx == *new_tx_id) { in nobble_tx() 130 if (!n) { in xs_node_unref() 134 if (--n->ref) { in xs_node_unref() 138 if (n->content) { in xs_node_unref() 141 if (n->perms) { in xs_node_unref() 144 if (n->children) { in xs_node_unref() 188 if (name) { in xs_node_create() 211 if (n->name) { in xs_node_copy() 217 if (old->children) { in xs_node_copy() 222 if (old->perms) { in xs_node_copy() [all …]
|
/qemu/ |
H A D | blockdev.c | 94 * All controllers used to implement if=T drives need to support 99 * For instance, if you change [IF_SCSI] to 255, -drive 100 * if=scsi,index=12 no longer means bus=1,unit=5, but 119 if (max_devs <= 0) { in override_max_devs() 125 if (dinfo->type == type) { in override_max_devs() 150 if (!dinfo) { in blockdev_mark_auto_del() 164 if (job) { in blockdev_mark_auto_del() 181 if (dinfo && dinfo->auto_del) { in blockdev_auto_del() 207 if (!opts) { in drive_add() 210 if (type != IF_DEFAULT) { in drive_add() [all …]
|
/qemu/ui/ |
H A D | sdl2.c | 42 static int gui_grab; /* if true, all keyboard/mouse events are grabbed */ 72 if (sdl2_console[i].real_window == SDL_GetWindowFromID(window_id)) { in get_scon_from_window() 83 if (!scon->surface) { in sdl2_window_create() 88 if (gui_fullscreen) { in sdl2_window_create() 93 if (scon->hidden) { in sdl2_window_create() 97 if (scon->opengl) { in sdl2_window_create() 107 if (scon->opengl) { in sdl2_window_create() 110 if (scon->opts->gl == DISPLAY_GL_MODE_ES) { in sdl2_window_create() 128 if (!scon->real_window) { in sdl2_window_destroy() 132 if (scon->winctx) { in sdl2_window_destroy() [all …]
|
/qemu/hw/intc/ |
H A D | armv7m_nvic.c | 71 if (qemu_irq_is_connected(s->sysresetreq)) { in signal_sysresetreq() 75 * Default behaviour if the SoC doesn't need to wire up in signal_sysresetreq() 86 * or NVIC_NOEXC_PRIO if no interrupt is pending in nvic_pending_prio() 92 * 1 if there is exactly one active exception 93 * 0 if there is more than one active exception 94 * UNKNOWN if there are no active exceptions (we choose 1, 111 if (s->vectors[irq].active || in nvic_rettobase() 115 if (nhand == 2) { in nvic_rettobase() 125 * 1 if an external interrupt is pending 126 * 0 if no external interrupt is pending [all …]
|
/qemu/migration/ |
H A D | vmstate.c | 37 if (field->field_exists) { in vmstate_field_exists() 38 /* If there's the function checker, that's the solo truth */ in vmstate_field_exists() 44 * Otherwise, we only save/load if field version is same or older. in vmstate_field_exists() 88 if (field->flags & VMS_ARRAY) { in vmstate_n_elems() 90 } else if (field->flags & VMS_VARRAY_INT32) { in vmstate_n_elems() 92 } else if (field->flags & VMS_VARRAY_UINT32) { in vmstate_n_elems() 94 } else if (field->flags & VMS_VARRAY_UINT16) { in vmstate_n_elems() 96 } else if (field->flags & VMS_VARRAY_UINT8) { in vmstate_n_elems() 100 if (field->flags & VMS_MULTIPLY_ELEMENTS) { in vmstate_n_elems() 112 if (field->flags & VMS_VBUFFER) { in vmstate_size() [all …]
|
/qemu/pc-bios/s390-ccw/ |
H A D | cio.c | 36 if ((ret == 0) && (sda_area->response.code == 0x0001)) { in enable_mss_facility() 61 if (do_cio(schid, CU_TYPE_UNKNOWN, ptr2u32(&sense_id_ccw), CCW_FMT1)) { in cu_type() 84 if (irb->scsw.cstat) { in irb_error() 94 if (sd->config_info & 0x8000) { in print_eckd_dasd_sense_data() 101 if (sd->common_status & SNS_STAT0_CMD_REJECT) { in print_eckd_dasd_sense_data() 104 if (sd->common_status & SNS_STAT0_INTERVENTION_REQ) { in print_eckd_dasd_sense_data() 107 if (sd->common_status & SNS_STAT0_BUS_OUT_CHECK) { in print_eckd_dasd_sense_data() 110 if (sd->common_status & SNS_STAT0_EQUIPMENT_CHECK) { in print_eckd_dasd_sense_data() 113 if (sd->common_status & SNS_STAT0_DATA_CHECK) { in print_eckd_dasd_sense_data() 116 if (sd->common_status & SNS_STAT0_OVERRUN) { in print_eckd_dasd_sense_data() [all …]
|
/qemu/hw/ppc/ |
H A D | vof.c | 51 if (VOF_MEM_READ(pa, buf, size) != MEMTX_OK) { in readstr() 54 if (strnlen(buf, size) == size) { in readstr() 65 if (strcmp(s, s1)) { in cmpservice() 68 if ((nargscheck && (nargs != nargscheck)) || in cmpservice() 85 if (*c == '\0' && i == len - 1) { in prop_format() 89 if (*c < 0x20 || *c >= 0x80) { in prop_format() 95 if (t >= tval + tlen - sizeof(bin) - 1 - 2 - 1) { in prop_format() 99 if (i && i % 4 == 0 && i != len - 1) { in prop_format() 112 if (ret < 0) { in get_path() 126 if (ret < 0) { in phandle_to_path() [all …]
|
/qemu/target/riscv/tcg/ |
H A D | tcg-cpu.c | 17 * this program. If not, see <http://www.gnu.org/licenses/>. 78 if (enabled) { in riscv_cpu_write_misa_bit() 109 if (cpu->cfg.ext_zve32x) { in riscv_get_tb_cpu_state() 111 * If env->vl equals to VLMAX, we can use generic vector operation in riscv_get_tb_cpu_state() 140 if (cpu_get_fcfien(env)) { in riscv_get_tb_cpu_state() 150 if (cpu_get_bcfien(env)) { in riscv_get_tb_cpu_state() 164 if (env->virt_enabled) { in riscv_get_tb_cpu_state() 175 if (!riscv_has_ext(env, RVF)) { in riscv_get_tb_cpu_state() 180 if (cpu->cfg.debug && !icount_enabled()) { in riscv_get_tb_cpu_state() 201 if (!(tb_cflags(tb) & CF_PCREL)) { in riscv_cpu_synchronize_from_tb() [all …]
|
/qemu/tests/qemu-iotests/ |
H A D | 172 | 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 46 if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then 53 if ! test -t 0; then 83 QEMU_OPTIONS="" do_run_qemu -drive if=none,file="$TEST_IMG" "$@" | 98 # -drive and using the same index, but if you use -drive to add a floppy to a 122 check_floppy_qtree -drive if=floppy,file="$TEST_IMG" 123 check_floppy_qtree -drive if=floppy,file="$TEST_IMG",index=1 124 check_floppy_qtree -drive if=floppy,file="$TEST_IMG" -drive if=floppy,file="$TEST_IMG.2",index=1 128 echo === Using -drive if=none and -device === 130 check_floppy_qtree -drive if=none,file="$TEST_IMG" -device floppy,drive=none0 [all …]
|
/qemu/scripts/codeconverter/codeconverter/ |
H A D | qom_type_info.py | 57 if array: 86 if getattr(self, '_inititalizers', None): 90 if fields is None: 117 if self.initializers is None: 123 if field in initializers: 135 if not typename: 137 if not typename.startswith('TYPE_'): 144 if not class_size: 147 if not m: 154 if not instance_size: [all …]
|
/qemu/target/i386/tcg/ |
H A D | seg_helper.c | 18 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 36 if ((sp_mask) == 0xffff) { \ 39 } else if ((sp_mask) == 0xffffffffLL) { \ 99 if (!(env->cr[0] & CR0_PG_MASK)) { in get_pg_mode() 102 if (env->cr[0] & CR0_WP_MASK) { in get_pg_mode() 105 if (env->cr[4] & CR4_PAE_MASK) { in get_pg_mode() 107 if (env->efer & MSR_EFER_NXE) { in get_pg_mode() 111 if (env->cr[4] & CR4_PSE_MASK) { in get_pg_mode() 114 if (env->cr[4] & CR4_SMEP_MASK) { in get_pg_mode() 117 if (env->hflags & HF_LMA_MASK) { in get_pg_mode() [all …]
|