x86/kernel: Mark the .bss..decrypted section as shared in the RMP table
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 9 Feb 2022 18:10:13 +0000 (12:10 -0600)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Apr 2022 11:23:00 +0000 (13:23 +0200)
commitefac0eedfab515e523cde5cb7a62289eb2ee58f8
tree2ce7766a772a1edd3c5fe1a2dd7ff0155b5c997b
parent5e5ccff60a2977142d39b987a8b90e422d9fc634
x86/kernel: Mark the .bss..decrypted section as shared in the RMP table

The encryption attribute for the .bss..decrypted section is cleared in the
initial page table build. This is because the section contains the data
that need to be shared between the guest and the hypervisor.

When SEV-SNP is active, just clearing the encryption attribute in the
page table is not enough. The page state needs to be updated in the RMP
table.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220307213356.2797205-20-brijesh.singh@amd.com
arch/x86/kernel/head64.c