KVM: x86: emulate RDPID
This is encoded as F3 0F C7 /7 with a register argument. The register argument is the second array in the group9 GroupDual, while F3 is the fourth element of a Prefix. Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -293,13 +293,18 @@ static int __do_cpuid_ent_emulated(struct kvm_cpuid_entry2 *entry,
|
||||
{
|
||||
switch (func) {
|
||||
case 0:
|
||||
entry->eax = 1; /* only one leaf currently */
|
||||
entry->eax = 7;
|
||||
++*nent;
|
||||
break;
|
||||
case 1:
|
||||
entry->ecx = F(MOVBE);
|
||||
++*nent;
|
||||
break;
|
||||
case 7:
|
||||
entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
|
||||
if (index == 0)
|
||||
entry->ecx = F(RDPID);
|
||||
++*nent;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user