KVM: VMX: Do not trap VMFUNC instructions for L1 guests.
authorYu Zhang <yu.c.zhang@linux.intel.com>
Wed, 9 Nov 2022 07:54:12 +0000 (15:54 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 7 Feb 2023 01:51:17 +0000 (01:51 +0000)
commit41acdd41973548aec573381e1166b5a388708d5b
treec2de3fb96d54c1799efc85bf5671c4ad4a9f6303
parent11df586d774f4aab1835144fd2a8dc3cb2add8d4
KVM: VMX: Do not trap VMFUNC instructions for L1 guests.

Explicitly disable VMFUNC in vmcs01 to document that KVM doesn't support
any VM-Functions for L1.  WARN in the dedicated VMFUNC handler if an exit
occurs while L1 is active, but keep the existing handlers as fallbacks to
avoid killing the VM as an unexpected VMFUNC VM-Exit isn't fatal

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Link: https://lore.kernel.org/r/20221109075413.1405803-2-yu.c.zhang@linux.intel.com
[sean: don't kill the VM on an unexpected VMFUNC from L1, reword changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c