From: Tyler Fanelli <tfanelli@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, mtosatti@redhat.com, stefanha@redhat.com,
philmd@linaro.org, berrange@redhat.com,
marcandre.lureau@gmail.com, Tyler Fanelli <tfanelli@redhat.com>
Subject: [RFC PATCH v2 0/9] i386/sev: Use C API of Rust SEV library
Date: Wed, 4 Oct 2023 16:34:09 -0400 [thread overview]
Message-ID: <20231004203418.56508-1-tfanelli@redhat.com> (raw)
These patches are submitted as an RFC mainly because I'm a relative
newcomer to QEMU with no knowledge of the community's views on
including Rust code, nor it's preference of using library APIs for
ioctls that were previously implemented in QEMU directly.
Recently, the Rust sev library [0] has introduced a C API to take
advantage of the library outside of Rust.
Should the inclusion of the library as a dependency be desired, it can
be extended further to include the firmware/platform ioctls and more.
This would result in much of the AMD-SEV portion of QEMU being offloaded
to the library.
This series looks to explore the possibility of using the library and
show a bit of what it would look like. I'm looking for comments
regarding if this feature is desired.
[0] https://github.com/virtee/sev
NOTE: The required meson changes in the Rust library are not merged yet.
Therefore, the git repository URL in subprojects/sev.wrap points to a
personal fork of the library (for testing purposes). The meson patches
for the library are required before these patches can be merged.
Changes since v1:
- Add sev Rust library as a QEMU subproject, rather than using
pkg-config for linking
- Rebased to upstream/master
- Use C API for SEV_ATTESTATION_REPORT ioctl
Tyler Fanelli (9):
Add Rust SEV library as subproject
i386/sev: Replace INIT and ES_INIT ioctls with sev library equivalents
i386/sev: Replace LAUNCH_START ioctl with sev library equivalent
i386/sev: Replace UPDATE_DATA ioctl with sev library equivalent
i386/sev: Replace LAUNCH_UPDATE_VMSA ioctl with sev library equivalent
i386/sev: Replace LAUNCH_MEASURE ioctl with sev library equivalent
i386/sev: Replace LAUNCH_SECRET ioctl with sev library equivalent
i386/sev: Replace LAUNCH_FINISH ioctl with sev library equivalent
i386/sev: Replace SEV_ATTESTATION_REPORT with sev library equivalent
meson.build | 8 +
meson_options.txt | 2 +
scripts/meson-buildoptions.sh | 3 +
subprojects/sev.wrap | 6 +
target/i386/meson.build | 2 +-
target/i386/sev.c | 392 +++++++++++-----------------------
target/i386/sev.h | 6 +-
target/i386/trace-events | 1 +
8 files changed, 148 insertions(+), 272 deletions(-)
create mode 100644 subprojects/sev.wrap
--
2.40.1
next reply other threads:[~2023-10-04 20:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 20:34 Tyler Fanelli [this message]
2023-10-04 20:34 ` [RFC PATCH v2 1/9] Add Rust SEV library as subproject Tyler Fanelli
2023-10-05 6:03 ` Philippe Mathieu-Daudé
2023-10-05 23:41 ` Tyler Fanelli
2023-10-11 3:05 ` Tyler Fanelli
2023-10-05 15:54 ` Stefan Hajnoczi
2023-10-11 3:10 ` Tyler Fanelli
2023-10-13 18:09 ` Manos Pitsidianakis
2023-10-13 18:20 ` Tyler Fanelli
2023-10-16 9:16 ` Daniel P. Berrangé
2023-10-16 13:38 ` Philippe Mathieu-Daudé
2023-10-16 13:51 ` Stefan Hajnoczi
2024-03-05 13:47 ` Daniel P. Berrangé
2024-03-05 15:40 ` Philippe Mathieu-Daudé
2023-10-04 20:34 ` [RFC PATCH v2 2/9] i386/sev: Replace INIT and ES_INIT ioctls with sev library equivalents Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 3/9] i386/sev: Replace LAUNCH_START ioctl with sev library equivalent Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 4/9] i386/sev: Replace UPDATE_DATA " Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 5/9] i386/sev: Replace LAUNCH_UPDATE_VMSA " Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 6/9] i386/sev: Replace LAUNCH_MEASURE " Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 7/9] i386/sev: Replace LAUNCH_SECRET " Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 8/9] i386/sev: Replace LAUNCH_FINISH " Tyler Fanelli
2023-10-04 20:34 ` [RFC PATCH v2 9/9] i386/sev: Replace SEV_ATTESTATION_REPORT " Tyler Fanelli
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=20231004203418.56508-1-tfanelli@redhat.com \
--to=tfanelli@redhat.com \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).