Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP

2023-11-28 Thread Ard Biesheuvel
On Mon, 27 Nov 2023 at 21:04, Tom Lendacky  wrote:
>
> On 3/20/23 05:06, Gerd Hoffmann wrote:
> > On Thu, Mar 02, 2023 at 09:15:30AM +, Dov Murik wrote:
> >> AMD SEV and SEV-ES support measured direct boot with
> >> kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF
> >> during boot.
> >>
> >> To enable the same approach for AMD SEV-SNP, we declare the kernel
> >> hashes page in the SNP metadata list as a new region type.  When QEMU
> >> encounters that region in the list, it will insert the hashes of
> >> kernel/initrd/cmdline and encrypt the page (or, if the user turned off
> >> kernel hashes, it will validate the page as a zero page).
> >>
> >> The first patch rearranges the pages in AmdSevX64's MEMFD so they are in
> >> the same order both as in the main target (OvmfPkgX64), with the
> >> exception of the SEV Launch Secret page which isn't defined in
> >> OvmfPkgX64.
> >>
> >> The second patch modifies the SNP metadata structure such that on
> >> AmdSev target the SEV Launch Secret page is explicitly defined in SNP
> >> metadata list, and therefore it is not included in the ranges that are
> >> pre-validated (zero pages) by the VMM; instead the VMM will insert
> >> content into this page (the hashes table), or mark it explicitly as a
> >> zero page if no hashes are added.
> >>
> >> This series is available at:
> >> https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3
> >>
> >> A corresponding QEMU RFC series will be published soon in qemu-devel, or
> >> use this tree:
> >> https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3
> >
> > For the series:
> > Acked-by: Gerd Hoffmann 
>
> I've noticed that series was never picked up. Any chance that this can be
> merged?
>

Queued up now

Apologies for the delay.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111808): https://edk2.groups.io/g/devel/message/111808
Mute This Topic: https://groups.io/mt/97335488/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP

2023-11-27 Thread Lendacky, Thomas via groups.io

On 3/20/23 05:06, Gerd Hoffmann wrote:

On Thu, Mar 02, 2023 at 09:15:30AM +, Dov Murik wrote:

AMD SEV and SEV-ES support measured direct boot with
kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF
during boot.

To enable the same approach for AMD SEV-SNP, we declare the kernel
hashes page in the SNP metadata list as a new region type.  When QEMU
encounters that region in the list, it will insert the hashes of
kernel/initrd/cmdline and encrypt the page (or, if the user turned off
kernel hashes, it will validate the page as a zero page).

The first patch rearranges the pages in AmdSevX64's MEMFD so they are in
the same order both as in the main target (OvmfPkgX64), with the
exception of the SEV Launch Secret page which isn't defined in
OvmfPkgX64.

The second patch modifies the SNP metadata structure such that on
AmdSev target the SEV Launch Secret page is explicitly defined in SNP
metadata list, and therefore it is not included in the ranges that are
pre-validated (zero pages) by the VMM; instead the VMM will insert
content into this page (the hashes table), or mark it explicitly as a
zero page if no hashes are added.

This series is available at:
https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3

A corresponding QEMU RFC series will be published soon in qemu-devel, or
use this tree:
https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3


For the series:
Acked-by: Gerd Hoffmann 


I've noticed that series was never picked up. Any chance that this can be 
merged?


Thanks,
Tom






-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111760): https://edk2.groups.io/g/devel/message/111760
Mute This Topic: https://groups.io/mt/97335488/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP

2023-03-20 Thread Gerd Hoffmann
On Thu, Mar 02, 2023 at 09:15:30AM +, Dov Murik wrote:
> AMD SEV and SEV-ES support measured direct boot with
> kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF
> during boot.
> 
> To enable the same approach for AMD SEV-SNP, we declare the kernel
> hashes page in the SNP metadata list as a new region type.  When QEMU
> encounters that region in the list, it will insert the hashes of
> kernel/initrd/cmdline and encrypt the page (or, if the user turned off
> kernel hashes, it will validate the page as a zero page).
> 
> The first patch rearranges the pages in AmdSevX64's MEMFD so they are in
> the same order both as in the main target (OvmfPkgX64), with the
> exception of the SEV Launch Secret page which isn't defined in
> OvmfPkgX64.
> 
> The second patch modifies the SNP metadata structure such that on
> AmdSev target the SEV Launch Secret page is explicitly defined in SNP
> metadata list, and therefore it is not included in the ranges that are
> pre-validated (zero pages) by the VMM; instead the VMM will insert
> content into this page (the hashes table), or mark it explicitly as a
> zero page if no hashes are added.
> 
> This series is available at:
> https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3
> 
> A corresponding QEMU RFC series will be published soon in qemu-devel, or
> use this tree:
> https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3

For the series:
Acked-by: Gerd Hoffmann 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101429): https://edk2.groups.io/g/devel/message/101429
Mute This Topic: https://groups.io/mt/97335488/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP

