Skip to content

RFC i386/sev: Use C API of Rust SEV library

Tyler Fanelli qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Add SEV Rust library as dependency with CONFIG_SEVmeson.build meson_options.txt scripts/meson-buildoptions.sh +1 more+13 -10 replies
2/8i386/sev: Replace INIT and ES_INIT ioctls with sev library equivalentstarget/i386/sev.c target/i386/trace-events+10 -50 replies
3/8i386/sev: Replace LAUNCH_START ioctl with sev library equivalenttarget/i386/sev.c+30 -500 replies
4/8i386/sev: Replace UPDATE_DATA ioctl with sev library equivalenttarget/i386/sev.c+6 -250 replies
5/8i386/sev: Replace LAUNCH_UPDATE_VMSA ioctl with sev library equivalenttarget/i386/sev.c+9 -200 replies
6/8i386/sev: Replace LAUNCH_MEASURE ioctl with sev library equivalenttarget/i386/sev.c target/i386/sev.h+8 -180 replies
7/8i386/sev: Replace LAUNCH_SECRET ioctl with sev library equivalenttarget/i386/sev.c target/i386/sev.h+36 -710 replies
8/8i386/sev: Replace LAUNCH_FINISH ioctl with sev library equivalenttarget/i386/sev.c+16 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/8] i386/sev: Use C API of Rust SEV library

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, the attestation report fetching, 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

Tyler Fanelli (8):
Add SEV Rust library as dependency with CONFIG_SEV 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

 meson.build                   |   7 +
 meson_options.txt             |   2 +
 scripts/meson-buildoptions.sh |   3 +
 target/i386/meson.build       |   2 +-
 target/i386/sev.c             | 311 ++++++++++++----------------------
 target/i386/sev.h             |   4 +-
 target/i386/trace-events      |   1 +
 7 files changed, 123 insertions(+), 207 deletions(-)
Signature · 1 line
2.40.1