mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Michael Roth <michael.roth@amd.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	Kees Cook <keescook@chromium.org>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Venu Busireddy <venu.busireddy@oracle.com>,
	Joerg Roedel <jroedel@suse.de>,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Brijesh Singh <brijesh.singh@amd.com>
Subject: Re: [PATCH v3 2/2] x86/sev: Get the AP jump table address from secrets page
Date: Fri, 22 Apr 2022 12:27:11 -0500	[thread overview]
Message-ID: <44b72da3-05d3-a9cb-eb74-43295383c9d0@amd.com> (raw)
In-Reply-To: <20220422154056.lhzmii34he6blvwv@amd.com>

On 4/22/22 10:40, Michael Roth wrote:
> On Fri, Apr 22, 2022 at 10:15:08AM -0500, Tom Lendacky wrote:
>> On 4/22/22 08:56, Michael Roth wrote:
>>> From: Brijesh Singh <brijesh.singh@amd.com>
>>>
>>> The GHCB specification section 2.7 states that when SEV-SNP is enabled,
>>> a hypervisor must provide the AP jump table physical address through
>>
>> I missed this on the first version. It's not the hypervisor, but the guest
>> BIOS that directly provides the AP jump table physical address, in our case
>> OVMF sets the address in the SNP secrets page. This allows communication
>> between UEFI/BIOS and OS without hypervisor involvement.
> 
> How about this wording for the commit message?
> 
>    The GHCB specification section 2.7 states that when SEV-SNP is enabled,
>    a guest should not rely on the hypervisor to provide the address of the
>    AP jump table. Instead, if a guest BIOS wants provide an AP jump table,
>    it should record the address in the SNP secrets page so the guest
>    operating system can obtain it directly from there.
> 
>    Fix this on the guest kernel side by having SNP guests use the AP jump
>    table address published in the secrets page rather than issuing a GHCB
>    request to get it.

That sounds good to me.

Thanks,
Tom

> 
>>
>>> the SNP secrets pages.
>>>
>>> Fixes: 0afb6b660a6b ("x86/sev: Use SEV-SNP AP creation to start secondary CPUs")
>>> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
>>> [ mroth: improve error handling when ioremap()/memremap() return NULL ]
>>> [ mroth: don't mix function calls with declarations ]
>>> [ mroth: add missing __init ]
>>> Signed-off-by: Michael Roth <michael.roth@amd.com>
>>
>> With the commit message change:
>>
>> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>

  reply	other threads:[~2022-04-22 17:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 13:56 [PATCH v3 0/2] x86/sev: Fix AP Jump Table handling for SNP guests Michael Roth
2022-04-22 13:56 ` [PATCH v3 1/2] x86/sev: Add missing __init annotations to SEV init routines Michael Roth
2022-04-27 11:56   ` [tip: x86/sev] " tip-bot2 for Michael Roth
2022-04-22 13:56 ` [PATCH v3 2/2] x86/sev: Get the AP jump table address from secrets page Michael Roth
2022-04-22 15:15   ` Tom Lendacky
2022-04-22 15:40     ` Michael Roth
2022-04-22 17:27       ` Tom Lendacky [this message]
2022-04-27 11:56   ` [tip: x86/sev] " tip-bot2 for Brijesh Singh

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=44b72da3-05d3-a9cb-eb74-43295383c9d0@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=venu.busireddy@oracle.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

all inboxes | Powered by JetHome®