selftests: kvm/x86: Introduce x86_model()
Extract the x86 model number from CPUID.01H:EAX. Signed-off-by: Jim Mattson <jmattson@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220115052431.447232-6-jmattson@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
398f9240f9
commit
2ba9047424
@ -378,6 +378,11 @@ static inline unsigned int x86_family(unsigned int eax)
|
||||
return x86;
|
||||
}
|
||||
|
||||
static inline unsigned int x86_model(unsigned int eax)
|
||||
{
|
||||
return ((eax >> 12) & 0xf0) | ((eax >> 4) & 0x0f);
|
||||
}
|
||||
|
||||
struct kvm_x86_state *vcpu_save_state(struct kvm_vm *vm, uint32_t vcpuid);
|
||||
void vcpu_load_state(struct kvm_vm *vm, uint32_t vcpuid,
|
||||
struct kvm_x86_state *state);
|
||||
|
Loading…
Reference in New Issue
Block a user