From: Chris Wright <chrisw@sous-sol.org>
To: "Fischer, Anna" <anna.fischer@hp.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
libvir-list@redhat.com
Subject: Re: pci-stub error and MSI-X for KVM guest
Date: Thu, 7 Jan 2010 16:50:03 -0800 [thread overview]
Message-ID: <20100108005003.GA20720@sequoia.sous-sol.org> (raw)
In-Reply-To: <0199E0D51A61344794750DC57738F58E6D723AB1EC@GVW1118EXC.americas.hpqcorp.net>
* Fischer, Anna (anna.fischer@hp.com) wrote:
> So, when setting a breakpoint for the exit() call I'm getting a bit closer to figuring where it kills my guest.
Thanks, this helps clarify what is happening.
> Breakpoint 1, exit (status=1) at exit.c:99
> 99 {
> Current language: auto
> The current source language is "auto; currently c".
> (gdb) bt
> #0 exit (status=1) at exit.c:99
> #1 0x0000000000470c6e in assigned_dev_pci_read_config (d=0x259c6f0, address=64, len=4)
assigned_dev_pci_read_config(..., 64, 4)
^^
This is a libvirt issue. When you use virt-manager it has libvirtd
fork/exec qemu-kvm. libvirtd will drop privileges and run qemu-kvm as
user qemu (or perhaps root if you've edited qemu.conf). Regardless of
the user, it clears capabilities. Reading PCI config space beyond just
the header requires CAP_SYS_ADMIN. The above is reading the first 4
bytes of device dependent config space, and the kernel is returning 0
because qemu doesn't have CAP_SYS_ADMIN.
Basically, this means that device assignment w/ libvirt will break
MSI/MSI-X because qemu will never be able to see that the host device
has those PCI capabilities. This, in turn, renders VF device assignment
useless (since a VF is required to support MSI and/or MSI-X).
Granting CAP_SYS_ADMIN for each qemu instance that does device assignment
would render the privilege reduction useless (CAP_SYS_ADMIN is the
kitchen sink catchall of the Linux capability system).
Hmmph...
next prev parent reply other threads:[~2010-01-08 0:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-21 18:15 pci-stub error and MSI-X for KVM guest Fischer, Anna
2009-12-21 19:19 ` Chris Wright
2009-12-21 19:34 ` Fischer, Anna
2009-12-21 19:58 ` Chris Wright
2010-01-04 11:37 ` Fischer, Anna
2010-01-04 15:16 ` Chris Wright
2010-01-05 10:25 ` Fischer, Anna
2010-01-08 0:50 ` Chris Wright [this message]
2010-01-08 11:04 ` Daniel P. Berrange
2010-01-08 18:03 ` Chris Wright
2010-01-04 11:42 ` Fischer, Anna
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=20100108005003.GA20720@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=anna.fischer@hp.com \
--cc=kvm@vger.kernel.org \
--cc=libvir-list@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.