All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Sanders <sanders.chris@gmail.com>
To: kvm@vger.kernel.org
Subject: AMD KVM Pci Passthrough reports device busy
Date: Mon, 4 Jun 2012 16:11:29 -0500	[thread overview]
Message-ID: <CALH4D1EJTOBLMh=YaC0AggeddpSchbjjBmqMSmCJs7TTOiscFA@mail.gmail.com> (raw)

Hello, I've been working for several days trying to get Pci
Passthrough to work.  So far the #kvm IRC channel has helped me with a
few suggestions, though that hasn't yet solved the problem.  I'm
running CentOS 6.2 and was suggested I try compiling 3.2.18 kernel
form kernel.org.  This has changed a few of the messages but the guest
still fails to start.

Grepping for AMD-VI produces:
# dmesg | grep AMD-Vi
AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40
AMD-Vi: Lazy IO/TLB flushing enabled

After boot I'm running the following script
echo "unbind pci-pci bridge"
echo "1002 4383" > /sys/bus/pci/drivers/pci-stub/new_id
echo "unbind pci device"
echo "0000:03:07.0" > /sys/bus/pci/drivers/ivtv/unbind
echo "4444 0803" > /sys/bus/pci/drivers/pci-stub/new_id
echo 0000:03:07.0 > /sys/bus/pci/devices/0000\:03\:07.0/driver/unbind
echo 0000:03:07.0 > /sys/bus/pci/drivers/pci-stub/bind

This is lspci -n showing my device behind the Pci-Pci bridge
-[0000:00]-+-00.0
           +-00.2
           +-02.0-[01]--+-00.0
           |            \-00.1
           +-09.0-[02]----00.0
           +-11.0
           +-12.0
           +-12.2
           +-13.0
           +-13.2
           +-14.0
           +-14.1
           +-14.3
           +-14.4-[03]----07.0
           +-14.5
           +-15.0-[04]--
           +-16.0
           +-16.2
           +-18.0
           +-18.1
           +-18.2
           +-18.3
           +-18.4
           \-18.5

My kvm command and error are:
# /usr/libexec/qemu-kvm -m 3048 -net none -device
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive
file=/dev/vg_hdd/lv_sagetv,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
-device pci-assign,host=03:07.0
Failed to assign device "(null)" : Device or resource busy
qemu-kvm: -device pci-assign,host=03:07.0: Device 'pci-assign' could
not be initialized

dmesg after attempting to start shows:
fuse init (API version 7.17)
ivtv 0000:03:07.0: BAR 0: can't reserve [mem 0xf8000000-0xfbffffff pref]
kvm_vm_ioctl_assign_device: Could not get access to device regions
tda9887 5-0043: destroying instance
tuner-simple 5-0061: destroying instance
ivtv 0000:03:07.0: PCI INT A disabled
ivtv: Removed Hauppauge WinTV PVR-350
pci-stub 0000:03:07.0: claimed by stub
pci-stub 0000:03:07.0: claimed by stub
pci-stub 0000:03:07.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
pci-stub 0000:03:07.0: restoring config space at offset 0x1 (was
0x2100000, writing 0x2100002)
assign device 0:3:7.0 failed
pci-stub 0000:03:07.0: PCI INT A disabled

This is on the
3.2.18 kernel
amd_iommu=1
clear_emulator_capabilities = 0
relaxed_acs_check = 1

Any help would be greatly appreciated.  I've just recently bought this
hardware specifically for this purpose and if the motherboard has a
bad IOMMU implementation I'd like to figure it out in time to exchange
it.  This is an GA-970A-D3

Thanks,
Chris
P.S. I'm not subscribed to the list so if this list requires is be
sure to cc me on responses (sanders.chris@gmail.com)

             reply	other threads:[~2012-06-04 21:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 21:11 Chris Sanders [this message]
2012-06-05  3:44 ` AMD KVM Pci Passthrough reports device busy Alex Williamson
2012-06-05 10:39   ` Andreas Hartmann
2012-06-05 14:27     ` Alex Williamson
2012-06-05 15:17       ` Andreas Hartmann
2012-06-05 15:48         ` Alex Williamson
2012-06-05 15:58         ` Andreas Hartmann
2012-06-05 16:19           ` Alex Williamson
2012-06-05 16:55             ` Andreas Hartmann
2012-06-05 18:43               ` Alex Williamson
2012-06-05 20:37                 ` Andreas Hartmann
2012-06-05 21:09                   ` Alex Williamson
2012-06-05 22:02                     ` Andreas Hartmann
2012-06-06  8:12               ` Andreas Hartmann
2012-06-06  8:46                 ` Andreas Hartmann
2012-06-06  9:35                   ` Andreas Hartmann
2012-06-06 16:39                 ` Alex Williamson
2012-06-06 19:17                   ` Andreas Hartmann
2012-06-06 10:11       ` Joerg Roedel
2012-06-25  5:55         ` Andreas Hartmann
2012-06-25 11:22           ` Joerg Roedel
2012-07-11 14:26         ` Andreas Hartmann
2012-07-11 16:58           ` Joerg Roedel
2012-07-11 19:32             ` Andreas Hartmann
2012-07-11 20:01               ` Alex Williamson
2012-06-06  1:32     ` sheng qiu
2012-06-06  3:07       ` Chris Sanders
2012-06-06  3:25         ` Alex Williamson
2012-06-06  3:31           ` Chris Sanders
2012-06-06  5:27             ` Alex Williamson

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='CALH4D1EJTOBLMh=YaC0AggeddpSchbjjBmqMSmCJs7TTOiscFA@mail.gmail.com' \
    --to=sanders.chris@gmail.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 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.