android_kernel_xiaomi_sm8450/arch/x86
Sean Christopherson 546751d9d4 KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection
commit 6c41468c7c12d74843bb414fc00307ea8a6318c3 upstream.

When injecting an exception into a vCPU in Real Mode, suppress the error
code by clearing the flag that tracks whether the error code is valid, not
by clearing the error code itself.  The "typo" was introduced by recent
fix for SVM's funky Paged Real Mode.

Opportunistically hoist the logic above the tracepoint so that the trace
is coherent with respect to what is actually injected (this was also the
behavior prior to the buggy commit).

Fixes: b97f07458373 ("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-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[nsaenz: backport to 5.10.y]
Signed-off-by: Nicolas Saenz Julienne <nsaenz@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sean Christopherson <seanjc@google.com>
2024-05-25 16:19:06 +02:00
..
boot x86/boot: Ignore NMIs during very early boot 2024-02-23 08:42:02 +01:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 10:54:21 +01:00
crypto crypto: x86/ghash - fix unaligned access in ghash_setkey() 2023-03-11 16:39:19 +01:00
entry x86/xen: Drop USERGS_SYSRET64 paravirt call 2024-05-25 16:19:05 +02:00
events x86: Share definition of __is_canonical_address() 2023-11-20 11:06:56 +01:00
hyperv x86/hyperv: Remove unregister syscore call from Hyper-V cleanup 2023-01-14 10:16:13 +01:00
ia32 x86: remove address space overrides using set_fs() 2020-09-08 22:21:36 -04:00
include x86/xen: Drop USERGS_SYSRET64 paravirt call 2024-05-25 16:19:05 +02:00
kernel x86/xen: Drop USERGS_SYSRET64 paravirt call 2024-05-25 16:19:05 +02:00
kvm KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection 2024-05-25 16:19:06 +02:00
lib x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk 2024-04-13 12:59:58 +02:00
math-emu x86: Prepare asm files for straight-line-speculation 2022-07-25 11:26:28 +02:00
mm x86/mm/pat: fix VM_PAT handling in COW mappings 2024-04-13 12:59:56 +02:00
net x86/returnthunk: Allow different return thunks 2024-03-01 13:16:49 +01:00
oprofile
pci x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot 2023-04-20 12:10:27 +02:00
platform x86/stackprotector/32: Make the canary into a regular percpu variable 2024-04-13 12:58:45 +02:00
power x86/stackprotector/32: Make the canary into a regular percpu variable 2024-04-13 12:58:45 +02:00
purgatory x86/purgatory: remove PGO flags 2023-06-21 15:45:37 +02:00
ras treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
realmode x86/mm: Flush global TLB when switching to trampoline page-table 2022-01-27 10:54:14 +01:00
tools x86, relocs: Ignore relocations in .notes section 2024-03-26 18:21:51 -04:00
um x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list 2023-03-11 16:40:11 +01:00
video
xen x86/xen: Drop USERGS_SYSRET64 paravirt call 2024-05-25 16:19:05 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:23:44 +02:00
Kconfig.assembler x86/delay: Introduce TPAUSE delay 2020-05-07 16:06:20 +02:00
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 08:42:28 +01:00
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
Makefile x86/stackprotector/32: Make the canary into a regular percpu variable 2024-04-13 12:58:45 +02:00
Makefile_32.cpu
Makefile.um um: allow not setting extra rpaths in the linux binary 2024-03-15 10:48:18 -04:00