Home
last modified time | relevance | path

Searched +full:io +full:- +full:width (Results 1 – 8 of 8) sorted by relevance

/kvm-unit-tests/lib/
H A Dpci-testdev.c2 * QEMU "pci-testdev" PCI test device
9 #include "asm/io.h"
102 u8 width; in pci_testdev_one() local
107 ops->io_writeb(test_nr, &test->test); in pci_testdev_one()
108 count = ops->io_readl(&test->count); in pci_testdev_one()
112 width = ops->io_readb(&test->width); in pci_testdev_one()
113 if (width != 1 && width != 2 && width != 4) in pci_testdev_one()
116 sig = ops->io_readl(&test->data); in pci_testdev_one()
117 off = ops->io_readl(&test->offset); in pci_testdev_one()
120 switch (width) { in pci_testdev_one()
[all …]
/kvm-unit-tests/x86/
H A Dvmexit.c76 tsc_eoi += rdtsc() - start; in self_ipi_isr()
83 tsc_ipi += rdtsc() - start; in x2apic_self_ipi()
91 tsc_ipi += rdtsc() - start; in apic_self_ipi()
193 tsc_ipi += rdtsc() - start; in ipi()
213 pm_tmr_blk = fadt->pm_tmr_blk; in inl_pmtimer()
245 static struct counter counters[64] = { { -1, 0 } }; in ple_round_robin()
250 while (p->n1 == p->n2) in ple_round_robin()
253 p->n2 = p->n1; in ple_round_robin()
284 .test_idx = -1
317 static uint8_t ioreadb(unsigned long addr, bool io) in ioreadb() argument
[all …]
H A Dvmx.c91 #define MASK(_bits) GENMASK_ULL((_bits) - 1, 0)
255 return (f->encoding >> VMCS_FIELD_TYPE_SHIFT) & 0x3; in vmcs_field_type()
273 value |= (f->encoding << 8); in vmcs_field_value()
276 return value & f->mask; in vmcs_field_value()
281 vmcs_write(f->encoding, vmcs_field_value(f, cookie)); in set_vmcs_field()
290 if (f->encoding == VMX_INST_ERROR) { in check_vmcs_field()
291 printf("Skipping volatile field %lx\n", f->encoding); in check_vmcs_field()
295 ret = vmcs_read_safe(f->encoding, &actual); in check_vmcs_field()
302 printf("Skipping read-only field %lx\n", f->encoding); in check_vmcs_field()
307 actual &= f->mask; in check_vmcs_field()
[all …]
H A Dvmx.h9 #include "asm/io.h"
51 u32 abort; /* VMX-abort indicator */
109 /* Did the instruction VM-Fail? */
111 /* Did the VM-Entry fully enter the guest? */
113 /* VM-Exit reason, valid iff !vm_fail */
139 width:1, member
190 /* 16-Bit Control Fields */
192 /* Posted-interrupt notification vector */
197 /* 16-Bit Guest State Fields */
209 /* 16-Bit Host State Fields */
[all …]
H A Dvmx_tests.c51 int pos = -1; in ffs()
156 if (((rdtsc() - tsc_val) >> preempt_scale) in preemption_timer_main()
183 report(((rdtsc() - tsc_val) >> preempt_scale) >= preempt_val, in preemption_timer_exit_handler()
184 "busy-wait for preemption timer"); in preemption_timer_exit_handler()
191 report(((rdtsc() - tsc_val) >> preempt_scale) >= preempt_val in preemption_timer_exit_handler()
228 report_fail("busy-wait for preemption timer"); in preemption_timer_exit_handler()
655 // stage 0, test IO pass in iobmp_main()
659 report(vmx_get_test_stage() == 0, "I/O bitmap - I/O pass"); in iobmp_main()
660 // test IO width, in/out in iobmp_main()
664 report(vmx_get_test_stage() == 3, "I/O bitmap - trap in"); in iobmp_main()
[all …]
H A Dsvm_tests.c46 return vmcb->control.exit_code == SVM_EXIT_VMMCALL; in null_check()
51 vmcb->control.intercept &= ~(1ULL << INTERCEPT_VMRUN); in prepare_no_vmrun_int()
56 return vmcb->control.exit_code == SVM_EXIT_ERR; in check_no_vmrun_int()
66 return vmcb->control.exit_code == SVM_EXIT_VMRUN; in check_vmrun()
72 vmcb->control.intercept |= 1 << INTERCEPT_RSM; in prepare_rsm_intercept()
73 vmcb->control.intercept_exceptions |= (1ULL << UD_VECTOR); in prepare_rsm_intercept()
90 if (vmcb->control.exit_code != SVM_EXIT_RSM) { in finished_rsm_intercept()
92 vmcb->control.exit_code); in finished_rsm_intercept()
95 vmcb->control.intercept &= ~(1 << INTERCEPT_RSM); in finished_rsm_intercept()
100 if (vmcb->control.exit_code != SVM_EXIT_EXCP_BASE + UD_VECTOR) { in finished_rsm_intercept()
[all …]
/kvm-unit-tests/lib/riscv/
H A Dio.c1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <asm/io.h>
66 assert(ret >= 0 || ret == -FDT_ERR_NOTFOUND); in uart0_init_fdt()
68 if (ret == -FDT_ERR_NOTFOUND) { in uart0_init_fdt()
71 assert(ret == 0 || ret == -FDT_ERR_NOTFOUND); in uart0_init_fdt()
85 val = fdt_getprop(dt_fdt(), ret, "reg-shift", &len); in uart0_init_fdt()
89 val = fdt_getprop(dt_fdt(), ret, "reg-io-width", &len); in uart0_init_fdt()
/kvm-unit-tests/lib/x86/
H A Dintel-iommu.c13 #include "intel-iommu.h"
20 * VT-d in QEMU currently only support 39 bits address width, which is
21 * 3-level translation.
67 uint16_t source_id:16; /* Source-ID */
68 uint64_t sid_q:2; /* Source-ID Qualifier */
69 uint64_t sid_vtype:2; /* Source-ID Validation Type */
101 /* One-shot bits are taking effect immediately */ in vtd_gcmd_or()
119 printf("VT-d version: %#x\n", version); in vtd_dump_init_info()
150 for (level = VTD_PAGE_LEVEL; level > level_target; level--) { in vtd_install_pte()
169 * vtd_map_range: setup IO address mapping for specific memory range
[all …]