public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Kwon <jkwon@redback.com>
To: kvm@vger.kernel.org
Subject: KVM PCI passthrough IRQ limitations
Date: Tue, 03 Mar 2009 14:15:34 -0800	[thread overview]
Message-ID: <49ADAC06.5040407@redback.com> (raw)

Hello,

I am attempting to make use of '-pcidevice' on my system, but have run 
into some problems.  First, my setup:

Fedora 10 x86_64 host system
2.6.28.1-19.fc10 kernel from Koji
KVM-84
Debian Lenny guest VM

I am attempting to passthrough a Xilinx FPGA device to the Lenny guest. 
  No driver for this device exists on the host.

% /usr/local/kvm/bin/qemu-system-x86_64 ./vdisk.img -m 384 -pcidevice 
host=02:00.0
init_assigned_device: Registering real physical device 02:00.0 (bus=2 
dev=0 func=0)
get_real_device: region 0 size 1024 start 0xe1200000 type 512 resource_fd 12
Failed to assign irq for "02:00.0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?

When the Fedora host was first booted, the Xilinx was assigned IRQ 10, 
which appeared to be unshared:

02:00.0 Memory controller: Xilinx Corporation Device 0007
         Subsystem: Xilinx Corporation Device 0007
         Flags: bus master, fast devsel, latency 0, IRQ 10
         Memory at e1200000 (64-bit, non-prefetchable) [size=1K]
         Capabilities: <access denied>

However, after executing qemu-system-x86_64, lspci showed the Xilinx 
assigned to IRQ 16, which is shared with a SATA controller:

02:00.0 Memory controller: Xilinx Corporation Device 0007
         Subsystem: Xilinx Corporation Device 0007
         Flags: fast devsel, IRQ 16
         Memory at e1200000 (64-bit, non-prefetchable) [size=1K]
         Capabilities: [40] Power Management version 3
         Capabilities: [48] Message Signalled Interrupts: Mask+ 64bit+ 
Count=1/1 Enable-
         Capabilities: [60] Express Endpoint, MSI 00
         Capabilities: [100] Device Serial Number XX-XX-XX-XX-XX-XX-XX-XX

Moving the card to a different slot gave the same results.

My hope is to eventually have two Xilinx FPGA cards in the same system, 
and to passthrough each card to its own VM instance.  Would such a 
scheme be possible?  Is there a way around the IRQ assignment failure?

Thanks,

Jason

             reply	other threads:[~2009-03-03 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 22:15 Jason Kwon [this message]
2009-03-03 22:36 ` KVM PCI passthrough IRQ limitations Chris Wright
2009-03-03 23:26   ` Jason Kwon
2009-03-03 23:33     ` Chris Wright
2009-03-04  1:15       ` Jason Kwon
2009-03-04  1:58         ` Chris Wright
2009-03-04  2:35         ` Sheng Yang

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=49ADAC06.5040407@redback.com \
    --to=jkwon@redback.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox