qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/40] qdev-ify: xen backends


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 06/40] qdev-ify: xen backends
Date: Tue, 02 Nov 2010 14:26:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

> On 11/02/10 11:08, Markus Armbruster wrote:
>> Alexander Graf<address@hidden>  writes:
>>
>>> From: Gerd Hoffmann<address@hidden>
>>>
>>> This patch converts the xen backend code to qdev.
>>
>> qdev conversions are always welcome.  This one's not complete (search
>> for #if 0).
>
> It is a tricky one too.
>
> Creating the xen backend device instances is controlled via xenstore
> (either emulated in case of xenner or xenstored when running on
> Xen). When creating block/net backends via qemu command line switches
> all qemu does is creating the xenstore entries.  Having a external
> entity (i.e. xend) creating the xenstore entries works too.
>
> This workflow is a bit hard to fit into the qdev model ...

I'm fine with imperfect qdev conversions, as long as the issues make
things no worse then they were before (check, I think), they're clearly
documented in the source (check, although the comment could be
improved), and in the commit message (fail, but easy enough to fix).

>>> +    do {
>>> +        done = 1;
>>> +        QLIST_FOREACH(qdev,&xenbus->qbus.children, sibling) {
>>> +            xendev = container_of(qdev, struct XenDevice, qdev);
>
> [ ... ]
>
>>> +            done = 0;
>>> +            break;
>>> +        }
>>> +    } while (!done);
>>
>> This loop nest confuses me.  Why can't we just QLIST_FOREACH_SAFE()?
>
> Just historical reasons I guess.  QLIST_FOREACH_SAFE() wasn't there
> from the start but got added later.

I'd like that to be cleaned up then.



reply via email to

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