Received: from eggs.gnu.org ([2001:4830:134:3::10]:34877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0wNI-00011y-8h for qemu-devel@nongnu.org; Wed, 08 Jan 2014 11:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0wNC-0006wF-8L for qemu-devel@nongnu.org; Wed, 08 Jan 2014 11:53:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0wNB-0006w4-UW for qemu-devel@nongnu.org; Wed, 08 Jan 2014 11:52:54 -0500 From: Markus Armbruster References: <1387503694-11203-1-git-send-email-agraf@suse.de> <87lhzelc2k.fsf@blackfin.pond.sub.org> <52B6EC8F.8080107@redhat.com> <87k3ebddw0.fsf@blackfin.pond.sub.org> <52CC3275.9010502@redhat.com> <87iotvk863.fsf@blackfin.pond.sub.org> <52CD5AEA.4050905@redhat.com> <8761pufsmr.fsf@blackfin.pond.sub.org> <52CD6C2F.3000101@redhat.com> Date: Wed, 08 Jan 2014 17:52:47 +0100 In-Reply-To: <52CD6C2F.3000101@redhat.com> (Paolo Bonzini's message of "Wed, 08 Jan 2014 16:18:07 +0100") Message-ID: <874n5e8lgg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2] qdev: Keep global allocation counter per bus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Crosthwaite , Alexander Graf , Anthony Liguori , QEMU Developers Paolo Bonzini writes: > Il 08/01/2014 15:35, Markus Armbruster ha scritto: >> Paolo Bonzini writes: >> >>> Leaving only those that will be affected by the patch: >> >> You omitted akita, borzoi, connex, mainstone, nuri, smdkc210, spitz, >> terrier, tosa, verdex, z2, s390-virtio. Why won't they be affected? > > Because the dup bus names are hardcoded in the board: > > i2cbus = i2c_init_bus(dev, "dummy"); > > or in the device: > > s->spi = g_new(SSIBus *, s->num_busses); > for (i = 0; i < s->num_busses; ++i) { > char bus_name[16]; > snprintf(bus_name, 16, "spi%d", i); > s->spi[i] = ssi_create_bus(dev, bus_name); > } > > Only dups of the "xyzzy.NN" form have their bus names created by qdev > core. For other buses this patch changes nothing (neither for better, > nor for worse). Ah, right. These duplicates are just as wrong. But demanding everything gets fixed usually gets us nothing fixed, so I'm not going to do that. >> You also omitted the machines that I can't get to start, but I'm not >> overly worried by them, because they're all either Xen, where I don't >> expect differences to plain x86, or ppcemb, where Alex gets to clean up >> any mess he might make. > > Right. In particular xenfv is just a PIIX PC, plus the (non qdev) Xen > PV bus. And xenpv is just the Xen PV bus. > >>> Il 07/01/2014 18:34, Markus Armbruster ha scritto: >>>> target machine bus id times >>>> aarch64 n800 i2c-bus.0 2 >>>> aarch64 n810 i2c-bus.0 2 >>>> arm n800 i2c-bus.0 2 >>>> arm n810 i2c-bus.0 2 >>> >>> Devices are created explicitly on one of the two buses, using >>> s->mpu->i2c[0], so no change to the guest. >>> >>>> aarch64 vexpress-a15 virtio-mmio-bus.0 4 >>>> aarch64 vexpress-a9 virtio-mmio-bus.0 4 >>>> aarch64 virt virtio-mmio-bus.0 32 >>>> arm vexpress-a15 virtio-mmio-bus.0 4 >>>> arm vexpress-a9 virtio-mmio-bus.0 4 >>>> arm virt virtio-mmio-bus.0 32 >>> >>> With Alex's patch we get the ability to plug the device in a particular >>> slot. If anyone was using virtio-mmio-bus.0 explicitly, they get the >>> first slot instead of the 4th or 32nd. Bugfix. >> >> Doesn't this break migration? If yes, do we care? > > I don't know for sure, but probably not. sysbus doesn't implement > get_dev_path, so it relies on the old instance_id mechanism to > distinguish devices. instance_id is unreliable in general (e.g. with > hotplug), but for command-lines and no hot-plug/hot-unplug it should > work. You do have to be careful and specify bus=virtio-mmio-bus.31 on > the destination if you used bus=virtio-mmio-bus.0 on the source. That's enough breakage to require documenting the issue in the commit message, and possibly release notes. Can be done as part of a single list of affected machines and buses, with a general note on how the interpretation of bus=FOO.0 changes, how that can affect migration, and a hint on possible work-arounds. > BTW if you didn't use bus=virtio-mmio-bus.0, nothing changes because the > logic in qbus_find_recursive is unaffected. > >>>> mips mips ide.0 2 >>>> mips64 mips ide.0 2 >>>> mips64el mips ide.0 2 >>>> mipsel mips ide.0 2 >>> >>> Not affected, the bus is not stored anywhere. >> >> Isn't command line use and migration affected, just like everywhere >> else? > > Right, command-line use of ide.0. Bugfix as in Alex's PPC case, because > makes everything else consistent with PCI IDE which is the only place > where bus=ide.N worked. > > Migration is not affected unless you used ide.0 on the command line. In > other words, migration from old "-drive if=ide,bus=N" to new "-drive > if=none ... -device ...,bus=ide.N" should work. > >>>> ppc g3beige ide.0 2 >>>> ppc mac99 ide.0 2 >>>> ppc prep ide.0 2 >>>> ppc64 g3beige ide.0 2 >>>> ppc64 mac99 ide.0 2 >>>> ppc64 prep ide.0 2 >>> >>> Trusting Alex's tests here. >> >> Our analysis should be recorded in the commit message. With that done, >> I could R-by the patch. > > Alex, can you spin v3 with a new commit message? Yes, please.