Commit 72fbefec authored by Avi Kivity's avatar Avi Kivity Committed by Marcelo Tosatti

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: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent baa7e81e
...@@ -2693,11 +2693,11 @@ static __exit void hardware_unsetup(void) ...@@ -2693,11 +2693,11 @@ static __exit void hardware_unsetup(void)
free_kvm_area(); 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]; 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_write16(sf->selector, save->selector);
vmcs_writel(sf->base, save->base); vmcs_writel(sf->base, save->base);
vmcs_write32(sf->limit, save->limit); vmcs_write32(sf->limit, save->limit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment