Name Date Size #Lines LOC

..--

efi/H02-May-2025-467291

MakefileH A D02-May-202547 21

Makefile.commonH A D26-May-20254 KiB133100

Makefile.i386H A D02-May-2025341 1511

Makefile.x86_64H A D02-May-20252 KiB6852

READMEH A D02-May-20252.2 KiB4940

access.cH A D02-May-202532.8 KiB1,323995

access.hH A D02-May-2025178 96

access_test.cH A D02-May-2025608 2718

amd_sev.cH A D02-May-20252.3 KiB9867

apic.cH A D02-May-202523.4 KiB976690

asyncpf.cH A D02-May-20254 KiB15199

cet.cH A D02-May-20253.4 KiB13082

cmpxchg8b.cH A D02-May-2025525 2622

cstart.SH A D02-May-20251.8 KiB12599

cstart64.SH A D02-May-20252 KiB143108

debug.cH A D02-May-202515.8 KiB606440

dummy.cH A D02-May-2025282 136

emulator.cH A D02-May-202521.8 KiB842680

emulator64.cH A D02-May-202513.8 KiB492402

eventinj.cH A D02-May-202510.3 KiB434348

flat.ldsH A D02-May-2025490 2926

hypercall.cH A D02-May-20252.1 KiB9881

hyperv.cH A D02-May-20251.7 KiB7159

hyperv.hH A D02-May-20257.3 KiB237175

hyperv_clock.cH A D02-May-20255 KiB220167

hyperv_connections.cH A D02-May-20257.9 KiB333263

hyperv_stimer.cH A D02-May-202511 KiB472368

hyperv_synic.cH A D02-May-20253.7 KiB187152

idt_test.cH A D02-May-2025906 4235

init.cH A D02-May-20252.6 KiB131100

intel-iommu.cH A D02-May-20253.9 KiB16994

ioapic.cH A D02-May-202510.6 KiB526426

ioram.hH A D02-May-2025120 85

kvmclock.cH A D02-May-20256.9 KiB290208

kvmclock.hH A D02-May-2025903 4534

kvmclock_test.cH A D02-May-20254.5 KiB156124

la57.cH A D02-May-20259.6 KiB348244

lam.cH A D02-May-20257.9 KiB287176

memory.cH A D02-May-20251.2 KiB6138

msr.cH A D02-May-20259.6 KiB339234

pcid.cH A D02-May-20252.8 KiB13184

pks.cH A D02-May-20253.9 KiB148121

pku.cH A D02-May-20253.6 KiB147120

pmu.cH A D02-May-202525.7 KiB1,029771

pmu_lbr.cH A D02-May-20252.1 KiB10985

pmu_pebs.cH A D02-May-202512 KiB449368

rdpru.cH A D02-May-2025457 2418

realmode.cH A D02-May-202552.1 KiB1,8701,506

realmode.ldsH A D02-May-2025201 1312

rmap_chain.cH A D02-May-20251.1 KiB4836

runH A D02-May-20251.4 KiB5641

s3.cH A D02-May-20252 KiB8367

setjmp.cH A D02-May-2025405 2519

sieve.cH A D02-May-2025932 5544

smap.cH A D02-May-20254.7 KiB203158

smptest.cH A D02-May-2025532 3124

svm.cH A D02-May-20258.6 KiB425331

svm.hH A D02-May-202513.2 KiB501439

svm_npt.cH A D02-May-20258.4 KiB381269

svm_tests.cH A D02-May-202585.9 KiB3,4432,553

syscall.cH A D02-May-20253.6 KiB11674

taskswitch.cH A D02-May-2025823 5232

taskswitch2.cH A D02-May-20257 KiB295233

trampolines.SH A D02-May-20252.3 KiB13696

tsc.cH A D02-May-20251 KiB5745

tsc_adjust.cH A D02-May-2025978 3732

tscdeadline_latency.cH A D02-May-20252.8 KiB13287

tsx-ctrl.cH A D02-May-20251.6 KiB6143

umip.cH A D02-May-20255.1 KiB220190

unittests.cfgH A D02-May-202510.2 KiB498411

vmexit.cH A D02-May-202512.5 KiB630534

vmware_backdoors.cH A D02-May-20254.6 KiB182139

vmx.cH A D02-May-202554.2 KiB2,1461,685

vmx.hH A D02-May-202525.7 KiB1,056888

vmx_tests.cH A D02-May-2025315.9 KiB11,4948,193

xsave.cH A D02-May-20254.4 KiB137108

README

1
2Tests for the x86 architecture are run as kernel images for qemu that support
3multiboot format. The tests use an infrastructure called from the bios code.
4The infrastructure initialize the system/cpus, switches to long-mode, and
5calls the 'main' function of the individual test. Tests use a qemu virtual
6test device, named testdev, for services like printing, exiting, querying
7memory size, etc. See file docs/testdev.txt for more details.
8
9Examples of a test invocation:
10 These invocations run the msr test case and outputs to stdio.
11
12 Using qemu-kvm:
13
14	qemu-kvm -device testdev,chardev=testlog \
15		 -chardev file,id=testlog,path=msr.out \
16		 -serial stdio -kernel ./x86/msr.flat
17
18 Using qemu (supported since qemu 1.3):
19
20	qemu-system-x86_64 -enable-kvm -device pc-testdev -serial stdio \
21			   -device isa-debug-exit,iobase=0xf4,iosize=0x4 \
22			   -kernel ./x86/msr.flat
23
24Tests in this directory and what they do:
25 access:	lots of page table related access (pte/pde) (read/write)
26 apic:		enable x2apic, self ipi, ioapic intr, ioapic simultaneous
27 emulator:	move to/from regs, cmps, push, pop, to/from cr8, smsw and lmsw
28 hypercall:	intel and amd hypercall insn
29 msr:		write to msr (only KERNEL_GS_BASE for now)
30 realmode:	goes back to realmode, shld, push/pop, mov immediate, cmp
31		immediate, add immediate, io, eflags instructions
32		(clc, cli, etc.), jcc short, jcc near, call, long jmp, xchg
33 sieve:		heavy memory access with no paging and with paging static and
34		with paging vmalloc'ed
35 smptest:	run smp_id() on every cpu and compares return value to number
36 tsc:		write to tsc(0) and write to tsc(100000000000) and read it back
37 vmexit:	long loops for each: cpuid, vmcall, mov_from_cr8, mov_to_cr8,
38		inl_pmtimer, ipi, ipi+halt
39 kvmclock_test:	test of wallclock, monotonic cycle and performance of kvmclock
40 pcid:		basic functionality test of PCID/INVPCID feature
41
42Legacy notes:
43 The exit status of the binary is inconsistent; with qemu-system, after
44 the unit-test is done, the exit status of qemu is 1, different from the
45 'old style' qemu-kvm, whose exit status in successful completion is 0.
46 The run script converts the qemu-system exit status to 0 (SUCCESS), and
47 treats the legacy exit status of 0 as an error, converting it to an exit
48 status of 1.
49