Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 31) sorted by relevance

12

/kvm-unit-tests/x86/
H A Dsvm_tests.c40 static void null_test(struct svm_test *test) in null_test() argument
44 static bool null_check(struct svm_test *test) in null_check() argument
49 static void prepare_no_vmrun_int(struct svm_test *test) in prepare_no_vmrun_int() argument
54 static bool check_no_vmrun_int(struct svm_test *test) in check_no_vmrun_int() argument
59 static void test_vmrun(struct svm_test *test) in test_vmrun() argument
64 static bool check_vmrun(struct svm_test *test) in check_vmrun() argument
69 static void prepare_rsm_intercept(struct svm_test *test) in prepare_rsm_intercept() argument
71 default_prepare(test); in prepare_rsm_intercept()
76 static void test_rsm_intercept(struct svm_test *test) in test_rsm_intercept() argument
81 static bool check_rsm_intercept(struct svm_test *test) in check_rsm_intercept() argument
[all …]
H A Dsmap.c9 volatile unsigned test; variable
20 save = test; in do_pf_tss()
56 invlpg(&test); in init_test()
57 invlpg(&USER_VAR(test)); in init_test()
63 test = 0x99; in check_smap_nowp()
65 *get_pte(phys_to_virt(read_cr3()), USER_ADDR(test)) &= ~PT_WRITABLE_MASK; in check_smap_nowp()
73 USER_VAR(test) = 0x99; in check_smap_nowp()
81 (void)USER_VAR(test); in check_smap_nowp()
86 *get_pte(phys_to_virt(read_cr3()), USER_ADDR(test)) |= PT_WRITABLE_MASK; in check_smap_nowp()
131 test = 42; in main()
[all …]
H A Dpku.c14 volatile unsigned test; variable
30 save = test; in do_pf_tss()
57 invlpg(&test); in init_test()
58 invlpg(&USER_VAR(test)); in init_test()
99 test = 21; in main()
100 report(pf_count == 0 && test == 21, in main()
106 test = 22; in main()
107 report(pf_count == 0 && test == 22, in main()
113 test = 23; in main()
114 report(pf_count == 0 && test == 23, in main()
[all …]
H A Dpks.c14 volatile unsigned test; variable
31 save = test; in do_pf_tss()
58 invlpg(&test); in init_test()
59 invlpg(&SUPER_VAR(test)); in init_test()
102 SUPER_VAR(test) = 21; in main()
103 report(pf_count == 1 && test == 21 && save == 0, in main()
109 SUPER_VAR(test) = 22; in main()
110 report(pf_count == 1 && test == 22 && save == 21, in main()
116 SUPER_VAR(test) = 23; in main()
117 report(pf_count == 1 && test == 23 && save == 22, in main()
[all …]
H A Dvmexit.c13 struct test { struct
18 bool (*next)(struct test *); argument
345 static bool pci_next(struct test *test, unsigned long addr, bool io) in pci_next() argument
351 test->func = NULL; in pci_next()
355 iowriteb(addr + offsetof(struct pci_test_dev_hdr, test), in pci_next()
361 test->func = io ? pci_io_testb : pci_mem_testb; in pci_next()
364 test->func = io ? pci_io_testw : pci_mem_testw; in pci_next()
367 test->func = io ? pci_io_testl : pci_mem_testl; in pci_next()
372 test->func = NULL; in pci_next()
391 static bool pci_mem_next(struct test *test) in pci_mem_next() argument
[all …]
H A Dsvm.c82 void default_prepare(struct svm_test *test) in default_prepare() argument
87 void default_prepare_gif_clear(struct svm_test *test) in default_prepare_gif_clear() argument
91 bool default_finished(struct svm_test *test) in default_finished() argument
106 int get_test_stage(struct svm_test *test) in get_test_stage() argument
109 return test->scratch; in get_test_stage()
112 void set_test_stage(struct svm_test *test, int s) in set_test_stage() argument
115 test->scratch = s; in set_test_stage()
119 void inc_test_stage(struct svm_test *test) in inc_test_stage() argument
122 test->scratch++; in inc_test_stage()
147 static void test_thunk(struct svm_test *test) in test_thunk() argument
[all …]
H A Dsvm_npt.c8 static void null_test(struct svm_test *test) in null_test() argument
12 static void npt_np_prepare(struct svm_test *test) in npt_np_prepare() argument
22 static void npt_np_test(struct svm_test *test) in npt_np_test() argument
27 static bool npt_np_check(struct svm_test *test) in npt_np_check() argument
37 static void npt_nx_prepare(struct svm_test *test) in npt_nx_prepare() argument
41 test->scratch = rdmsr(MSR_EFER); in npt_nx_prepare()
42 wrmsr(MSR_EFER, test->scratch | EFER_NX); in npt_nx_prepare()
52 static bool npt_nx_check(struct svm_test *test) in npt_nx_check() argument
56 wrmsr(MSR_EFER, test->scratch); in npt_nx_check()
64 static void npt_us_prepare(struct svm_test *test) in npt_us_prepare() argument
[all …]
H A Dsvm.h378 void (*prepare)(struct svm_test *test);
379 void (*prepare_gif_clear)(struct svm_test *test);
380 void (*guest_func)(struct svm_test *test);
381 bool (*finished)(struct svm_test *test);
382 bool (*succeeded)(struct svm_test *test);
425 void default_prepare(struct svm_test *test);
426 void default_prepare_gif_clear(struct svm_test *test);
427 bool default_finished(struct svm_test *test);
430 int get_test_stage(struct svm_test *test);
431 void set_test_stage(struct svm_test *test, int s);
[all …]
H A DREADME5 calls the 'main' function of the individual test. Tests use a qemu virtual
6 test device, named testdev, for services like printing, exiting, querying
9 Examples of a test invocation:
10 These invocations run the msr test case and outputs to stdio.
39 kvmclock_test: test of wallclock, monotonic cycle and performance of kvmclock
40 pcid: basic functionality test of PCID/INVPCID feature
44 the unit-test is done, the exit status of qemu is 1, different from the
H A Ddebug.c97 static void __run_single_step_db_test(db_test_fn test, db_report_fn report_fn) in __run_single_step_db_test() argument
105 start = test(); in __run_single_step_db_test()
112 if (test == singlestep_with_movss_blocking_and_dr7_gd in __run_single_step_db_test()
113 || test == singlestep_with_sti_hlt) in __run_single_step_db_test()
126 run_in_user((usermode_func)test, GP_VECTOR, 0, 0, 0, 0, &ign); in __run_single_step_db_test()
H A Dvmx.c1837 static int test_run(struct vmx_test *test) in test_run() argument
1842 if (test->v2) { in test_run()
1844 if (test->init || test->guest_main || test->exit_handler || in test_run()
1845 test->syscall_handler) { in test_run()
1853 if (test->name == NULL) in test_run()
1854 test->name = "(no name)"; in test_run()
1860 init_vmcs(&(test->vmcs)); in test_run()
1863 if (test->init && test->init(test->vmcs) != VMX_TEST_START) in test_run()
1867 test->exits = 0; in test_run()
1868 current = test; in test_run()
[all …]
H A Dcstart64.S135 test $0x1000, %eax
/kvm-unit-tests/lib/
H A Dpci-testdev.c98 static bool pci_testdev_one(struct pci_test_dev_hdr *test, in pci_testdev_one() argument
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()
116 sig = ops->io_readl(&test->data); in pci_testdev_one()
117 off = ops->io_readl(&test->offset); in pci_testdev_one()
121 case 1: ops->io_writeb(sig, (void *)test + off); break; in pci_testdev_one()
122 case 2: ops->io_writew(sig, (void *)test + off); break; in pci_testdev_one()
123 case 4: ops->io_writel(sig, (void *)test + off); break; in pci_testdev_one()
127 count = ops->io_readl(&test->count); in pci_testdev_one()
[all …]
H A Dpci.h94 uint8_t test; member
/kvm-unit-tests/docs/
H A Dunittests.txt5 test cases by specifying an executable (target image) under the <arch>/
7 provide multiple test cases by being run with different host configurations
18 Each unit test is defined with a [unit-test-name] line, followed by
19 a set of parameters that control how the test case is run. The name is
22 Parameters appear on their own lines under the test name, and have a
27 Note! Some parameters like smp and extra_params modify how a test is run,
29 test is run.
42 the test to the specified arch. By default, the test will run on any
48 the test to the specified machine. By default, the test will run on
56 Optional, the number of processors created in the machine to run the test.
[all …]
/kvm-unit-tests/s390x/
H A Dexittime.c180 struct test { struct
235 static void report_iteration_result(struct test const* test, struct test_result const* test_result) in report_iteration_result() argument
237 uint64_t total = tod_to_ns(normalize_iters(test_result->total, test->iters)), in report_iteration_result()
238 best = tod_to_ns(normalize_iters(test_result->best, test->iters)), in report_iteration_result()
239 average = tod_to_ns(normalize_iters(test_result->average, test->iters)), in report_iteration_result()
240 worst = tod_to_ns(normalize_iters(test_result->worst, test->iters)); in report_iteration_result()
255 struct test const *current_test; in main()
H A Dselftest.parmfile1 test 123
/kvm-unit-tests/arm/
H A Dmicro-bench.c335 static void loop_test(struct exit_test *test) in loop_test() argument
341 if (test->prep) { in loop_test()
342 if(!test->prep()) { in loop_test()
343 printf("%s test skipped\n", test->name); in loop_test()
352 while (ntimes < test->times) { in loop_test()
353 test->exec(); in loop_test()
364 if (test->post) { in loop_test()
365 test->post(ntimes, &total_ticks); in loop_test()
373 test->name, total_ns.ns, total_ns.ns_frac, avg_ns.ns, avg_ns.ns_frac); in loop_test()
H A Dunittests.cfg41 [pci-test]
42 file = pci-test.flat
267 # FPU/SIMD test
/kvm-unit-tests/lib/x86/
H A Dfault_test.c48 void test_run(struct fault_test *test) in test_run() argument
50 bool passed = fault_test(&(test->arg)); in test_run()
52 report(passed, "%s", test->name); in test_run()
H A Dfault_test.h40 void test_run(struct fault_test *test);
/kvm-unit-tests/
H A DREADME9 This directory contains sources for a KVM test suite.
11 To create the test images do:
48 (send tests/some-test somewhere)
50 ./some-test
53 each as a standalone test.
59 invoke the test:
89 The test case may need specific runtime configurations, for
94 The configuration file also contain the groups (if any) each test belong
98 # Unit test inputs
108 may be passed with '-initrd file' to become the unit test's environ,
[all …]
H A DREADME.md9 This directory contains sources for a KVM test suite.
11 To create the test images do:
48 (send tests/some-test somewhere)
50 ./some-test
53 each as a standalone test.
59 invoke the test:
89 The test case may need specific runtime configurations, for
94 The configuration file also contain the groups (if any) each test belong
98 # Unit test inputs
108 may be passed with '-initrd file' to become the unit test's environ,
[all …]
H A D.shellcheckrc28 # place (time is dominated by qemu startup/shutdown and test execution)
/kvm-unit-tests/x86/efi/
H A DREADME.md5 This dir provides code to build kvm-unit-tests test cases and run them under
12 - [UEFI firmware](https://github.com/tianocore/edk2): to run test cases in QEMU
21 ### Run test cases with UEFI
23 To run a test case with UEFI:

12