| From | Jim Mattson <> | Date | Wed, 6 Jul 2022 13:02:52 -0700 | Subject | Re: [PATCH v2 02/21] KVM: VMX: Drop bits 31:16 when shoving exception error code into VMCS |
| |
On Tue, Jun 14, 2022 at 1:47 PM Sean Christopherson <seanjc@google.com> wrote: > > Deliberately truncate the exception error code when shoving it into the > VMCS (VM-Entry field for vmcs01 and vmcs02, VM-Exit field for vmcs12). > Intel CPUs are incapable of handling 32-bit error codes and will never
Never say "never." :-)
> generate an error code with bits 31:16, but userspace can provide an > arbitrary error code via KVM_SET_VCPU_EVENTS. Failure to drop the bits > on exception injection results in failed VM-Entry, as VMX disallows > setting bits 31:16. Setting the bits on VM-Exit would at best confuse > L1, and at worse induce a nested VM-Entry failure, e.g. if L1 decided to > reinject the exception back into L2. > > Cc: stable@vger.kernel.org > Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Jim Mattson <jmattson@google.com>
|