qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: kvm@vger.kernel.org
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, avi@redhat.com
Subject: [Qemu-devel] [PATCH 2/3] add kvmclock to its second bit
Date: Thu, 17 Mar 2011 19:42:06 -0300	[thread overview]
Message-ID: <1300401727-5235-3-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1300401727-5235-1-git-send-email-glommer@redhat.com>

We have two bits that can represent kvmclock in cpuid.
They signal the guest which msr set to use. When we tweak flags
involving this value - specially when we use "-", we have to act on both.

Besides adding it to the kvm features list, we also have to "break" the
assumption represented by the break in lookup_feature.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 target-i386/cpuid.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index d28de20..48f9bbd 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -73,7 +73,7 @@ static const char *ext3_feature_name[] = {
 };
 
 static const char *kvm_feature_name[] = {
-    "kvmclock", "kvm_nopiodelay", "kvm_mmu", NULL, "kvm_asyncpf", NULL, NULL, NULL,
+    "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock", "kvm_asyncpf", NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -193,7 +193,6 @@ static int lookup_feature(uint32_t *pval, const char *s, const char *e,
     for (mask = 1, ppc = featureset; mask; mask <<= 1, ++ppc)
         if (*ppc && !altcmp(s, e, *ppc)) {
             *pval |= mask;
-            break;
         }
     return (mask ? 1 : 0);
 }
-- 
1.7.2.3

  parent reply	other threads:[~2011-03-17 22:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 22:42 [Qemu-devel] [PATCH 0/3] enable newer msr set for kvm Glauber Costa
2011-03-17 22:42 ` [Qemu-devel] [PATCH 1/3] use kernel-provided para_features instead of statically coming up with new capabilities Glauber Costa
2011-03-24 10:27   ` [Qemu-devel] " Avi Kivity
2011-03-17 22:42 ` Glauber Costa [this message]
2011-03-17 22:42 ` [Qemu-devel] [PATCH 3/3] don't create kvmclock when one of the flags are present Glauber Costa
2011-03-18 10:24   ` [Qemu-devel] " Jan Kiszka
2011-03-18 14:29     ` Glauber Costa
2011-03-24 10:37 ` [Qemu-devel] Re: [PATCH 0/3] enable newer msr set for kvm Avi Kivity
2011-03-24 10:37   ` 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=1300401727-5235-3-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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 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).