[PATCH 23/38] KVM: Use the idt and gdt accessors in realmode emulation

From: Avi Kivity
Date: Mon Nov 27 2006 - 07:33:59 EST


Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/