Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ME4S2-00020F-Es for qemu-devel@nongnu.org; Tue, 09 Jun 2009 12:45:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ME4Rw-0001uX-Vn for qemu-devel@nongnu.org; Tue, 09 Jun 2009 12:45:29 -0400 Received: from [199.232.76.173] (port=49906 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ME4Rw-0001uK-QD for qemu-devel@nongnu.org; Tue, 09 Jun 2009 12:45:24 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35665) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ME4Rw-0008Jz-9f for qemu-devel@nongnu.org; Tue, 09 Jun 2009 12:45:24 -0400 Date: Tue, 9 Jun 2009 13:51:23 -0300 From: Glauber Costa Subject: Re: [Qemu-devel] Re: [PATCH] create kvm-shared-all.c and kvm-shared.h Message-ID: <20090609165123.GQ11966@poweredge.glommer> References: <1244563466-32598-1-git-send-email-glommer@redhat.com> <4A2E8B15.3010401@siemens.com> <4A2E8D52.4080600@redhat.com> <20090609163906.GO11966@poweredge.glommer> <4A2E9104.3010504@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2E9104.3010504@siemens.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, Avi Kivity , qemu-devel@nongnu.org On Tue, Jun 09, 2009 at 06:42:44PM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > On Tue, Jun 09, 2009 at 07:26:58PM +0300, Avi Kivity wrote: > >> Jan Kiszka wrote: > >>> Glauber Costa wrote: > >>> > >>>> Following a suggestion given by Jan, the idea here is to > >>>> move shared pieces between qemu and qemu-kvm.git into a common > >>>> file, so we can do sharing while avoid clashes. > >>>> > >>>> In the future, this files should disappear. > >>>> > >>>> > >>> OK for the header - but why do we have to push the ioctl services into a > >>> separate module? Will all functions qemu-kvm start to use from upstream > >>> have to be pushed around? Or what is special about the ioctls? > >>> > >>> I rather think qemu-kvm should build kvm-all.c and #ifdef out those > >>> parts which collide with its own implementation. Moreover, when we morph > >>> qemu-kvm services for upstream, this could already happen where they > >>> shall once be located: in kvm-all.c or target-*/kvm.c. > >>> > >> Yes, we could simply append libkvm-all.c and qemu-kvm.c to kvm-all.c, > >> and gradually include more of kvm-all.c as we delete parts of libkvm.c > >> and qemu-kvm.c. > > I tried it myself, and it generates tons of conflicts. So scary. > > I'd prefer to do it in the way I propose, until there is nothing left on kvm-all.c > > > > kvm-all.c: > > #ifdef DONT_USE_UPSTREAM_YET > > #endif > > int kvm_ioctl(KVMState *s, int type, ...) > ... > > #ifdef DONT_USE_UPSTREAM_YET > > #endif > > > > > Can't imagine that this is infeasible. And it would all happily live in > qemu-kvm, so upstream would never see these hacks. yeah, if it is in fact ifdef'd this way, it of course works. I can do that, definitely. But by doing that, we probably does not even need the header part here too.