]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - kernel/resource.c
x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 20 Oct 2017 14:30:52 +0000 (09:30 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 7 Nov 2017 14:35:58 +0000 (15:35 +0100)
commit0e4c12b45aa88e74fdda117896d2b61c4e510cb9
tree9007109ad9055fd3b23d6ba2d1f0b63e8421337e
parent1d2e733b13b450e5854f4a8f8efcd77fa7362d62
x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages

In order for memory pages to be properly mapped when SEV is active, it's
necessary to use the PAGE_KERNEL protection attribute as the base
protection.  This ensures that memory mapping of, e.g. ACPI tables,
receives the proper mapping attributes.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Tested-by: Borislav Petkov <bp@suse.de>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: kvm@vger.kernel.org
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Link: https://lkml.kernel.org/r/20171020143059.3291-11-brijesh.singh@amd.com
arch/x86/mm/ioremap.c
include/linux/ioport.h
kernel/resource.c