From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ian Campbell <ijc@hellion.org.uk>
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: [PATCHv2] x86info: dump kvm cpuid's
Date: Wed, 2 May 2012 12:50:55 +0300 [thread overview]
Message-ID: <20120502095053.GA31543@redhat.com> (raw)
In-Reply-To: <1335951927.26758.24.camel@zakaz.uk.xensource.com>
On Wed, May 02, 2012 at 10:45:27AM +0100, Ian Campbell wrote:
> On Tue, 2012-05-01 at 16:04 +0300, Gleb Natapov wrote:
> > > BTW, according to arch/x86/include/asm/kvm_para.h unsurprisingly KVM has
> > > a signature too 'KVMKVMKVM'.
> > >
> > > > cpu->stepping = eax & 0xf;
> > > > cpu->model = (eax >> 4) & 0xf;
> > > > cpu->family = (eax >> 8) & 0xf;
> > > > @@ -29,6 +29,19 @@ void get_cpu_info_basics(struct cpudata *cpu)
> > > >
> > > > cpuid(cpu->number, 0xC0000000, &maxei, NULL, NULL, NULL);
> > > > cpu->maxei2 = maxei;
> > > > + if (ecx & 0x80000000) {
> > > > + cpuid(cpu->number, 0x40000000, &maxhv, NULL, NULL, NULL);
> > > > + /*
> > > > + * KVM up to linux 3.4 reports 0 as the max hypervisor leaf,
> > > > + * where it really means 0x40000001.
> > >
> > > This is something where I definitely think you want to check the
> > > signature first.
> > In theory yes, but in practice what will this break?
>
> I've got no idea -- but what's the harm in checking?
>
> Ian.
Users can set kvm signature to anything, if they do
debugging will be a bit harder for them.
> --
> Ian Campbell
> Current Noise: Hypocrisy - Roswell 47
>
> Angels we have heard on High
> Tell us to go out and Buy.
> -- Tom Lehrer
next prev parent reply other threads:[~2012-05-02 9:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 14:38 [PATCHv2] x86info: dump kvm cpuid's Michael S. Tsirkin
2012-04-30 15:03 ` Gleb Natapov
2012-05-01 12:27 ` Ian Campbell
2012-05-01 12:35 ` Michael S. Tsirkin
2012-05-01 13:04 ` Gleb Natapov
2012-05-02 9:45 ` Ian Campbell
2012-05-02 9:50 ` Michael S. Tsirkin [this message]
2012-05-02 9:58 ` [Xen-devel] " Ian Campbell
2012-09-05 17:33 ` Michael S. Tsirkin
2012-12-06 11:41 ` Michael S. Tsirkin
2012-12-06 14:48 ` Dave Jones
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=20120502095053.GA31543@redhat.com \
--to=mst@redhat.com \
--cc=davej@redhat.com \
--cc=devel@linuxdriverproject.org \
--cc=ijc@hellion.org.uk \
--cc=kvm@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).