linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Borislav Petkov <bp@alien8.de>, LKML <linux-kernel@vger.kernel.org>
Cc: Dionna Glaze <dionnaglaze@google.com>,
	Joerg Roedel <jroedel@suse.de>,
	Michael Roth <michael.roth@amd.com>,
	Nikunj A Dadhania <nikunj@amd.com>,
	Peter Gonda <pgonda@google.com>,
	linux-coco@lists.linux.dev, x86@kernel.org
Subject: Re: [PATCH -v3 00/11] SEV: Cleanup sev-guest a bit and add throttling
Date: Wed, 8 Mar 2023 14:33:58 -0600	[thread overview]
Message-ID: <1643fd48-c055-ebfa-6790-b49d35fa8d54@amd.com> (raw)
In-Reply-To: <20230307192449.24732-1-bp@alien8.de>

On 3/7/23 13:24, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> Hi,
> 
> ok, here's v3, rebased ontop of -rc1 and hopefully with all the stuff
> addressed. There's always room for improvement but that should come
> later and ontop.
> 
> Thx.

For the series:
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>

One thing I noticed is that patch #3 fixes an issue where the fw_err field 
returns uninitialized stack data when success (0) is returned by the 
ioctl(). There's no Fixes: tag on that commit. But I guess the later 
Fixes: tag on patch #9 would cause #3 to be pulled, too, right?

Thanks,
Tom

> 
> Changelog:
> ----------
> 
> v2:
> 
> ok, here's v2 with the pending stuff fixed.
> 
> Thx.
> 
> v1:
> ---
> so I've been looking at Dionna's patches adding the SEV guest throttling
> and that request issuing spaghetti was getting on my nerves. And it
> would've become even worse with more stuff piling ontop so here's
> a first round of cleanups before adding more stuff and making it an
> unmaintainable mess.
> 
> The final result is a lot easier to read with proper separation of
> functionality between functions. I want to get rid of more input/output
> params being passed back'n'forth and use a struct instead and Nikunj's
> patches have stuff which goes in that direction but first things first.
> 
> After the cleanup, the new stuff being added is a lot less code and
> almost trivial. But I've been staring at this for a while now so it
> could be only me who thinks it is trivial now. But we'll see.
> 
> Initial smoke testing seems to work ok but I might've introduced some
> funky bugs, ofc.
> 
> Comments and suggestions are appreciated, as always.
> 
> Thanks and thanks, Tom, for the help!
> 
> 
> Borislav Petkov (AMD) (7):
>    virt/coco/sev-guest: Check SEV_SNP attribute at probe time
>    virt/coco/sev-guest: Simplify extended guest request handling
>    virt/coco/sev-guest: Remove the disable_vmpck label in
>      handle_guest_request()
>    virt/coco/sev-guest: Carve out the request issuing logic into a helper
>    virt/coco/sev-guest: Do some code style cleanups
>    virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a
>      switch-case
>    crypto: ccp: Get rid of __sev_platform_init_locked()'s local function
>      pointer
> 
> Dionna Glaze (3):
>    virt/coco/sev-guest: Add throttling awareness
>    virt/coco/sev-guest: Double-buffer messages
>    x86/sev: Change snp_guest_issue_request()'s fw_err argument
> 
> Peter Gonda (1):
>    crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL
> 
>   Documentation/virt/coco/sev-guest.rst   |  20 ++-
>   arch/x86/include/asm/sev-common.h       |   3 -
>   arch/x86/include/asm/sev.h              |  10 +-
>   arch/x86/kernel/sev.c                   |  33 ++--
>   drivers/crypto/ccp/sev-dev.c            |  22 ++-
>   drivers/virt/coco/sev-guest/sev-guest.c | 190 +++++++++++++++---------
>   include/uapi/linux/psp-sev.h            |   7 +
>   include/uapi/linux/sev-guest.h          |  18 ++-
>   8 files changed, 199 insertions(+), 104 deletions(-)
> 

  parent reply	other threads:[~2023-03-08 20:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 19:24 [PATCH -v3 00/11] SEV: Cleanup sev-guest a bit and add throttling Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 01/11] crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 02/11] virt/coco/sev-guest: Check SEV_SNP attribute at probe time Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 03/11] virt/coco/sev-guest: Simplify extended guest request handling Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 04/11] virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 05/11] virt/coco/sev-guest: Carve out the request issuing logic into a helper Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 06/11] virt/coco/sev-guest: Do some code style cleanups Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 07/11] virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 08/11] crypto: ccp: Get rid of __sev_platform_init_locked()'s local function pointer Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 09/11] virt/coco/sev-guest: Add throttling awareness Borislav Petkov
2023-03-07 20:27   ` Dionna Amalie Glaze
2023-03-07 19:24 ` [PATCH -v3 10/11] virt/coco/sev-guest: Double-buffer messages Borislav Petkov
2023-03-07 19:24 ` [PATCH -v3 11/11] x86/sev: Change snp_guest_issue_request()'s fw_err argument Borislav Petkov
2023-03-08 20:33 ` Tom Lendacky [this message]
2023-03-09 12:12   ` [PATCH -v3 00/11] SEV: Cleanup sev-guest a bit and add throttling Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1643fd48-c055-ebfa-6790-b49d35fa8d54@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=dionnaglaze@google.com \
    --cc=jroedel@suse.de \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=nikunj@amd.com \
    --cc=pgonda@google.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).