All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@redhat.com>
To: Kenni Lund <kenni@kelu.dk>
Cc: Chris Wright <chrisw@redhat.com>, Alexander Graf <agraf@suse.de>,
	kvm list <kvm@vger.kernel.org>
Subject: Re: PCI passthrough resource remapping
Date: Tue, 30 Mar 2010 16:58:38 -0700	[thread overview]
Message-ID: <20100330235838.GU11934@x200.localdomain> (raw)
In-Reply-To: <3b1f68ef1003301527p2dd9928alf2f6ead85d678634@mail.gmail.com>

* Kenni Lund (kenni@kelu.dk) wrote:
> 2010/3/30 Chris Wright <chrisw@redhat.com>:
> > * Kenni Lund (kenni@kelu.dk) wrote:
> >> Client dmesg: http://pastebin.com/uNG4QK5j
> >> Host dmesg: http://pastebin.com/jZu3WKZW
> >>
> >> I just verified it and I do get the call trace in the host (which
> >> disables IRQ 19, used by the PCI USB card), exactly at the same second
> >
> > It looks like IRQ 19 is shared between the ehci controller and the
> > ivtv tuner.  What do you see in /proc/interrupts on the host (before
> > you unbind and after you bind to pci stub)?
> 
> Ahh, and even if the ivtv module is not loaded, I will still have a
> shared IRQ, right? I didn't see ivtv in /proc/interrupts before, as I
> unload the ivtv driver on boot in /etc/rc.local, before unbinding the
> ivtv tuner and binding it to pci stub. (the ivtv tuner is normally
> assigned to the same guest, but not now while testing the PCI USB
> card).
> 
> If I don't unload (and unbind/bind) the ivtv driver/tuner on boot in
> /etc/local, I get the following in /proc/interrupts on a clean boot:
> http://pastebin.com/SFQj58LC
> 
> If I now unbind and bind the PCI USB card to pci stub, I get no
> changes in /proc/interrupts.

Sorry, I meant bind to pci_stub and launch guest.  IOW, you should see
kvm_assigned_{msi,msix,intx}_device (from your lspci, I'd expect intx).

What's odd is a device is asserting an interrupt to a line w/ no handler
acking.  The IRQ 19, should have kvm handling the interrupt, in which
case it'd always return IRQ_HANDLED.  And for the case of shared
interrupts, we won't let you start the guest with an assigned device
that's sharing an interrupt.  IOW, we do request_irq() w/out specifying
IRQF_SHARED (meaning we want an exclusive irq).

> So I suppose I'll need to get rid of this shared IRQ before I can
> conclude anything on the patch in git. Hmm, is there some cleaver way
> of fixing this in Linux, or do I have to fix it by changing BIOS IRQ
> settings, disabling hardware and/or moving the hardware around in
> various PCI slots?

The way I typically work around this is simply unbinding the driver from
the device in the host (and thus freeing the irq).

thanks,
-chris

  parent reply	other threads:[~2010-03-30 23:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09  2:45 PCI passthrough resource remapping Ryan C. Underwood
2010-01-09  3:22 ` Alexander Graf
2010-01-10 21:53   ` Ryan C. Underwood
2010-01-10 22:15   ` Ryan C. Underwood
2010-01-14 13:59     ` Avi Kivity
2010-01-14 15:26       ` Ryan C. Underwood
2010-01-14 15:34         ` Avi Kivity
2010-01-14 15:47           ` Michael S. Tsirkin
2010-01-14 15:54             ` Avi Kivity
2010-01-14 18:31               ` Ryan C. Underwood
2010-01-14 19:09                 ` Avi Kivity
2010-01-14 19:34                   ` Ryan C. Underwood
2010-01-16  9:23                     ` Avi Kivity
2010-01-15 13:11                 ` Pasi Kärkkäinen
2010-01-15 13:15                   ` Alexander Graf
2010-03-26  2:37   ` Kenni Lund
2010-03-26  3:00     ` Brian Jackson
2010-03-29 17:23       ` Kenni Lund
2010-03-29 19:17         ` Alexander Graf
2010-03-29 23:00           ` Kenni Lund
2010-03-29 23:12             ` Alexander Graf
2010-03-29 23:47               ` Chris Wright
2010-03-30  0:21                 ` Kenni Lund
2010-03-30  2:08                   ` Chris Wright
2010-03-30 22:27                     ` Kenni Lund
2010-03-30 22:29                       ` Alexander Graf
2010-03-30 23:52                         ` Kenni Lund
2010-03-31  0:59                           ` Chris Wright
2010-03-30 23:58                       ` Chris Wright [this message]
2010-03-31  0:47                         ` Kenni Lund
2010-03-31  1:32                           ` Chris Wright
2010-03-31 10:07                             ` Kenni Lund
2010-03-31 15:15                               ` Chris Wright
2010-03-31 11:43                           ` Kenni Lund
2010-03-31 12:24                             ` Alexander Graf
2010-03-31 13:04                               ` Kenni Lund
2010-03-31 15:18                               ` Chris Wright
2010-03-31 15:23                                 ` Alexander Graf
2010-04-07  5:52                                 ` Avi Kivity

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=20100330235838.GU11934@x200.localdomain \
    --to=chrisw@redhat.com \
    --cc=agraf@suse.de \
    --cc=kenni@kelu.dk \
    --cc=kvm@vger.kernel.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 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.