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
This commit is contained in:
Brijesh Singh 2018-03-15 16:34:31 -04:00 committed by Lioncash
parent c1587be44c
commit 3a5e6fb750
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -3707,6 +3707,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;