From: Dov Murik <dovmurik@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: "Tom Lendacky" <thomas.lendacky@amd.com>,
"Ashish Kalra" <ashish.kalra@amd.com>,
"Brijesh Singh" <brijesh.singh@amd.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Connor Kuehl" <ckuehl@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"James Bottomley" <jejb@linux.ibm.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Hubertus Franke" <frankeh@us.ibm.com>,
"Tobin Feldman-Fitzthum" <tobin@linux.ibm.com>,
"Jim Cadden" <jcadden@ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Dov Murik" <dovmurik@linux.ibm.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v3 0/2] [RESEND] x86/sev: Measured Linux SEV guest with kernel/initrd/cmdline
Date: Thu, 2 Sep 2021 15:02:48 +0300 [thread overview]
Message-ID: <fa9ceb69-74f3-a2ad-51db-b9d6b12dc15f@linux.ibm.com> (raw)
In-Reply-To: <20210825073538.959525-1-dovmurik@linux.ibm.com>
ping
All (2) patches of the series have R-b.
Thanks,
-Dov
On 25/08/2021 10:35, Dov Murik wrote:
> (Resending for QEMU 6.2; no code changes since the last round.)
>
> Currently booting with -kernel/-initrd/-append is not supported in SEV
> confidential guests, because the content of these blobs is not measured
> and therefore not trusted by the SEV guest.
>
> However, in some cases the kernel, initrd, and cmdline are not secret
> but should not be modified by the host. In such a case, we want to
> verify inside the trusted VM that the kernel, initrd, and cmdline are
> indeed the ones expected by the Guest Owner, and only if that is the
> case go on and boot them up (removing the need for grub inside OVMF in
> that mode).
>
> To support that, OVMF adds a special area for hashes of
> kernel/initrd/cmdline; that area is expected to be filled by QEMU and
> encrypted as part of the initial SEV guest launch. This in turn makes
> the hashes part of the PSP measured content, and OVMF can trust these
> inputs if they match the hashes.
>
> This series adds an SEV function to generate the table of hashes for
> OVMF and encrypt it (patch 1/2), and calls this function if SEV is
> enabled when the kernel/initrd/cmdline are prepared (patch 2/2).
>
> Corresponding OVMF support [1] is already available in edk2 (patch series
> "Measured SEV boot with kernel/initrd/cmdline").
>
> [1] https://edk2.groups.io/g/devel/message/78250
>
> ---
>
> v3: https://lore.kernel.org/qemu-devel/20210624102040.2015280-1-dovmurik@linux.ibm.com/
> v3 changes:
> - initrd hash is now mandatory; if no -initrd is passed, calculate the
> hash of the empty buffer. This is now aligned with the OVMF
> behaviour which verifies the empty initrd (correctly).
> - make SevHashTable entries fixed: 3 entries for cmdline, initrd, and kernel.
> - in sev_add_kernel_loader_hashes: first calculate all the hashes, only then
> fill-in the hashes table in the guest's memory.
> - Use g_assert_not_reached in sev-stub.c.
> - Use QEMU_PACKED attribute for structs.
> - Use QemuUUID type for guids.
> - in sev_add_kernel_loader_hashes: use ARRAY_SIZE(iov) instead of literal 2.
>
> v2: https://lore.kernel.org/qemu-devel/20210621190553.1763020-1-dovmurik@linux.ibm.com/
> v2 changes:
> - Extract main functionality to sev.c (with empty stub in sev-stub.c)
> - Use sev_enabled() instead of machine->cgs->ready to detect SEV guest
> - Coding style changes
>
> v1: https://lore.kernel.org/qemu-devel/20210525065931.1628554-1-dovmurik@linux.ibm.com/
>
> Dov Murik (2):
> sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux
> boot
> x86/sev: generate SEV kernel loader hashes in x86_load_linux
>
> target/i386/sev_i386.h | 12 ++++
> hw/i386/x86.c | 25 +++++++-
> target/i386/sev-stub.c | 5 ++
> target/i386/sev.c | 137 +++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 178 insertions(+), 1 deletion(-)
>
>
> base-commit: f9baca549e44791be0dd98de15add3d8452a8af0
>
prev parent reply other threads:[~2021-09-02 12:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 7:35 [PATCH v3 0/2] [RESEND] x86/sev: Measured Linux SEV guest with kernel/initrd/cmdline Dov Murik
2021-08-25 7:35 ` [PATCH v3 1/2] sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot Dov Murik
2021-09-27 17:00 ` Daniel P. Berrangé
2021-09-29 9:39 ` Dov Murik
2021-08-25 7:35 ` [PATCH v3 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux Dov Murik
2021-09-27 17:03 ` Daniel P. Berrangé
2021-09-29 9:42 ` Dov Murik
2021-09-02 12:02 ` Dov Murik [this message]
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=fa9ceb69-74f3-a2ad-51db-b9d6b12dc15f@linux.ibm.com \
--to=dovmurik@linux.ibm.com \
--cc=ashish.kalra@amd.com \
--cc=brijesh.singh@amd.com \
--cc=ckuehl@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=frankeh@us.ibm.com \
--cc=jcadden@ibm.com \
--cc=jejb@linux.ibm.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thomas.lendacky@amd.com \
--cc=tobin@linux.ibm.com \
/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).