qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] create kvm-shared-all.c and kvm-shared.h


From: Glauber Costa
Subject: Re: [Qemu-devel] Re: [PATCH] create kvm-shared-all.c and kvm-shared.h
Date: Tue, 9 Jun 2009 13:51:23 -0300
User-agent: Jack Bauer

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
> <upstream code>
> #endif
> 
> int kvm_ioctl(KVMState *s, int type, ...)
> ...
> 
> #ifdef DONT_USE_UPSTREAM_YET
> <some more upstream code>
> #endif
> 
> <libkvm code>
> 
> 
> 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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]