lkml.org 
[lkml]   [2022]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v8 4/4] virt: sev-guest: interpret VMM errors from guest request
On Fri, Nov 4, 2022 at 7:33 PM Peter Gonda <pgonda@google.com> wrote:
>
> On Fri, Nov 4, 2022 at 5:01 PM Dionna Glaze <dionnaglaze@google.com> 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 <Thomas.Lendacky@amd.com>
> > Cc: Peter Gonda <pgonda@google.com>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > Cc: Liam Merwick <liam.merwick@oracle.com>
> > Cc: Yang Yingliang <yangyingliang@huawei.com>
> > Cc: Haowen Bai <baihaowen@meizu.com>
> >
> > Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
>
> Reviewed-by: Peter Gonda <pgonda@google.com>

Tested-by: Peter Gonda <pgonda@google.com>

Tested with the host throttling patches you shared offlist. Used a
pretty restrictive rate limit to ensure I the hit the limit during
testing.

\
 
 \ /
  Last update: 2022-11-07 18:24    [W:0.158 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site