[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMkAt6pqq=2Yv1pkB9Qz1F93unwWgMa8NH3VcMSfWtpS-O31qA@mail.gmail.com>
Date: Mon, 7 Nov 2022 10:24:23 -0700
From: Peter Gonda <pgonda@...gle.com>
To: Dionna Glaze <dionnaglaze@...gle.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Tom Lendacky <Thomas.Lendacky@....com>,
Borislav Petkov <bp@...e.de>,
Liam Merwick <liam.merwick@...cle.com>,
Yang Yingliang <yangyingliang@...wei.com>,
Haowen Bai <baihaowen@...zu.com>
Subject: Re: [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@...gle.com> wrote:
>
> On Fri, Nov 4, 2022 at 5:01 PM Dionna Glaze <dionnaglaze@...gle.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@....com>
> > Cc: Peter Gonda <pgonda@...gle.com>
> > Cc: Borislav Petkov <bp@...e.de>
> > Cc: Tom Lendacky <thomas.lendacky@....com>
> > Cc: Liam Merwick <liam.merwick@...cle.com>
> > Cc: Yang Yingliang <yangyingliang@...wei.com>
> > Cc: Haowen Bai <baihaowen@...zu.com>
> >
> > Signed-off-by: Dionna Glaze <dionnaglaze@...gle.com>
>
> Reviewed-by: Peter Gonda <pgonda@...gle.com>
Tested-by: Peter Gonda <pgonda@...gle.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.
Powered by blists - more mailing lists