[PATCHv2] x86info: dump kvm cpuid's

Michael S. Tsirkin
Wed, 05 Sep 2012 17:33:35 -0000

On Mon, Apr 30, 2012 at 05:38:35PM +0300, Michael S. Tsirkin
wrote:
> The following makes 'x86info -r' dump hypervisor leaf cpu ids
> (for kvm this is signature+features) when running in a vm.
>
> On the guest we see the signature and the features:
> eax in: 0x40000000, eax = 00000000 ebx = 4b4d564b ecx = 564b4d56 edx =
0000004d
> eax in: 0x40000001, eax = 0100007b ebx = 00000000 ecx = 00000000 edx =
00000000
>
> Hypervisor flag is checked to avoid output changes when not
> running on a VM.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
>
> Changes from v1:
> 	Make work on non KVM hypervisors (only KVM was tested).
> 	Avi Kivity said kvm will in the future report
> 	max HV leaf in eax. For now it reports eax = 0
>         so add a work around for that.

Ping.
Davej, any comments?
Would be nice to have this in.