Re: [PATCH v3 1/6] x86/tdx: Retry TDVMCALL_MAP_GPA() when needed

From: Kirill A. Shutemov
Date: Wed Feb 15 2023 - 11:53:01 EST


On Mon, Feb 06, 2023 at 11:24:14AM -0800, Dexuan Cui wrote:
> GHCI spec for TDX 1.0 says that the MapGPA call may fail with the R10
> error code = TDG.VP.VMCALL_RETRY (1), and the guest must retry this
> operation for the pages in the region starting at the GPA specified
> in R11.
>
> When a TDX guest runs on Hyper-V, Hyper-V returns the retry error
> when hyperv_init() -> swiotlb_update_mem_attributes() ->
> set_memory_decrypted() decrypts up to 1GB of swiotlb bounce buffers.
>
> Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>

Looks good to me.

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

--
Kiryl Shutsemau / Kirill A. Shutemov