Trusted Platform Information
Traditionally, platform features and capabilities are discovered using the CPUID instruction. Hypervisors often trap and emulate this instruction for various purposes, such as restricting guest access to certain features to facilitate migration. However, when a malicious hypervisor provides incorrect CPUID information, it can potentially lead to security issues.
For example, if a hypervisor lies about the size of the x86 Extended Save Area (used with the XSAVE/XRSTOR CPU instructions), it may cause a guest to allocate insufficient memory and experience a buffer overflow when executing the hardware XSAVE instruction. Although guest VMs can attempt to validate the CPUID information they receive, this validation process can be challenging, especially during the boot process.
To simplify the validation task for guests, SEV-SNP introduces an optional capability called CPUID filtering, which involves the participation of the AMD Secure Processor (AMD-SP). The AMD-SP verifies that the CPUID results reported by the hypervisor do not exceed the platform's capabilities and ensures the accuracy of security-sensitive information, such as the x86 Extended Save Area size.
CPUID filtering can be performed either on-the-fly or during guest boot. In the on-the-fly filtering approach, after receiving CPUID information, the guest can request verification from the AMD-SP to validate security-sensitive data. Alternatively, during VM launch, a dedicated 'CPUID page' can be created, containing pre-vetted CPUID information from the AMD-SP. This enables the guest to access trusted CPUID information from the early stages of booting. Besides enhancing security, this special page facilitates quicker access to CPUID information, thus accelerating the VM boot process.
Last updated