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: Jan Kiszka
Subject: Re: [Qemu-devel] Re: [PATCH] create kvm-shared-all.c and kvm-shared.h
Date: Tue, 09 Jun 2009 18:42:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux




reply via email to

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