| From | Thomas Gleixner <> | Subject | Re: [PATCHv6 25/30] x86/tdx: Make pages shared in ioremap() | Date | Thu, 17 Mar 2022 15:33:21 +0100 |
| |
On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote: > In TDX guests, guest memory is protected from host access. If a guest > performs I/O, it needs to explicitly share the I/O memory with the host. > > Make all ioremap()ed pages that are not backed by normal memory > (IORES_DESC_NONE or IORES_DESC_RESERVED) mapped as shared. > > The permissions in PAGE_KERNEL_IO already work for "decrypted" memory > on AMD SEV/SME systems. That means that they have no need to make a > pgprot_decrypted() call. > > TDX guests, on the other hand, _need_ change to PAGE_KERNEL_IO for > "decrypted" mappings. Add a pgprot_decrypted() for TDX. > > Co-developed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> > Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> > Reviewed-by: Andi Kleen <ak@linux.intel.com> > Reviewed-by: Tony Luck <tony.luck@intel.com> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
|