Lines Matching full:test

2  * All test cases of nested virtualization should be in this file
75 report_pass("Basic VMX test"); in basic_guest_main()
80 report_fail("Basic VMX test"); in basic_exit_handler()
90 report_pass("test vmlaunch"); in vmenter_main()
100 report((rax == 0xFFFF) && (rsp == resume_rsp), "test vmresume"); in vmenter_main()
110 report_fail("test vmresume"); in vmenter_exit_handler()
117 report_fail("test vmresume"); in vmenter_exit_handler()
453 // Test read through in cr_shadowing_main()
466 // Test write through in cr_shadowing_main()
481 // Test read shadow in cr_shadowing_main()
491 // Test write shadow (same value with shadow) in cr_shadowing_main()
504 // Test write shadow (different value) in cr_shadowing_main()
655 // stage 0, test IO pass in iobmp_main()
660 // test IO width, in/out in iobmp_main()
671 // test low/high IO port in iobmp_main()
680 // test partial pass in iobmp_main()
684 // test overrun in iobmp_main()
879 * Add more test cases of instruction intercept here. Elements in this
882 * instruction info/field to test
1217 // Test EPT Misconfigurations in ept_common()
1230 // Test EPT violation in ept_common()
1256 // Test EPT access to L1 MMIO in ept_main()
1260 // Test invalid operand for INVEPT in ept_main()
2110 /* Test that #UD is properly injected in L2. */ in disable_rdtscp_main()
2370 /* Disable for now otherwise every test will fail */ in do_ept_violation()
2440 * with wonky addresses. We don't test that yet.
2480 * constructed our test such that those other 511 PTEs aren't used by in ept_access_paddr()
2761 /* We use data->gpa = 1 << 39 so that test data has a separate pml4 entry */ in ept_access_test_setup()
2763 test_skip("Test needs MAXPHYADDR >= 40"); in ept_access_test_setup()
3082 * TODO: test no EPT violation as long as guest PF occurs. e.g., GPA is in ept_access_test_paddr_not_present_page_fault()
3277 * This does not test real-address mode, virtual-8086 mode, protected mode,
3346 * This version is wildly unsafe and should _only_ be used to test VM-Fail
3356 * consistency checks and generates a VM-Exit, then the test is doomed in test_vmx_vmlaunch_must_fail()
3364 * Test for early VMLAUNCH failure. Returns true if VMLAUNCH makes it
3439 * Test a particular value of a VM-execution control bit, if the value
3456 * test turning on bits that have a required setting. in test_rsvd_ctl_bit_value()
3481 * Test reserved values of a VM-execution control bit, based on the
3607 * Test a particular address setting in the VMCS
3631 * Test interesting values for a VMCS address
3661 * Test a physical address reference in the VMCS, when the corresponding
3828 * First test in test_apic_virtual_ctls()
3870 * Second test in test_apic_virtual_ctls()
3995 * Test virtual-interrupt-delivery and acknowledge-interrupt-on-exit in test_posted_intr()
4036 * Test posted-interrupt notification vector in test_posted_intr()
4060 * Test posted-interrupt descriptor address in test_posted_intr()
4461 * Test interesting vTPR values for a given TPR threshold.
4495 * Test interesting TPR threshold values.
4510 * This test covers the following two VM entry checks:
4608 * This test verifies the following two vmentry checks:
4990 * Prepare for the 'MOV CR3' test. Attempt to induce a in test_mtf_guest()
4996 * for the instruction under test. in test_mtf_guest()
5428 static void test_guest_state(const char *test, bool xfail, u64 field, in test_guest_state() argument
5444 "%s, %s = %lx", test, field_name, field); in test_guest_state()
5739 * Test that the secondary processor-based VM-execution controls are
5764 * Test that the APIC access address is treated like an arbitrary memory
5779 * Test that VM entry fails due to invalid controls when
5795 * Test that VM entry fails due to invalid controls when
5821 * Test that VM entry fails due to invalid controls when
6177 printf("--- %s test ---\n", apic_reg_test->name); in apic_reg_virt_test()
6197 report_fail("Malformed test."); in apic_reg_virt_test()
6350 * APIC-write VM exit. We plan to add a test for enabling in get_x2apic_wr_val()
6352 * will test a self IPI with special processing. in get_x2apic_wr_val()
6966 printf("--- %s test ---\n", virt_x2apic_mode_test_case->name); in virt_x2apic_mode_test()
7062 /* Test CR0 */ in test_host_ctl_regs()
7067 /* Test CR4 */ in test_host_ctl_regs()
7073 /* Test CR3 */ in test_host_ctl_regs()
7099 test_guest_state("EFER test", !ok, GUEST_EFER, "GUEST_EFER"); in test_efer_vmlaunch()
7125 * Skip the test if it would enter the guest in 32-bit mode. in test_efer_one()
7126 * Perhaps write the test in assembly and make sure it in test_efer_one()
7276 * in with "8". We only test values above 8 one bit at a time,
7294 /* Test PAT0..PAT7 fields */ in test_pat()
7312 /* Test PAT0..PAT7 fields */ in test_pat()
7450 * "load IA32_PERF_GLOBAL_CTRL" VM-{Entry,Exit} controls. This test function
7454 * @name: Name of the above VMCS field for printing in test report
7552 * test_vmcs_field - test a value for the given VMCS field
7607 * tested and likely hose the test. in test_canonical()
7615 test_guest_state("Test canonical address", false, in test_canonical()
7627 test_guest_state("Test non-canonical address", true, in test_canonical()
7656 * Test RPL and TI flags in test_host_segment_regs()
7667 * Test that CS and TR fields can not be 0x0000 in test_host_segment_regs()
7759 * CR4 and RIP may still hold a test value. Running with the test CR4 in test_host_addr_size()
7902 #define TEST_SEGMENT_SEL(test, xfail, sel, val) \ argument
7905 test_guest_state(test " segment", xfail, val, xstr(sel)); \
7934 * Test for GUEST_SEL_TR in test_guest_segment_sel_fields()
7941 * Test for GUEST_SEL_LDTR in test_guest_segment_sel_fields()
7959 * Test for GUEST_SEL_SS in test_guest_segment_sel_fields()
8178 test_guest_state("Unrestricted guest test", false, CPU_URG, "CPU_URG"); in vmentry_unrestricted_guest_test()
8364 * result of bad memory) would happen during this test. in vmx_cr_load_test()
8377 * the first entry needs to be filled (the test's virtual addresses in vmx_cr_load_test()
8853 * This test ensures that when IA32_TSC is in the VM-exit MSR-store
8938 * This test ensures that when the VMX preemption timer is zero at
9054 * passing this test doesn't ensure correctness, because the test will
9124 * Test that the VMX-preemption timer is not excessively delayed.
9365 * Optional RTM test for hardware that supports RTM, to in vmx_db_test()
9584 /* Test device is required for generating IRQs */ in vmx_apic_passthrough()
9586 report_skip("%s : No test device enabled", __func__); in vmx_apic_passthrough()
9715 /* VMCLEAR test-vmcs so it could be loaded by BSP CPU */ in init_signal_test_thread()
9770 /* VMCLEAR test-vmcs so it could be loaded by other CPU */ in vmx_init_signal_test()
9790 * have proceed as usual to next test stage as INIT in vmx_init_signal_test()
9887 /* Test is done, notify AP to exit test */ in vmx_sipi_test_guest()
9894 /* wait BSP notify test is done */ in vmx_sipi_test_guest()
10245 /* Run test on all possible valid VMCS fields */ in vmx_vmcs_shadow_test_body()
10313 * This test monitors the difference between a guest RDTSC instruction
10570 test_skip("Test is only supported on KVM"); in atomic_switch_overflow_msrs_test()
11102 * kvm-unit-tests uses vector 32 for IPIs, so don't install a test ISR in set_isrs_for_vmx_basic_vid_test()
11131 * Test virtual interrupt delivery (VID) at VM-entry or TPR virtualization
11134 * nr: vector under test
11135 * tpr: task priority under test
11136 * tpr_virt: If true, then test VID during TPR virtualization. Otherwise,
11137 * test VID during VM-entry.
11208 * Test recognizing and delivering virtual interrupts via "Virtual-interrupt
11238 * Don't test the reserved IPI vector, as the test ISR in vmx_basic_vid_test()
11296 /* Now test EOI virtualization without induced EOI exits. */ in vmx_eoi_virt_test()
11306 /* Finally, test EOI virtualization with induced EOI exits. */ in vmx_eoi_virt_test()
11358 * Only test posted interrupts to a halted vCPU if the in vmx_posted_interrupts_test()
11379 #define TEST(name) { #name, .v2 = name } macro
11416 TEST(v2_null_test),
11417 TEST(v2_multiple_entries_test),
11418 TEST(fixture_test_case1),
11419 TEST(fixture_test_case2),
11421 TEST(invvpid_test),
11423 TEST(vmx_controls_test),
11424 TEST(vmx_host_state_area_test),
11425 TEST(vmx_guest_state_area_test),
11426 TEST(vmentry_movss_shadow_test),
11427 TEST(vmentry_unrestricted_guest_test),
11429 TEST(vmx_eoi_bitmap_ioapic_scan_test),
11430 TEST(vmx_hlt_with_rvi_test),
11431 TEST(apic_reg_virt_test),
11432 TEST(virt_x2apic_mode_test),
11433 TEST(vmx_basic_vid_test),
11434 TEST(vmx_eoi_virt_test),
11435 TEST(vmx_posted_interrupts_test),
11437 TEST(vmx_apic_passthrough_test),
11438 TEST(vmx_apic_passthrough_thread_test),
11439 TEST(vmx_apic_passthrough_tpr_threshold_test),
11440 TEST(vmx_init_signal_test),
11441 TEST(vmx_sipi_signal_test),
11443 TEST(vmx_vmcs_shadow_test),
11445 TEST(vmx_ldtr_test),
11446 TEST(vmx_cr_load_test),
11447 TEST(vmx_cr4_osxsave_test),
11448 TEST(vmx_no_nm_test),
11449 TEST(vmx_db_test),
11450 TEST(vmx_nmi_window_test),
11451 TEST(vmx_intr_window_test),
11452 TEST(vmx_pending_event_test),
11453 TEST(vmx_pending_event_hlt_test),
11454 TEST(vmx_store_tsc_test),
11455 TEST(vmx_preemption_timer_zero_test),
11456 TEST(vmx_preemption_timer_tf_test),
11457 TEST(vmx_preemption_timer_expiry_test),
11459 TEST(ept_access_test_not_present),
11460 TEST(ept_access_test_read_only),
11461 TEST(ept_access_test_write_only),
11462 TEST(ept_access_test_read_write),
11463 TEST(ept_access_test_execute_only),
11464 TEST(ept_access_test_read_execute),
11465 TEST(ept_access_test_write_execute),
11466 TEST(ept_access_test_read_write_execute),
11467 TEST(ept_access_test_reserved_bits),
11468 TEST(ept_access_test_ignored_bits),
11469 TEST(ept_access_test_paddr_not_present_ad_disabled),
11470 TEST(ept_access_test_paddr_not_present_ad_enabled),
11471 TEST(ept_access_test_paddr_read_only_ad_disabled),
11472 TEST(ept_access_test_paddr_read_only_ad_enabled),
11473 TEST(ept_access_test_paddr_read_write),
11474 TEST(ept_access_test_paddr_read_write_execute),
11475 TEST(ept_access_test_paddr_read_execute_ad_disabled),
11476 TEST(ept_access_test_paddr_read_execute_ad_enabled),
11477 TEST(ept_access_test_paddr_not_present_page_fault),
11478 TEST(ept_access_test_force_2m_page),
11480 TEST(atomic_switch_max_msrs_test),
11481 TEST(atomic_switch_overflow_msrs_test),
11482 TEST(rdtsc_vmexit_diff_test),
11483 TEST(vmx_mtf_test),
11484 TEST(vmx_mtf_pdpte_test),
11485 TEST(vmx_pf_exception_test),
11486 TEST(vmx_pf_exception_forced_emulation_test),
11487 TEST(vmx_pf_no_vpid_test),
11488 TEST(vmx_pf_invvpid_test),
11489 TEST(vmx_pf_vpid_test),
11490 TEST(vmx_exception_test),
11491 TEST(vmx_canonical_test),