platform_kernel-5.15/arch/x86
Suravee Suthikulpanit 20633216de KVM: SVM: Allow AVIC support on system w/ physical APIC ID > 255
commit 4a204f7895878363ca8211f50ec610408c8c70aa upstream.

Expand KVM's mask for the AVIC host physical ID to the full 12 bits defined
by the architecture.  The number of bits consumed by hardware is model
specific, e.g. early CPUs ignored bits 11:8, but there is no way for KVM
to enumerate the "true" size.  So, KVM must allow using all bits, else it
risks rejecting completely legal x2APIC IDs on newer CPUs.

This means KVM relies on hardware to not assign x2APIC IDs that exceed the
"true" width of the field, but presumably hardware is smart enough to tie
the width to the max x2APIC ID.  KVM also relies on hardware to support at
least 8 bits, as the legacy xAPIC ID is writable by software.  But, those
assumptions are unavoidable due to the lack of any way to enumerate the
"true" width.

Cc: stable@vger.kernel.org
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Fixes: 44a95dae1d ("KVM: x86: Detect and Initialize AVIC support")
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Message-Id: <20220211000851.185799-1-suravee.suthikulpanit@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[modified due to the conflict caused by the commit 391503528257 ("KVM:
x86: SVM: move avic definitions from AMD's spec to svm.h")]
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13 20:59:25 +02:00
..
boot x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS 2022-01-27 11:03:47 +01:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 11:04:56 +01:00
crypto crypto: x86/aesni - don't require alignment of data 2022-01-27 11:02:51 +01:00
entry x86/xen: Add xenpv_restore_regs_and_return_to_usermode() 2021-12-08 09:04:54 +01:00
events perf/x86/intel: Don't extend the pseudo-encoding to GP counters 2022-04-13 20:59:23 +02:00
hyperv x86/hyperv: Properly deal with empty cpumasks in hyperv_flush_tlb_multi() 2022-03-08 19:12:36 +01:00
ia32 binfmt: remove in-tree usage of MAP_DENYWRITE 2021-09-03 18:42:01 +02:00
include perf/x86/intel: Don't extend the pseudo-encoding to GP counters 2022-04-13 20:59:23 +02:00
kernel rtc: Check return value from mc146818_get_time() 2022-04-13 20:59:14 +02:00
kvm KVM: SVM: Allow AVIC support on system w/ physical APIC ID > 255 2022-04-13 20:59:25 +02:00
lib x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE 2022-03-11 12:22:31 +01:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm x86/mm/tlb: Revert retpoline avoidance approach 2022-04-13 20:59:23 +02:00
net bpf: Fix extable address check. 2021-12-22 09:32:50 +01:00
pci PCI/sysfs: Find shadow ROM before static attribute initialization 2022-02-01 17:27:05 +01:00
platform x86/sme: Explicitly map new EFI memmap table as encrypted 2021-12-14 10:57:08 +01:00
power x86/speculation: Restore speculation related MSRs during S3 resume 2022-04-13 20:59:22 +02:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode x86/mm: Flush global TLB when switching to trampoline page-table 2022-01-27 11:04:35 +01:00
tools - Remove cc-option checks which are old and already supported by the 2021-08-30 13:27:16 -07:00
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 11:04:48 +01:00
video
xen xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32 2022-04-13 20:59:12 +02:00
.gitignore
Kbuild
Kconfig x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy 2022-04-13 20:59:13 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu x86/build: Do not add -falign flags unconditionally for clang 2021-09-19 10:35:53 +09:00