summaryrefslogtreecommitdiffstats
path: root/mm/percpu-stats.c
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-09-14 15:45:58 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-09-15 20:48:45 +0200
commitb3f0907c71e006e12fde74ea9a745b6096b6f90f (patch)
treedb20afaf037c1228abafd1e2b6718f68698f0d35 /mm/percpu-stats.c
parentMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadlinux-b3f0907c71e006e12fde74ea9a745b6096b6f90f.tar.xz
linux-b3f0907c71e006e12fde74ea9a745b6096b6f90f.zip
x86/mm: Add .bss..decrypted section to hold shared variables
kvmclock defines few static variables which are shared with the hypervisor during the kvmclock initialization. When SEV is active, memory is encrypted with a guest-specific key, and if the guest OS wants to share the memory region with the hypervisor then it must clear the C-bit before sharing it. Currently, we use kernel_physical_mapping_init() to split large pages before clearing the C-bit on shared pages. But it fails when called from the kvmclock initialization (mainly because the memblock allocator is not ready that early during boot). Add a __bss_decrypted section attribute which can be used when defining such shared variable. The so-defined variables will be placed in the .bss..decrypted section. This section will be mapped with C=0 early during boot. The .bss..decrypted section has a big chunk of memory that may be unused when memory encryption is not active, free it when memory encryption is not active. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Borislav Petkov <bp@suse.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: Radim Krčmář<rkrcmar@redhat.com> Cc: kvm@vger.kernel.org Link: https://lkml.kernel.org/r/1536932759-12905-2-git-send-email-brijesh.singh@amd.com
Diffstat (limited to 'mm/percpu-stats.c')
0 files changed, 0 insertions, 0 deletions