diff mbox series

[RFC,11/18] KVM: x86: Call kvm_x86_ops.set_*dt() directly when leaving SMM

Message ID 20190328175557.14408-12-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: clear HF_SMM_MASK before loading state | expand

Commit Message

Sean Christopherson March 28, 2019, 5:55 p.m. UTC
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kvm/x86.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9d0c06c88c89..45a1a98e4a81 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7715,11 +7715,11 @@  static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, u64 smbase)
 
 	dt.address =               GET_SMSTATE(u32, smbase, 0x7f74);
 	dt.size =                  GET_SMSTATE(u32, smbase, 0x7f70);
-	ctxt->ops->set_gdt(ctxt, &dt);
+	kvm_x86_ops->set_gdt(vcpu, &dt);
 
 	dt.address =               GET_SMSTATE(u32, smbase, 0x7f58);
 	dt.size =                  GET_SMSTATE(u32, smbase, 0x7f54);
-	ctxt->ops->set_idt(ctxt, &dt);
+	kvm_x86_ops->set_idt(vcpu, &dt);
 
 	for (i = 0; i < 6; i++) {
 		int r = rsm_load_seg_32(ctxt, smbase, i);
@@ -7771,7 +7771,7 @@  static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
 
 	dt.size =                   GET_SMSTATE(u32, smbase, 0x7e84);
 	dt.address =                GET_SMSTATE(u64, smbase, 0x7e88);
-	ctxt->ops->set_idt(ctxt, &dt);
+	kvm_x86_ops->set_idt(vcpu, &dt);
 
 	selector =                  GET_SMSTATE(u32, smbase, 0x7e70);
 	rsm_set_desc_flags(&desc,   GET_SMSTATE(u32, smbase, 0x7e72) << 8);
@@ -7782,7 +7782,7 @@  static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
 
 	dt.size =                   GET_SMSTATE(u32, smbase, 0x7e64);
 	dt.address =                GET_SMSTATE(u64, smbase, 0x7e68);
-	ctxt->ops->set_gdt(ctxt, &dt);
+	kvm_x86_ops->set_gdt(vcpu, &dt);
 
 	r = rsm_enter_protected_mode(vcpu, cr0, cr3, cr4);
 	if (r != X86EMUL_CONTINUE)