All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH] enable architectural PMU cpuid leaf for kvm
Date: Thu, 15 Dec 2011 17:13:02 +0200	[thread overview]
Message-ID: <20111215151302.GF12029@redhat.com> (raw)
In-Reply-To: <4EEA0DAC.3090209@codemonkey.ws>

On Thu, Dec 15, 2011 at 09:09:32AM -0600, Anthony Liguori wrote:
> On 12/15/2011 04:44 AM, Gleb Natapov wrote:
> >
> >Signed-off-by: Gleb Natapov<gleb@redhat.com>
> 
> This should go in via uq/master.
uq/master maintainers can you take it?

> 
> Regards,
> 
> Anthony Liguori
> 
> >diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
> >index 0b3af90..91a104b 100644
> >--- a/target-i386/cpuid.c
> >+++ b/target-i386/cpuid.c
> >@@ -1180,10 +1180,19 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
> >          break;
> >      case 0xA:
> >          /* Architectural Performance Monitoring Leaf */
> >-        *eax = 0;
> >-        *ebx = 0;
> >-        *ecx = 0;
> >-        *edx = 0;
> >+        if (kvm_enabled()) {
> >+            KVMState *s = env->kvm_state;
> >+
> >+            *eax = kvm_arch_get_supported_cpuid(s, 0xA, count, R_EAX);
> >+            *ebx = kvm_arch_get_supported_cpuid(s, 0xA, count, R_EBX);
> >+            *ecx = kvm_arch_get_supported_cpuid(s, 0xA, count, R_ECX);
> >+            *edx = kvm_arch_get_supported_cpuid(s, 0xA, count, R_EDX);
> >+        } else {
> >+            *eax = 0;
> >+            *ebx = 0;
> >+            *ecx = 0;
> >+            *edx = 0;
> >+        }
> >          break;
> >      case 0xD:
> >          /* Processor Extended State */
> >--
> >			Gleb.
> >
> >

--
			Gleb.

      reply	other threads:[~2011-12-15 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 10:44 [Qemu-devel] [PATCH] enable architectural PMU cpuid leaf for kvm Gleb Natapov
2011-12-15 15:09 ` Anthony Liguori
2011-12-15 15:13   ` Gleb Natapov [this message]

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=20111215151302.GF12029@redhat.com \
    --to=gleb@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.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 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.