Sean Christopherson d6e656cd26 KVM: nVMX: WARN on any attempt to allocate shadow VMCS for vmcs02
WARN if KVM attempts to allocate a shadow VMCS for vmcs02.  KVM emulates
VMCS shadowing but doesn't virtualize it, i.e. KVM should never allocate
a "real" shadow VMCS for L2.

The previous code WARNed but continued anyway with the allocation,
presumably in an attempt to avoid NULL pointer dereference.
However, alloc_vmcs (and hence alloc_shadow_vmcs) can fail, and
indeed the sole caller does:

	if (enable_shadow_vmcs && !alloc_shadow_vmcs(vcpu))
		goto out_shadow_vmcs;

which makes it not a useful attempt.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220125220527.2093146-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-26 12:15:04 -05:00
..
2021-11-25 14:26:12 +01:00
2021-11-17 10:36:15 -05:00
2022-01-09 10:43:16 -08:00
2021-12-08 14:15:54 +08:00
2021-11-08 09:15:45 -08:00
2021-11-20 10:35:54 -08:00
2021-11-25 14:26:12 +01:00
2021-11-25 10:41:28 -08:00
2021-11-17 10:36:15 -05:00
2021-11-17 10:36:15 -05:00
2021-12-22 09:02:10 +01:00
2021-11-25 10:41:28 -08:00
2021-11-25 10:41:28 -08:00
2021-11-25 10:41:28 -08:00