]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/mm: Allow guest.enc_status_change_prepare() to fail
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 6 Jun 2023 09:56:20 +0000 (12:56 +0300)
committerDave Hansen <dave.hansen@linux.intel.com>
Tue, 6 Jun 2023 18:07:01 +0000 (11:07 -0700)
commit3f6819dd192ef4f0c568ec3e9d6d408b3fa1ad3d
treecac1001bd35036ed5255a7b8338ae6d56d891120
parent122333d6bd229af279cdb35d1b874b71b3b9ccfb
x86/mm: Allow guest.enc_status_change_prepare() to fail

TDX code is going to provide guest.enc_status_change_prepare() that is
able to fail. TDX will use the call to convert the GPA range from shared
to private. This operation can fail.

Add a way to return an error from the callback.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/all/20230606095622.1939-2-kirill.shutemov%40linux.intel.com
arch/x86/include/asm/x86_init.h
arch/x86/kernel/x86_init.c
arch/x86/mm/mem_encrypt_amd.c
arch/x86/mm/pat/set_memory.c