summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/vmx.c
diff options
context:
space:
mode:
authorJim Mattson2018-12-06 00:28:59 +0100
committerPaolo Bonzini2018-12-14 17:59:48 +0100
commit898a811f1486df3209ce857027d0564d6a616cf2 (patch)
treea60697326daf78c1a8d8af20433f86c541352747 /arch/x86/kvm/vmx/vmx.c
parentkvm: vmx: Set IA32_TSC_AUX for legacy mode guests (diff)
downloadkernel-qcow2-linux-898a811f1486df3209ce857027d0564d6a616cf2.tar.gz
kernel-qcow2-linux-898a811f1486df3209ce857027d0564d6a616cf2.tar.xz
kernel-qcow2-linux-898a811f1486df3209ce857027d0564d6a616cf2.zip
kvm: vmx: Document the need for MSR_STAR in i386 builds
Add a comment explaining why MSR_STAR must be included in vmx_msr_index[] even for i386 builds. The elided comment has not been relevant since move_msr_up() was introduced in commit a75beee6e4f5d ("KVM: VMX: Avoid saving and restoring msrs on lightweight vmexit"). Signed-off-by: Jim Mattson <jmattson@google.com> Reviewed-by: Peter Shier <pshier@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.c')
-rw-r--r--arch/x86/kvm/vmx/vmx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c1feb62faac4..d754fd0c8674 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -373,8 +373,11 @@ static const struct kvm_vmx_segment_field {
u64 host_efer;
/*
- * Keep MSR_STAR at the end, as setup_msrs() will try to optimize it
- * away by decrementing the array size.
+ * Though SYSCALL is only supported in 64-bit mode on Intel CPUs, kvm
+ * will emulate SYSCALL in legacy mode if the vendor string in guest
+ * CPUID.0:{EBX,ECX,EDX} is "AuthenticAMD" or "AMDisbetter!" To
+ * support this emulation, IA32_STAR must always be included in
+ * vmx_msr_index[], even in i386 builds.
*/
const u32 vmx_msr_index[] = {
#ifdef CONFIG_X86_64