Niels de Vos | 28 Jan 16:54
Favicon
Gravatar

[PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter

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
(Continue reading)

Niels de Vos | 28 Jan 16:54
Favicon
Gravatar

[PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already

From: Niels de Vos <niels <at> nixpanic.net>

This should fix issues with qemu-system-{arm,ppc} and possibly others
where libvirt passes bus=pci.0 in the -device options.

Reference:
- https://bugzilla.redhat.com/show_bug.cgi?id=667345

Signed-off-by: Niels de Vos <devos <at> fedoraproject.org>
---
 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/realview.c      |    2 +-
 hw/sh_pci.c        |    2 +-
 hw/unin_pci.c      |    4 ++--
 hw/versatile_pci.c |    2 +-
 hw/versatilepb.c   |    2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/hw/apb_pci.c b/hw/apb_pci.c
index 84e9af7..da8df91 100644
--- a/hw/apb_pci.c
+++ b/hw/apb_pci.c
@@ -348,7 +348,7 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base,
     sysbus_mmio_map(s, 2, special_base + 0x2000000ULL);
(Continue reading)

Blue Swirl | 29 Jan 22:44
Picon

Re: [PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already

On Fri, Jan 28, 2011 at 3:54 PM, Niels de Vos <devos <at> fedoraproject.org> wrote:
> From: Niels de Vos <niels <at> nixpanic.net>
>
> This should fix issues with qemu-system-{arm,ppc} and possibly others
> where libvirt passes bus=pci.0 in the -device options.

Nack, please see the list archives for discussion.

Niels de Vos | 30 Jan 18:40
Favicon
Gravatar

Re: [PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already

On Sat, Jan 29, 2011 at 9:44 PM, Blue Swirl <blauwirbel <at> gmail.com> wrote:
> On Fri, Jan 28, 2011 at 3:54 PM, Niels de Vos <devos <at> fedoraproject.org> wrote:
>> From: Niels de Vos <niels <at> nixpanic.net>
>>
>> This should fix issues with qemu-system-{arm,ppc} and possibly others
>> where libvirt passes bus=pci.0 in the -device options.
>
> Nack, please see the list archives for discussion.
>

Thanks for the reply. Daniel Berrange posted something similar on the
[PATCH 0/1] message.

Pointer to the archives in case someone else is interested:
- http://comments.gmane.org/gmane.comp.emulators.qemu/70783

Cheers,
Niels

Daniel P. Berrange | 28 Jan 17:12
Picon
Favicon

Re: [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter

On Fri, Jan 28, 2011 at 03:54:01PM +0000, Niels de Vos wrote:
> 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.
> 
(Continue reading)

Niels de Vos | 30 Jan 18:42
Favicon
Gravatar

Re: [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter

On Fri, Jan 28, 2011 at 4:12 PM, Daniel P. Berrange <berrange <at> redhat.com> wrote:
> On Fri, Jan 28, 2011 at 03:54:01PM +0000, Niels de Vos wrote:
>> 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.
(Continue reading)


Gmane