Hi, > > Typically the kind of new code that I wish would be in Rust. But I > > suppose it is too early yet, and you came to the same conclusion. > > Probably a good candidate for rewrite though! > > Perhaps too early for the device impl, but I would have thought > the general var-service code could be done in rust today. It does > not have all that much interaction with other parts of the QEMU > codebase & thus wouldn't be building on the moving target of the > QOM/Device abstractions. It would also be the prime part that > could be shared with coconut-svsm too.
That remains to be seen. The svsm code will indeed most likely be written in rust. There are a number of noteworthy differences though: * It's a totally different environment (no_std). * Persistent storage for the vars will be different. * Crypto code will be different (probably openssl because the vTPM needs that too, possibly native rust crypto). So not fully sure the code sharing part will actually work out ... I plan to keep this in mind when designing the svsm code though, and then revisit things once I have some actual rust code for this and the rust support in qemu is more mature. take care, Gerd