From patchwork Mon Jan 11 07:51:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 42591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 09C9DB7C44 for ; Mon, 11 Jan 2010 18:53:21 +1100 (EST) Received: from localhost ([127.0.0.1]:37535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUF5R-0005cm-Bl for incoming@patchwork.ozlabs.org; Mon, 11 Jan 2010 02:53:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUF3s-0005cf-3f for qemu-devel@nongnu.org; Mon, 11 Jan 2010 02:51:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUF3n-0005cI-Ca for qemu-devel@nongnu.org; Mon, 11 Jan 2010 02:51:39 -0500 Received: from [199.232.76.173] (port=36560 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUF3n-0005cF-8X for qemu-devel@nongnu.org; Mon, 11 Jan 2010 02:51:35 -0500 Received: from mx20.gnu.org ([199.232.41.8]:53556) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUF3m-0000ej-LP for qemu-devel@nongnu.org; Mon, 11 Jan 2010 02:51:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUF3l-0000xj-Lr for qemu-devel@nongnu.org; Mon, 11 Jan 2010 02:51:33 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0B7pVws021137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 Jan 2010 02:51:32 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0B7pUjK008170; Mon, 11 Jan 2010 02:51:31 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 5D22818D450; Mon, 11 Jan 2010 09:51:30 +0200 (IST) Date: Mon, 11 Jan 2010 09:51:30 +0200 From: Gleb Natapov To: Avi Kivity Message-ID: <20100111075130.GA7549@redhat.com> References: <4B49C1D3.1070308@redhat.com> <20100110142820.GN4905@redhat.com> <4B49E494.3030400@redhat.com> <20100110144904.GO4905@redhat.com> <4B49E9C0.1020108@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4B49E9C0.1020108@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: qemu-devel , KVM list Subject: [Qemu-devel] Re: New kvm-related qemu patch queue X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. 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,