lkml.org 
[lkml]   [2006]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 23/38] KVM: Use the idt and gdt accessors in realmode emulation
From
Date
Signed-off-by: Avi Kivity <avi@qumranet.com>

Index: linux-2.6/drivers/kvm/kvm_main.c
===================================================================
--- linux-2.6.orig/drivers/kvm/kvm_main.c
+++ linux-2.6/drivers/kvm/kvm_main.c
@@ -1225,14 +1225,16 @@ static u64 mk_cr_64(u64 curr_cr, u32 new

void realmode_lgdt(struct kvm_vcpu *vcpu, u16 limit, unsigned long base)
{
- vmcs_writel(GUEST_GDTR_BASE, base);
- vmcs_write32(GUEST_GDTR_LIMIT, limit);
+ struct descriptor_table dt = { limit, base };
+
+ kvm_arch_ops->set_gdt(vcpu, &dt);
}

void realmode_lidt(struct kvm_vcpu *vcpu, u16 limit, unsigned long base)
{
- vmcs_writel(GUEST_IDTR_BASE, base);
- vmcs_write32(GUEST_IDTR_LIMIT, limit);
+ struct descriptor_table dt = { limit, base };
+
+ kvm_arch_ops->set_idt(vcpu, &dt);
}

void realmode_lmsw(struct kvm_vcpu *vcpu, unsigned long msw,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-11-27 13:37    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site