[PATCH] KVM - Fix rmode_tss_base declaration

Jeff Dike
2007-06-06T19:19:25Z

The long return value of rmode_tss_base is truncated by its declared
return type of int.

Signed-off-by: Jeff Dike <jdike-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
--
drivers/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: kvm/drivers/kvm/vmx.c
===================================================================
--- kvm.orig/drivers/kvm/vmx.c
+++ kvm/drivers/kvm/vmx.c
@@ -884,7 +884,7 @@ static void enter_pmode(struct kvm_vcpu
vmcs_write32(GUEST_CS_AR_BYTES, 0x9b);
}

-static int rmode_tss_base(struct kvm* kvm)
+static unsigned long rmode_tss_base(struct kvm* kvm)
{
gfn_t base_gfn = kvm->memslots[0].base_gfn + kvm->memslots[0].npages - 3;
return base_gfn << PAGE_SHIFT;