From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52523 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiqeM-00079A-Ut for qemu-devel@nongnu.org; Fri, 28 Jan 2011 10:54:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiqeK-0001cT-0s for qemu-devel@nongnu.org; Fri, 28 Jan 2011 10:54:13 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:37602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiqeJ-0001c4-SY for qemu-devel@nongnu.org; Fri, 28 Jan 2011 10:54:11 -0500 Received: by wyg36 with SMTP id 36so3435707wyg.4 for ; Fri, 28 Jan 2011 07:54:10 -0800 (PST) Sender: Niels de Vos From: Niels de Vos Date: Fri, 28 Jan 2011 15:54:01 +0000 Message-Id: <1296230042-26336-1-git-send-email-devos@fedoraproject.org> Subject: [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Niels de Vos Hi there, obviously qemu-system-$ARCH, qemu-kvm and libvirt disagree about the most suitable name for the PCI-bus. qemu-kvm and libvirt work nicely together by using "pci.0" as name. Unfortunately libvirt seems to assume that also for qemu-system-$ARCH the name "pci.0" should be passed on the command line. When doing so, errors like "Bus 'pci.0' not found" get logged and qemu aborts. This seems to be a very common case, googling for this seems to reveal that loads of users have similar experiences. A common workaround seems to be to write a little loader script that replaces parameters passed on to qemu-system-$ARCH by valid ones (here: s/bus=pci.0/bus=pci/). As a user, I would really like to be able to start any type of emulated machine, without needing to know the internal hardware layout. Passing bus=pci seems sane to me, but unfortunately qemu-kvm does not accept this. (At least on my standard configuration.) I guess that qemu-kvm is behaving as intended, and qemu-system-$ARCH missed a hardware upgrade. In order to make libvirt, qemu-kvm and qemu-system-$ARCH work together, I have changed the default name "pci" for emulated machines by "pci.0". The tests I have done so far are succesful. However changing the name is only one possible solution, and there is a major drawback... Any old scripts that pass bus=pci on the command line, will not work anymore and result in a "Bus 'pci' not found" error. Therefor I do not know if this is the correct route to succes. An alternative solution would be to match any bus-names from the command line appended with ".0" to their non-numbered equivalent. I'm looking for thoughts and guidance on this issue. It can well be that qemu is not the right place to fix this, and I should look into libvirt instead. Many thanks, Niels -- Niels de Vos (1): Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already hw/apb_pci.c | 2 +- hw/bonito.c | 2 +- hw/grackle_pci.c | 2 +- hw/gt64xxx.c | 2 +- hw/ppc4xx_pci.c | 2 +- hw/ppce500_pci.c | 2 +- hw/prep_pci.c | 2 +- hw/sh_pci.c | 2 +- hw/unin_pci.c | 4 ++-- hw/versatile_pci.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) -- 1.7.3.5