From 624391bdc831e9c73c818c55c9a356dfe210c91e Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Sat, 17 Mar 2018 19:00:51 -0400 Subject: [PATCH] cpu/i386: populate CPUID 0x8000_001F when SEV is active When SEV is enabled, CPUID 0x8000_001F should provide additional information regarding the feature (such as which page table bit is used to mark the pages as encrypted etc). The details for memory encryption CPUID is available in AMD APM (https://support.amd.com/TechDocs/24594.pdf) Section E.4.17 Backports relevant parts of commit 6cb8f2a663a47c6e0da17fc4fb9e06abfda2bd48 from qemu --- qemu/target/i386/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qemu/target/i386/cpu.c b/qemu/target/i386/cpu.c index 418f8350..46b552d4 100644 --- a/qemu/target/i386/cpu.c +++ b/qemu/target/i386/cpu.c @@ -3588,6 +3588,12 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, *ecx = 0; *edx = 0; break; + case 0x8000001F: + *eax = 0; + *ebx = 0; + *ecx = 0; + *edx = 0; + break; default: /* reserved values: zero */ *eax = 0;