public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Glauber Costa <glommer@gmail.com>
Cc: Bryan McLellan <btm@loftninjas.org>, kvm@vger.kernel.org
Subject: Re: Accessing pv_info from userland
Date: Sat, 31 Jan 2009 13:36:05 -0600	[thread overview]
Message-ID: <4984A825.3020904@codemonkey.ws> (raw)
In-Reply-To: <5d6222a80901310504x76363751p9c28a63a3f01530@mail.gmail.com>

Glauber Costa wrote:
> On Sat, Jan 31, 2009 at 10:19 AM, Bryan McLellan <btm@loftninjas.org> wrote:
>   
>> Is there any way to access pv_info from userland? It would be useful
>> for determining what type of virtualization the machine was running
>> on.
>>     
>
> there are usually cpuid functions reserved for that.
>
> for kvm, you can run function 0x40000000, and if you get
> ebx =  0x4b4d564b
> ecx =  0x564b4d56
> edx =  0x4d
>
> you're running KVM.
>   

Since this is a pretty standard mechanism, it may make sense to include 
this signature in /proc/cpuinfo if someone is up to writing a patch.  It 
could also be useful to expose the PV features mask in cpuinfo too.

Regards,

Anthony Liguori



  reply	other threads:[~2009-01-31 19:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 12:19 Accessing pv_info from userland Bryan McLellan
2009-01-31 13:04 ` Glauber Costa
2009-01-31 19:36   ` Anthony Liguori [this message]
2009-01-31 19:55     ` Glauber Costa
2009-01-31 20:20       ` Bryan McLellan
2009-01-31 20:26         ` Glauber Costa
2009-01-31 21:08       ` Anthony Liguori
2009-01-31 21:18         ` Alexander Graf
2009-02-01  0:55           ` Anthony Liguori
2009-02-01 17:56             ` Alexander Graf
2009-02-03 10:50       ` Avi Kivity
2009-02-03 15:02         ` Glauber Costa
2009-02-04 14:16           ` Avi Kivity

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=4984A825.3020904@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=btm@loftninjas.org \
    --cc=glommer@gmail.com \
    --cc=kvm@vger.kernel.org \
    /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