public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, thomas.lendacky@amd.com
Cc: "Brijesh Singh" <brijesh.singh@amd.com>,
	"Eric Dong" <eric.dong@intel.com>, "Ray Ni" <ray.ni@intel.com>,
	"Rahul Kumar" <rahul1.kumar@intel.com>,
	"Marvin Häuser" <mhaeuser@posteo.de>
Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: Allocate a separate SEV-ES AP reset stack area
Date: Wed, 19 May 2021 09:27:39 +0200	[thread overview]
Message-ID: <991462a7-042c-3186-0459-84c75de245b9@redhat.com> (raw)
In-Reply-To: <7d3d835a-4354-108d-17b7-8679eb8c67d1@amd.com>

On 05/17/21 17:03, Lendacky, Thomas wrote:
> On 5/16/21 11:22 PM, Laszlo Ersek wrote:

>> But now, with SEV-ES enabled, we'll have a separate, discontiguous area
>> -- and neither BackupAndPrepareWakeupBuffer(), nor its counterpart
>> RestoreWakeupBuffer() take that into account.
>>
>> Therefore I think, while this patch is regression-free for the SEV-ES
>> *disabled* case, it may corrupt memory (through not restoring the AP
>> stack area's original contents) with SEV-ES enabled.
> 
> This is the current behavior for SEV-ES. The wakeup buffer memory is
> marked as reserved, at least in the DXE phase.

Another question that occurred to me later: where does this reservation
happen? If we have a separate allocation for the AP stacks now, do we
need to reserve that too, separately?

What about PEI in general? Why is there no risk of corruption there?

(Sorry if these are lame questions!)

Thanks,
Laszlo


  parent reply	other threads:[~2021-05-19  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 20:28 [PATCH v2] UefiCpuPkg/MpInitLib: Allocate a separate SEV-ES AP reset stack area Lendacky, Thomas
2021-05-17  4:22 ` [edk2-devel] " Laszlo Ersek
2021-05-17 15:03   ` Lendacky, Thomas
2021-05-18 17:17     ` Laszlo Ersek
2021-05-18 17:34       ` Marvin Häuser
2021-05-20 14:21       ` Lendacky, Thomas
2021-05-19  7:27     ` Laszlo Ersek [this message]
2021-05-20 15:09       ` Lendacky, Thomas
2021-05-20  8:43 ` Laszlo Ersek
2021-05-29 11:38 ` Laszlo Ersek

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-list 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=991462a7-042c-3186-0459-84c75de245b9@redhat.com \
    --to=devel@edk2.groups.io \
    /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