linux-stable/arch
Tom Lendacky 15d9088779 x86/sev: Use large PSC requests if applicable
In advance of providing support for unaccepted memory, request 2M Page
State Change (PSC) requests when the address range allows for it. By using
a 2M page size, more PSC operations can be handled in a single request to
the hypervisor. The hypervisor will determine if it can accommodate the
larger request by checking the mapping in the nested page table. If mapped
as a large page, then the 2M page request can be performed, otherwise the
2M page request will be broken down into 512 4K page requests. This is
still more efficient than having the guest perform multiple PSC requests
in order to process the 512 4K pages.

In conjunction with the 2M PSC requests, attempt to perform the associated
PVALIDATE instruction of the page using the 2M page size. If PVALIDATE
fails with a size mismatch, then fallback to validating 512 4K pages. To
do this, page validation is modified to work with the PSC structure and
not just a virtual address range.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/050d17b460dfc237b51d72082e5df4498d3513cb.1686063086.git.thomas.lendacky@amd.com
2023-06-06 18:29:35 +02:00
..
alpha Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
arc Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
arm i.MX fixes for 6.4: 2023-05-25 17:22:38 +02:00
arm64 ARM: 2023-06-04 07:16:53 -04:00
csky arch/csky patches for 6.4 2023-05-04 12:25:05 -07:00
hexagon Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
ia64 Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
loongarch Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
m68k m68k: Move signal frame following exception on 68020/030 2023-05-22 13:51:20 +02:00
microblaze Kconfig: introduce HAS_IOPORT option and select it as necessary 2023-04-05 22:15:19 +02:00
mips mips: Move initrd_start check after initrd address sanitisation. 2023-05-23 11:01:38 +02:00
nios2 - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
openrisc Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
parisc parisc: Fix flush_dcache_page() for usage from irq context 2023-05-24 19:03:49 +02:00
powerpc powerpc/xmon: Use KSYM_NAME_LEN in array size 2023-05-30 16:46:56 +10:00
riscv RISC-V Fixes for 6.4-rc5 2023-06-02 13:47:36 -04:00
s390 s390 updates for 6.4-rc3 2023-05-19 11:11:04 -07:00
sh Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
sparc Locking changes in v6.4: 2023-05-05 12:56:55 -07:00
um um: harddog: fix modular build 2023-05-10 00:21:30 +02:00
x86 x86/sev: Use large PSC requests if applicable 2023-06-06 18:29:35 +02:00
xtensa Xtensa fixes for v6.4: 2023-05-23 15:21:34 -07:00
.gitignore
Kconfig