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: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 06/40] qdev-ify: xen backends
Date: Tue, 02 Nov 2010 11:43:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat/3.1.3-1.el6 Thunderbird/3.1.3

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 ...

+    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.

cheers,
  Gerd



reply via email to

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