Skip to contentSkip to conversation

KVM: x86: Use native_store_idt() instead of kvm_get_idt()

PATCH Applied Wei Yongjun 2 participants 2 messages Mar 5, 2010 – Mar 15, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86: Use native_store_idt() instead of kvm_get_idt()

This patch use generic linux function native_store_idt() instead of kvm_get_idt(), and also removed the useless function kvm_get_idt().

---
 arch/x86/include/asm/kvm_host.h |    5 -----
 arch/x86/kvm/vmx.c              |    2 +-
 2 files changed, 1 insertions(+), 6 deletions(-)
arch/x86/include/asm/kvm_host.h +0 -5
index ec891a2..ea1b6c6 100644
@@ -716,11 +716,6 @@ static inline void kvm_load_ldt(u16 sel)
 	asm("lldt %0" : : "rm"(sel));
 }
 
-static inline void kvm_get_idt(struct desc_ptr *table)
-{
-	asm("sidt %0" : "=m"(*table));
-}
-
 #ifdef CONFIG_X86_64
 static inline unsigned long read_msr(unsigned long msr)
 {
arch/x86/kvm/vmx.c +1 -1
index ae3217d..a08929a 100644
@@ -2445,7 +2445,7 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
 
 	vmcs_write16(HOST_TR_SELECTOR, GDT_ENTRY_TSS*8);  /* 22.2.4 */
 
-	kvm_get_idt(&dt);
+	native_store_idt(&dt);
 	vmcs_writel(HOST_IDTR_BASE, dt.address);   /* 22.2.4 */
 
 	asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 9 lines · Wei Yongjun

This patch use generic linux function native_store_idt() instead of kvm_get_idt(), and also removed the useless function kvm_get_idt().

---
 arch/x86/include/asm/kvm_host.h |    5 -----
 arch/x86/kvm/vmx.c              |    2 +-
 2 files changed, 1 insertions(+), 6 deletions(-)

Applied, thanks.