2023-03-02 Thread Lendacky, Thomas via groups.io

On 3/2/23 03:15, Dov Murik wrote:

AMD SEV and SEV-ES support measured direct boot with
kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF
during boot.

To enable the same approach for AMD SEV-SNP, we declare the kernel
hashes page in the SNP metadata list as a new region type.  When QEMU
encounters that region in the list, it will insert the hashes of
kernel/initrd/cmdline and encrypt the page (or, if the user turned off
kernel hashes, it will validate the page as a zero page).

The first patch rearranges the pages in AmdSevX64's MEMFD so they are in
the same order both as in the main target (OvmfPkgX64), with the
exception of the SEV Launch Secret page which isn't defined in
OvmfPkgX64.

The second patch modifies the SNP metadata structure such that on
AmdSev target the SEV Launch Secret page is explicitly defined in SNP
metadata list, and therefore it is not included in the ranges that are
pre-validated (zero pages) by the VMM; instead the VMM will insert
content into this page (the hashes table), or mark it explicitly as a
zero page if no hashes are added.

This series is available at:
https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3

A corresponding QEMU RFC series will be published soon in qemu-devel, or
use this tree:
https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3

Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Gerd Hoffmann 
Cc: Erdem Aktas 
Cc: James Bottomley 
Cc: Min Xu 
Cc: Tom Lendacky 
Cc: Michael Roth 
Cc: Ashish Kalra 
Cc: Mario Smarduch 
Cc: Tobin Feldman-Fitzthum 


For the series:

Acked-by: Tom Lendacky 



---

v3 changes:
* Define the kernel hashes page in the SNP metadata table (thanks Tom)

v2: https://edk2.groups.io/g/devel/message/100362
v2 changes:
* Rebased on master
* Updated AmdSev MEMFD size to match OvmfX64

v1: https://edk2.groups.io/g/devel/message/88137

Dov Murik (2):
   OvmfPkg/AmdSev: Reorder MEMFD pages to match the order in
 OvmfPkgX64.fdf
   OvmfPkg/ResetVector: Define SNP metadata for kernel hashes

  OvmfPkg/AmdSev/AmdSevX64.fdf| 27 ++--
  OvmfPkg/ResetVector/ResetVector.nasmb   | 11 +++-
  OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm | 11 
  3 files changed, 35 insertions(+), 14 deletions(-)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100641): https://edk2.groups.io/g/devel/message/100641
Mute This Topic: https://groups.io/mt/97335488/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP

2023-03-02 Thread Dov Murik
AMD SEV and SEV-ES support measured direct boot with
kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF
during boot.

To enable the same approach for AMD SEV-SNP, we declare the kernel
hashes page in the SNP metadata list as a new region type.  When QEMU
encounters that region in the list, it will insert the hashes of
kernel/initrd/cmdline and encrypt the page (or, if the user turned off
kernel hashes, it will validate the page as a zero page).

The first patch rearranges the pages in AmdSevX64's MEMFD so they are in
the same order both as in the main target (OvmfPkgX64), with the
exception of the SEV Launch Secret page which isn't defined in
OvmfPkgX64.

The second patch modifies the SNP metadata structure such that on
AmdSev target the SEV Launch Secret page is explicitly defined in SNP
metadata list, and therefore it is not included in the ranges that are
pre-validated (zero pages) by the VMM; instead the VMM will insert
content into this page (the hashes table), or mark it explicitly as a
zero page if no hashes are added.

This series is available at:
https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3

A corresponding QEMU RFC series will be published soon in qemu-devel, or
use this tree:
https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3

Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Gerd Hoffmann 
Cc: Erdem Aktas 
Cc: James Bottomley 
Cc: Min Xu 
Cc: Tom Lendacky 
Cc: Michael Roth 
Cc: Ashish Kalra 
Cc: Mario Smarduch 
Cc: Tobin Feldman-Fitzthum 

---

v3 changes:
* Define the kernel hashes page in the SNP metadata table (thanks Tom)

v2: https://edk2.groups.io/g/devel/message/100362
v2 changes:
* Rebased on master
* Updated AmdSev MEMFD size to match OvmfX64

v1: https://edk2.groups.io/g/devel/message/88137

Dov Murik (2):
  OvmfPkg/AmdSev: Reorder MEMFD pages to match the order in
OvmfPkgX64.fdf
  OvmfPkg/ResetVector: Define SNP metadata for kernel hashes

 OvmfPkg/AmdSev/AmdSevX64.fdf| 27 ++--
 OvmfPkg/ResetVector/ResetVector.nasmb   | 11 +++-
 OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm | 11 
 3 files changed, 35 insertions(+), 14 deletions(-)

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100625): https://edk2.groups.io/g/devel/message/100625
Mute This Topic: https://groups.io/mt/97335488/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-