CPUID Faulting can be virtulised for HVM guests without hardware support,
meaning it can be offered to SVM guests.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
if ( (inst_len = __get_instruction_length(curr, INSTR_CPUID)) == 0 )
return;
+ if ( hvm_check_cpuid_faulting(curr) )
+ {
+ hvm_inject_hw_exception(TRAP_gp_fault, 0);
+ return;
+ }
+
guest_cpuid(curr, regs->eax, regs->ecx, &res);
HVMTRACE_5D(CPUID, regs->eax, res.a, res.b, res.c, res.d);
return;
/* 0x000000ce MSR_INTEL_PLATFORM_INFO */
- if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
+ if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ||
+ boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
{
dp->plaform_info.available = true;
dp->plaform_info.cpuid_faulting = true;