From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MFA6r-0003qq-Mw for qemu-devel@nongnu.org; Fri, 12 Jun 2009 13:00:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MFA6n-0003dJ-Qg for qemu-devel@nongnu.org; Fri, 12 Jun 2009 13:00:09 -0400 Received: from [199.232.76.173] (port=46972 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFA6n-0003br-A3 for qemu-devel@nongnu.org; Fri, 12 Jun 2009 13:00:05 -0400 Received: from qw-out-1920.google.com ([74.125.92.149]:24374) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MFA6n-0005bv-2x for qemu-devel@nongnu.org; Fri, 12 Jun 2009 13:00:05 -0400 Received: by qw-out-1920.google.com with SMTP id 4so1217666qwk.4 for ; Fri, 12 Jun 2009 10:00:04 -0700 (PDT) Message-ID: <4A328991.3040006@codemonkey.ws> Date: Fri, 12 Jun 2009 12:00:01 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities] References: <20090610145540.GI19375@poweredge.glommer> <20090610150129.GC28601@redhat.com> <200906101624.30659.paul@codesourcery.com> <20090610174301.GC7416@shareable.org> <20090610182227.GN28601@redhat.com> <20090610192702.GH7416@shareable.org> <1244796209.16425.20.camel@blaa> <4A326B5C.5010501@codemonkey.ws> <1244821292.30522.56.camel@blaa> <4A327E4A.7010300@codemonkey.ws> <1244825303.26769.19.camel@blaa> In-Reply-To: <1244825303.26769.19.camel@blaa> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Carsten Otte , kvm@vger.kernel.org, "Michael S. Tsirkin" , Glauber Costa , Rusty Russell , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, Blue Swirl , Christian Borntraeger , Paul Brook , Avi Kivity Mark McLoughlin wrote: > So, when libvirt creates a guest for the first time, it makes a copy of > the device tree and continues to use that even if qemu is upgraded. > That's enough to ensure compat is retained for all built-in devices. > > However, in order to retain compat for that SCSI device (e.g. ensuring > the PCI address doesn't change as other devices are added an removed), > we're back to the same problem ... either: > > 1) Use '-drive file=foo.img,if=scsi,pci_addr=foo'; in order to figure > out what address to use, libvirt would need to query qemu for what > address was originally allocated to device or it would do all the > PCI address allocation itself ... or: > > 2) Don't use the command line, instead get a dump of the entire > device tree (including the SCSI device) - if the device is to be > removed or modified in future, libvirt would need to modify the > device tree > > The basic problem would be that the command line config would have very > limited ability to override the device tree config. > After libvirt has done -drive file=foo... it should dump the machine config and use that from then on. To combined to a single thread... > How do you add a new attribute to the device tree and, when a supplied > device tree lacking said attribute, distinguish between a device tree > from an old version of qemu (i.e. use the old default) and a partial > device tree from the VM manager (i.e. use the new default) ? > Please define "attribute". I don't follow what you're asking. >> NB the device tree contains no host configuration information. >> > > So, it wouldn't e.g. include the path to the image file for a block > device? That would always be specified on the command line? > No, the IDE definition would contain some sort of symbolic node name. A separate mechanism (either command line or host config file) would then link a image file to the symbolic name. libvirt should really never worry about the machine config file for normal things unless it needs to change what devices are exposed to a guest. Regards, Anthony Liguori