Commit 51d19229 authored by Chao Peng's avatar Chao Peng Committed by Ben Hutchings

KVM: VMX: use correct vmcs_read/write for guest segment selector/base

commit 96794e4e upstream.

Guest segment selector is 16 bit field and guest segment base is natural
width field. Fix two incorrect invocations accordingly.

Without this patch, build fails when aggressive inlining is used with ICC.
Signed-off-by: default avatarChao Peng <chao.p.peng@linux.intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
[bwh: Backported to 3.16: drop change in kvm_flush_pml_buffers()]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 3959fd35
...@@ -3231,7 +3231,7 @@ static void fix_rmode_seg(int seg, struct kvm_segment *save) ...@@ -3231,7 +3231,7 @@ static void fix_rmode_seg(int seg, struct kvm_segment *save)
} }
vmcs_write16(sf->selector, var.selector); vmcs_write16(sf->selector, var.selector);
vmcs_write32(sf->base, var.base); vmcs_writel(sf->base, var.base);
vmcs_write32(sf->limit, var.limit); vmcs_write32(sf->limit, var.limit);
vmcs_write32(sf->ar_bytes, vmx_segment_access_rights(&var)); vmcs_write32(sf->ar_bytes, vmx_segment_access_rights(&var));
} }
......
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