virtee / sev

Rust library abstracting Linux AMD SEV and SEV-SNP ioctls.
Apache License 2.0
92 stars 36 forks source link

Updated launch library to use current IOCTls and gmem #230

Closed DGonzalezVillal closed 1 month ago

DGonzalezVillal commented 2 months ago

Updated the launch library to use INIT2 IOCTL and deprecate the old INIT IOCTLs. Created new functions to register encrypted memory for SNP. Updated SEV test to use INIT2. Updated the SNP launch test to use GMEM and support KVM GMEM for launch.

tylerfanelli commented 2 months ago

Is guest_memfd used here? I haven't been following much lately but I thought that replaced gmem?

larrydewey commented 1 month ago

Is guest_memfd used here? I haven't been following much lately but I thought that replaced gmem?

That is what he is using. He will change the title of the PR :)

tylerfanelli commented 1 month ago

Thanks. Can I test this on the upstream kernel?

DGonzalezVillal commented 1 month ago

@tylerfanelli just fixed a small bug I had on the test, please feel free to test on upstream kernel.

tylerfanelli commented 1 month ago

can you point to the exact kernel you used to test? 6.11?

DGonzalezVillal commented 1 month ago

can you point to the exact kernel you used to test? 6.11?

@tylerfanelli Anything past 6.8-rc5 contains this update. I just tested on 6.11.0-rc3 and it worked.

https://github.com/AMDESE/AMDSEV/tree/snp-latest?tab=readme-ov-file#upgrading-from-680-rc5-based-snp-hypervisorhost-kernels

tylerfanelli commented 1 month ago

@larrydewey @DGonzalezVillal Are we ready for a v5.0.0 release?