RE: [PATCH v9 1/2] x86/tdx: Retry TDVMCALL_MAP_GPA() when needed

From: Dexuan Cui
Date: Wed Jul 26 2023 - 20:19:30 EST


> From: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> Sent: Tuesday, July 18, 2023 7:31 PM
> ...
> On 6/22/2023 3:13 AM, 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 fully enlightened TDX guest runs on Hyper-V, Hyper-V can return
> > the retry error when set_memory_decrypted() is called to decrypt up to
> > 1GB of swiotlb bounce buffers.
>
> just out of curiosity, what size does Hyper-v handle at most in one call?

In my test, Hyper-V can process 1 to 9 pages in one call. Most of the time,
Hyper-V only processes 2 pages or 1 page, in one call.

Thanks,
Dexuan