All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: xen-devel@lists.xensource.com, kvm@vger.kernel.org,
	pv-drivers@vmware.com, virtualization@lists.linux-foundation.org,
	devel@linuxdriverproject.org, davej@redhat.com
Subject: Re: x86info: dump kvm cpuid's
Date: Mon, 30 Apr 2012 12:41:19 +0300	[thread overview]
Message-ID: <20120430094119.GI15413@redhat.com> (raw)
In-Reply-To: <20120430093811.GC5414@redhat.com>

On Mon, Apr 30, 2012 at 12:38:13PM +0300, Michael S. Tsirkin wrote:
> On Mon, Apr 30, 2012 at 11:43:19AM +0300, Gleb Natapov wrote:
> > On Sun, Apr 29, 2012 at 01:10:21PM +0300, Michael S. Tsirkin wrote:
> > > The following makes 'x86info -r' dump kvm cpu ids
> > > (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
> > > 
> > > On the host it just adds a couple of zero lines:
> > > eax in: 0x40000000, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
> > > eax in: 0x40000001, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
> > > 
> > This is too KVM specific.
> 
> That's what I have. I scratch my own itch.
> 
> > Other hypervisors may use more cpuid leafs.
> 
> But not less so no harm's done.
> 
> > As far as I see Hyper-V uses 5 and use cpuid.0x40000000.eax as max cpuid
> > leaf available. Haven't checked Xen or VMWare.
> 
> I don't think guessing at the CPU behaviour from linux source
> is the right thing to do.
> 
That is guessing from Hyper-V specification. The best kind of guess.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff542700%28v=vs.85%29.aspx

> I Cc'd some addresses found in MAINTAINERS in the linux
> kernel. This will give more people the opportunity
> to ask for their stuff to be added, if they care.
> 
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > 
> > > ---
> > > 
> > > Dave - not sure whether there's a mailing list for x86info.
> > > The patch is on top of the master branch in
> > > git://git.codemonkey.org.uk/x86info.git
> > > 
> > > Thanks!
> > > 
> > > diff --git a/x86info.c b/x86info.c
> > > index 22c4734..dee5ed1 100644
> > > --- a/x86info.c
> > > +++ b/x86info.c
> > > @@ -44,6 +44,7 @@ static void display_detailed_info(struct cpudata *cpu)
> > >  
> > >  		if (cpu->maxei2 >=0xC0000000)
> > >  			dump_raw_cpuid(cpu->number, 0xC0000000, cpu->maxei2);
> > > +		dump_raw_cpuid(cpu->number, 0x40000000, 0x40000001);
> > >  	}
> > >  
> > >  	if (show_cacheinfo) {
> > 
> > --
> > 			Gleb.

--
			Gleb.

  reply	other threads:[~2012-04-30  9:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29 10:10 x86info: dump kvm cpuid's Michael S. Tsirkin
2012-04-30  8:43 ` Gleb Natapov
2012-04-30  9:38   ` Michael S. Tsirkin
2012-04-30  9:41     ` Gleb Natapov [this message]
2012-05-01 10:29     ` [Xen-devel] " Ian Campbell
2012-05-01 10:50       ` Michael S. Tsirkin
2012-05-01 12:17         ` Ian Campbell
2012-05-01 12:17         ` Ian Campbell
2012-05-01 10:50       ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120430094119.GI15413@redhat.com \
    --to=gleb@redhat.com \
    --cc=davej@redhat.com \
    --cc=devel@linuxdriverproject.org \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pv-drivers@vmware.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.