qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Niels de Vos <devos@fedoraproject.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter
Date: Fri, 28 Jan 2011 16:12:08 +0000	[thread overview]
Message-ID: <20110128161208.GO26309@redhat.com> (raw)
In-Reply-To: <1296230042-26336-1-git-send-email-devos@fedoraproject.org>

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

Personally I think it would have been nice if QEMU used a consistent
name across all arches when we first introduced qdev, and indeed I
did proposed this exact change in the past. There was no clear agreement
to it before though, and if anything there was a slight preference to
use 'pci.0' everywhere. We've now had several QEMU releases with this
mix of naming, so changing it at this stage would cause even more
pain for mgmt apps.

So it is probably best to teach libvirt to use either 'pci' or 'pci.0'
as appropropriate for the arch in question.

Regards,
Daniel

  parent reply	other threads:[~2011-01-28 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 15:54 [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter Niels de Vos
2011-01-28 15:54 ` [Qemu-devel] [PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already Niels de Vos
2011-01-29 21:44   ` Blue Swirl
2011-01-30 17:40     ` Niels de Vos
2011-01-28 16:12 ` Daniel P. Berrange [this message]
2011-01-30 17:42   ` [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter Niels de Vos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110128161208.GO26309@redhat.com \
    --to=berrange@redhat.com \
    --cc=devos@fedoraproject.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).