Patchwork Re: New kvm-related qemu patch queue

login
register
mail settings
Submitter Gleb Natapov
Date Jan. 11, 2010, 7:51 a.m.
Message ID <20100111075130.GA7549@redhat.com>
Download mbox | patch
Permalink /patch/42591/
State New
Headers show

Comments

Gleb Natapov - Jan. 11, 2010, 7:51 a.m.
On Sun, Jan 10, 2010 at 04:52:48PM +0200, Avi Kivity wrote:
> On 01/10/2010 04:49 PM, Gleb Natapov wrote:
> >
> >>If the feature is already in both, then morph qemu-kvm.git into what
> >>is already in qemu.git.  Hopefully anything missing in qemu.git will
> >>be discovered while making the changes.
> >>
> >What about bugs that are present only in qemu.git? Like this:
> >http://patchwork.ozlabs.org/patch/42298/. Should it go through
> >qemu-kvm.git/uq/master?
> 
> Yes.  So there is a central place for kvm patches, and so they see autotest.
> 
So I assume you'll take it then.

> 
> >What about this one: http://patchwork.ozlabs.org/patch/42447/ should it
> >be postponed untill qemu.git and qemu-kvm.git converge on using the same
> >cpuid infrastructure, or add similar functionality to qemu-kvm to,
> >or add new cpu flags to qemu-kvm only and when cpuid code converge
> >qemu.git will have it too?
> 
> Best to make qemu-kvm.git and qemu.git converge first.  Duplicating
> the patch extends the problem.  Of course if something is urgent we
> can bypass the process.
> 
Actually, looking into it, this patch is needed for qemu-kvm.git and qemu.git
to converge. For qemu-kvm to use kvm -cpu flags the patch below should
be applied on top of the previous patch.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.

Patch

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 82e362c..b3c371c 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1308,7 +1308,7 @@  int kvm_arch_init_vcpu(CPUState *cenv)
     pv_ent = &cpuid_ent[cpuid_nent++];
     memset(pv_ent, 0, sizeof(*pv_ent));
     pv_ent->function = KVM_CPUID_FEATURES;
-    pv_ent->eax = get_para_features(kvm_context);
+    pv_ent->eax = cenv->cpuid_kvm_features & get_para_features(kvm_context);
 #endif
 
     kvm_trim_features(&cenv->cpuid_features,