summaryrefslogtreecommitdiffstats
path: root/arch/x86/Makefile.um
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2018-09-14 08:45:59 -0500
committerThomas Gleixner <tglx@linutronix.de>2018-09-15 20:48:46 +0200
commit6a1cac56f41f9ea94e440dfcc1cac44b41a1b194 (patch)
treee51cf240bd5ce83489484d038f0a8060a1d25f3e /arch/x86/Makefile.um
parentb3f0907c71e006e12fde74ea9a745b6096b6f90f (diff)
downloadlinux-6a1cac56f41f9ea94e440dfcc1cac44b41a1b194.tar.gz
linux-6a1cac56f41f9ea94e440dfcc1cac44b41a1b194.tar.bz2
linux-6a1cac56f41f9ea94e440dfcc1cac44b41a1b194.zip
x86/kvm: Use __bss_decrypted attribute in shared variables
The recent removal of the memblock dependency from kvmclock caused a SEV guest regression because the wall_clock and hv_clock_boot variables are no longer mapped decrypted when SEV is active. Use the __bss_decrypted attribute to put the static wall_clock and hv_clock_boot in the .bss..decrypted section so that they are mapped decrypted during boot. In the preparatory stage of CPU hotplug, the per-cpu pvclock data pointer assigns either an element of the static array or dynamically allocated memory for the pvclock data pointer. The static array are now mapped decrypted but the dynamically allocated memory is not mapped decrypted. However, when SEV is active this memory range must be mapped decrypted. Add a function which is called after the page allocator is up, and allocate memory for the pvclock data pointers for the all possible cpus. Map this memory range as decrypted when SEV is active. Fixes: 368a540e0232 ("x86/kvmclock: Remove memblock dependency") 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-3-git-send-email-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/Makefile.um')
0 files changed, 0 insertions, 0 deletions