v86/tests/kvm-unit-tests/x86
2022-11-26 14:11:19 -06:00
..
access.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
apic.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
asyncpf.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
cmpxchg8b.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
cstart.S Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
cstart64.S Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
debug.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
emulator.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
eventinj.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
flat.lds Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
hypercall.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
hyperv.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
hyperv.h Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
hyperv_clock.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
hyperv_connections.c kvm-unit-test: Add missing files 2020-07-21 20:10:11 -05:00
hyperv_stimer.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
hyperv_synic.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
idt_test.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
init.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
intel-iommu.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
ioapic.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
ioram.h Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
kvmclock.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
kvmclock.h Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
kvmclock_test.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
Makefile Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
Makefile.common Add support for PAE (#599) 2022-01-14 21:19:54 +01:00
Makefile.i386 Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
Makefile.x86_64 Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
memory.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
msr.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
pae.c Add support for PAE (#599) 2022-01-14 21:19:54 +01:00
pcid.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
pku.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
pmu.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
port80.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
README Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
realmode.c import recent kvm-unit-test changes (fixes incorrectly failing push es test) 2022-11-26 14:11:19 -06:00
realmode.lds Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
rmap_chain.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
s3.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
setjmp.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
sieve.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
smap.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
smptest.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
svm.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
svm.h Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
syscall.c kvm-unit-test: Add missing files 2020-07-21 20:10:11 -05:00
taskswitch.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
taskswitch2.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
tsc.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
tsc_adjust.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
tscdeadline_latency.c Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
types.h Import kvm-unit-test into this repo 2017-04-29 13:22:17 -05:00
vmexit.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
vmx.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
vmx.h Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
vmx_tests.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00
xsave.c Update kvm-unit-test from upstream 2020-07-21 20:10:11 -05:00

Tests for the x86 architecture are run as kernel images for qemu that support
multiboot format. The tests use an infrastructure called from the bios code.
The infrastructure initialize the system/cpus, switches to long-mode, and
calls the 'main' function of the individual test. Tests use a qemu virtual
test device, named testdev, for services like printing, exiting, querying
memory size, etc. See file docs/testdev.txt for more details.

Examples of a test invocation:
 These invocations run the msr test case and outputs to stdio.

 Using qemu-kvm:

	qemu-kvm -device testdev,chardev=testlog \
		 -chardev file,id=testlog,path=msr.out \
		 -serial stdio -kernel ./x86/msr.flat

 Using qemu (supported since qemu 1.3):

	qemu-system-x86_64 -enable-kvm -device pc-testdev -serial stdio \
			   -device isa-debug-exit,iobase=0xf4,iosize=0x4 \
			   -kernel ./x86/msr.flat

Tests in this directory and what they do:
 access:	lots of page table related access (pte/pde) (read/write)
 apic:		enable x2apic, self ipi, ioapic intr, ioapic simultaneous
 emulator:	move to/from regs, cmps, push, pop, to/from cr8, smsw and lmsw
 hypercall:	intel and amd hypercall insn
 msr:		write to msr (only KERNEL_GS_BASE for now)
 port80:	lots of out to port 80
 realmode:	goes back to realmode, shld, push/pop, mov immediate, cmp
		immediate, add immediate, io, eflags instructions
		(clc, cli, etc.), jcc short, jcc near, call, long jmp, xchg
 sieve:		heavy memory access with no paging and with paging static and
		with paging vmalloc'ed
 smptest:	run smp_id() on every cpu and compares return value to number
 tsc:		write to tsc(0) and write to tsc(100000000000) and read it back
 vmexit:	long loops for each: cpuid, vmcall, mov_from_cr8, mov_to_cr8,
		inl_pmtimer, ipi, ipi+halt
 kvmclock_test:	test of wallclock, monotonic cycle and performance of kvmclock
 pcid:		basic functionality test of PCID/INVPCID feature

Legacy notes:
 The exit status of the binary is inconsistent; with qemu-system, after
 the unit-test is done, the exit status of qemu is 1, different from the
 'old style' qemu-kvm, whose exit status in successful completion is 0.
 The run script converts the qemu-system exit status to 0 (SUCCESS), and
 treats the legacy exit status of 0 as an error, converting it to an exit
 status of 1.