OpenCloudOS-Kernel/arch/x86/kvm/vmx
Sean Christopherson 80962ec912 KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode
Don't report an error code to L1 when synthesizing a nested VM-Exit and
L2 is in Real Mode.  Per Intel's SDM, regarding the error code valid bit:

  This bit is always 0 if the VM exit occurred while the logical processor
  was in real-address mode (CR0.PE=0).

The bug was introduced by a recent fix for AMD's Paged Real Mode, which
moved the error code suppression from the common "queue exception" path
to the "inject exception" path, but missed VMX's "synthesize VM-Exit"
path.

Fixes: b97f074583 ("KVM: x86: determine if an exception has an error code only when injecting it.")
Cc: stable@vger.kernel.org
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230322143300.2209476-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-03-27 10:15:11 -04:00
..
capabilities.h KVM: VMX: Make VMCS configuration/capabilities structs read-only after init 2022-12-29 15:41:25 -05:00
hyperv.c KVM: x86: Move CPU compat checks hook to kvm_x86_ops (from kvm_x86_init_ops) 2022-12-29 15:48:28 -05:00
hyperv.h KVM: VMX: Fix crash due to uninitialized current_vmcs 2023-02-07 09:02:50 -08:00
nested.c KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode 2023-03-27 10:15:11 -04:00
nested.h KVM: nVMX: Reword comments about generating nested CR0/4 read shadows 2022-11-30 16:27:17 -08:00
pmu_intel.c KVM: x86/pmu: Cap kvm_pmu_cap.num_counters_gp at KVM's internal max 2023-01-26 18:03:42 -08:00
posted_intr.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
posted_intr.h KVM: VMX: enable IPI virtualization 2022-06-08 04:47:37 -04:00
run_flags.h KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS 2022-06-27 10:34:00 +02:00
sgx.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
sgx.h KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC 2021-04-20 04:18:56 -04:00
vmcs.h KVM: VMX: Handle NMI VM-Exits in noinstr region 2023-01-24 10:36:41 -08:00
vmcs12.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
vmcs12.h bug: introduce ASSERT_STRUCT_OFFSET 2022-11-09 12:31:16 -05:00
vmcs_shadow_fields.h KVM: Fix some out-dated function names in comment 2020-01-21 13:57:27 +01:00
vmenter.S KVM: VMX: Use tabs instead of spaces for indentation 2023-03-14 09:40:55 -04:00
vmx.c KVM: VMX: Fix indentation coding style issue 2023-03-14 09:40:55 -04:00
vmx.h KVM: VMX: Always inline to_vmx() and to_kvm_vmx() 2023-01-24 10:36:40 -08:00
vmx_ops.h KVM: VMX: Allow VM-Fail path of VMREAD helper to be instrumented 2023-01-24 10:36:26 -08:00