Lines Matching +full:- +full:gp
1 // SPDX-License-Identifier: GPL-2.0-only
12 * the "real" exceptions used, #SS/#GP/#DF (12/13/8).
16 /* Arbitrary 32-bit error code injected by this test. */
38 * The #GP that occurs when vectoring #SS should show the index into the IDT
77 struct vmcb *vmcb = svm->vmcb; in svm_run_l2()
78 struct vmcb_control_area *ctrl = &vmcb->control; in svm_run_l2()
80 vmcb->save.rip = (u64)l2_code; in svm_run_l2()
81 run_guest(vmcb, svm->vmcb_gpa); in svm_run_l2()
86 GUEST_ASSERT_EQ(ctrl->exit_code, (SVM_EXIT_EXCP_BASE + vector)); in svm_run_l2()
87 GUEST_ASSERT_EQ(ctrl->exit_info_1, error_code); in svm_run_l2()
88 GUEST_ASSERT(!ctrl->int_state); in svm_run_l2()
93 struct vmcb_control_area *ctrl = &svm->vmcb->control; in l1_svm_code()
97 svm->vmcb->save.idtr.limit = 0; in l1_svm_code()
98 ctrl->intercept |= BIT_ULL(INTERCEPT_SHUTDOWN); in l1_svm_code()
100 ctrl->intercept_exceptions = INTERCEPT_SS_GP_DF; in l1_svm_code()
104 ctrl->intercept_exceptions = INTERCEPT_SS_DF; in l1_svm_code()
107 ctrl->intercept_exceptions = INTERCEPT_SS; in l1_svm_code()
109 GUEST_ASSERT_EQ(ctrl->exit_code, SVM_EXIT_SHUTDOWN); in l1_svm_code()
142 * and hardware will never generate a VM-Exit with bits 31:16 set. in l1_vmx_code()
179 TEST_ASSERT(vector == -1, in assert_ucall_vector()
214 * triggers a #GP on vectoring the #SS, morphs to #DF if #GP isn't intercepted
228 vm_enable_cap(vm, KVM_CAP_EXCEPTION_PAYLOAD, -2ul); in main()
243 vcpu->run->immediate_exit = true; in main()
256 * Run for real with the pending #SS, L1 should get a VM-Exit due to in main()
257 * #SS interception and re-enter L2 to request #GP (via injected #SS). in main()
259 vcpu->run->immediate_exit = false; in main()
264 * Inject #SS, the #SS should bypass interception and cause #GP, which in main()
266 * disable #GP interception and run L2 to request #DF (via #SS => #GP). in main()
273 * Inject #SS, the #SS should bypass interception and cause #GP, which in main()
274 * L1 is no longer interception, and so should see a #DF VM-Exit. L1 in main()
282 * Inject #SS yet again. L1 is not intercepting #GP or #DF, and so in main()
287 assert_ucall_vector(vcpu, -1); in main()