KVM: get_tss_base_addr() should return a gpa_t
authorGleb Natapov <gleb@redhat.com>
Sun, 25 Oct 2009 15:42:02 +0000 (17:42 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Wed, 4 Nov 2009 14:42:36 +0000 (12:42 -0200)
If TSS we are switching to resides in high memory task switch will fail
since address will be truncated. Windows2k3 does this sometimes when
running with more then 4G

Cc: stable@kernel.org
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index 8a93fa8..ae07d26 100644 (file)
@@ -4051,7 +4051,7 @@ static int save_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector,
        return kvm_write_guest_virt(dtable.base + index*8, seg_desc, sizeof(*seg_desc), vcpu);
 }
 
-static u32 get_tss_base_addr(struct kvm_vcpu *vcpu,
+static gpa_t get_tss_base_addr(struct kvm_vcpu *vcpu,
                             struct desc_struct *seg_desc)
 {
        u32 base_addr = get_desc_base(seg_desc);