On 11/29/21 8:44 AM, Marc Orr wrote:
On Thu, Nov 25, 2021 at 7:21 AM Varad Gautam <varad.gautam@xxxxxxxx> wrote:
On 10/21/21 4:10 PM, Paolo Bonzini wrote:
On 04/10/21 22:49, Zixuan Wang wrote:
Hello,
WHOA IT WORKS! XD
There are still a few rough edges around the build system (and in general, the test harness is starting to really show its limits), but this is awesome work. Thanks Drew, Varad and Zixuan (in alphabetic and temporal order) for the combined contribution!
For now I've placed it at a 'uefi' branch on gitlab, while I'm waiting for some reviews of my GDT cleanup work. Any future improvements can be done on top.
While doing the #VC handler support for test binaries [1], I realised I can't seem
to run any of the tests from the uefi branch [2] that write to cr3 via setup_vm()
on SEV-ES. These tests (eg., tscdeadline_latency) crash with SEV-ES, and work with
uefi without SEV-ES (policy=0x0). I'm wondering if I am missing something, is
setup_vm->setup_mmu->write_cr3() known to work on SEV-ES elsewhere?
When writing a new CR3 value, do the new page tables have the GHCB(s)
mapped shared?
Thanks,
Tom
[1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20211117134752.32662-1-varad.gautam%40suse.com%2F&data=04%7C01%7CThomas.Lendacky%40amd.com%7C30e4810784c9456a7c4208d9b346bfe9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637737938743453221%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2Fo0aGSzTWbVwLId4gEsnDpYfDsyMWNibjocX6whDK14%3D&reserved=0
[2] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fkvm-unit-tests%2Fkvm-unit-tests%2F-%2Ftree%2Fuefi&data=04%7C01%7CThomas.Lendacky%40amd.com%7C30e4810784c9456a7c4208d9b346bfe9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637737938743463179%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=k2kQzSZwmSWNVWWV%2BHJI0cfT71zva3Ify3UHFbSEOyA%3D&reserved=0
I've only been running amd_sev under SEV-ES up to now. I just tried
tscdeadline_latency on my setup, and can confirm that it does indeed
fail under SEV-ES.