x86/kvm/nVMX: read from MSR_IA32_VMX_PROCBASED_CTLS2 only when it is available
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 7 Feb 2019 10:42:14 +0000 (11:42 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Feb 2019 14:16:01 +0000 (15:16 +0100)
commit6b1971c694975e49af302229202c0043568b1791
treefaff5becb86d9dc744f043c76247984f4207165c
parentd13937116f1e82bf508a6325111b322c30c85eb9
x86/kvm/nVMX: read from MSR_IA32_VMX_PROCBASED_CTLS2 only when it is available

SDM says MSR_IA32_VMX_PROCBASED_CTLS2 is only available "If
(CPUID.01H:ECX.[5] && IA32_VMX_PROCBASED_CTLS[63])". It was found that
some old cpus (namely "Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz (family: 0x6,
model: 0xf, stepping: 0x6") don't have it. Add the missing check.

Reported-by: Zdenek Kaspar <zkaspar82@gmail.com>
Tested-by: Zdenek Kaspar <zkaspar82@gmail.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c