[lkml]   [2022]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 4/4] virt: sev-guest: interpret VMM errors from guest request
On Fri, Nov 4, 2022 at 5:01 PM Dionna Glaze <> wrote:
> The GHCB specification states that the upper 32 bits of exitinfo2 are
> for the VMM's error codes. The sev-guest ABI has already locked in
> that the fw_err status of the input will be 64 bits, and that
> BIT_ULL(32) means that the extended guest request's data buffer was too
> small, so we have to keep that ABI.
> We can still interpret the upper 32 bits of exitinfo2 for the user
> anyway in case the request gets throttled. For safety, since the
> encryption algorithm in GHCBv2 is AES_GCM, we cannot return to user
> space without having completed the request with the current sequence
> number. If we were to return and the guest were to make another request
> but with different message contents, then that would be IV reuse.
> When throttled, the driver will reschedule itself and then try
> again after sleeping half its ratelimit time to avoid a big wait queue.
> The ioctl may block indefinitely, but that has always been the case
> when deferring these requests to the host.
> Cc: Tom Lendacky <>
> Cc: Peter Gonda <>
> Cc: Borislav Petkov <>
> Cc: Tom Lendacky <>
> Cc: Liam Merwick <>
> Cc: Yang Yingliang <>
> Cc: Haowen Bai <>
> Signed-off-by: Dionna Glaze <>

Reviewed-by: Peter Gonda <>

 \ /
  Last update: 2022-11-05 02:34    [W:0.122 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site