summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-08-21 17:06:59 +0300
committerMarcelo Tosatti <mtosatti@redhat.com>2012-08-27 20:02:19 -0300
commit72fbefec26841699fee9ad0b050624aeb43d5bae (patch)
tree29225136e26d4bac235d95e24201bf9488be9a3c /arch/x86/kvm/vmx.c
parentbaa7e81e325bbb6ddebd7680ac1068859244b61d (diff)
downloadlinux-72fbefec26841699fee9ad0b050624aeb43d5bae.tar.gz
linux-72fbefec26841699fee9ad0b050624aeb43d5bae.tar.bz2
linux-72fbefec26841699fee9ad0b050624aeb43d5bae.zip
KVM: VMX: Fix incorrect lookup of segment S flag in fix_pmode_dataseg()
fix_pmode_dataseg() looks up S in ->base instead of ->ar_bytes. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4e49caf9224d..1d93079432b3 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2693,11 +2693,11 @@ static __exit void hardware_unsetup(void)
free_kvm_area();
}
-static void fix_pmode_dataseg(int seg, struct kvm_save_segment *save)
+static void fix_pmode_dataseg(int seg, struct kvm_segment *save)
{
struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
- if (vmcs_readl(sf->base) == save->base && (save->base & AR_S_MASK)) {
+ if (vmcs_readl(sf->base) == save->base && (save->ar_bytes & AR_S_MASK)) {
vmcs_write16(sf->selector, save->selector);
vmcs_writel(sf->base, save->base);
vmcs_write32(sf->limit, save->limit);