From: Andreas Hartmann <andihartmann@01019freenet.de>
To: Andreas Hartmann <andihartmann@01019freenet.de>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Joerg.Roedel@amd.com, Chris Sanders <sanders.chris@gmail.com>,
kvm@vger.kernel.org
Subject: Re: AMD KVM Pci Passthrough reports device busy
Date: Tue, 05 Jun 2012 17:58:01 +0200 [thread overview]
Message-ID: <4FCE2C89.90209@01019freenet.de> (raw)
In-Reply-To: <201206051517.q55FHU5B002790@mail.maya.org>
Andreas Hartmann wrote:
[...]
> I tried to run qemu-system-x86_64 but got this error on startup:
>
> qemu-system-x86_64: -device vfio-pci,host=06:07.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to set iommu for container: Operation not permitted
>
> qemu-system-x86_64: -device vfio-pci,host=06:07.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to setup container for group 9
>
> qemu-system-x86_64: -device vfio-pci,host=06:07.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to get group 9
> **
> ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)
>
>
> I started qemu-system-x86_64 with this option among others
>
> -device vfio-pci,host=06:07.0,id=hostdev0,bus=pci.0,addr=0x5
>
> after all of the devices have been added to pci-stub but 06:07.0, which was added to vfio-pci.
>
>
> Could you please tell me, why the operation isn't permitted? I started
> qemu-system-x86_64 as root.
I straced the call with strace and got the following error:
...
8048 open("/usr/local/share/qemu/pxe-virtio.rom", O_RDONLY) = 14
8048 lseek(14, 0, SEEK_END) = 60416
8048 lseek(14, 0, SEEK_SET) = 0
8048 read(14, "U\252v\351\217\0z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\177\0
\0<\0\365\274\266\16"..., 60416) = 60416
8048 close(14) = 0
8048 stat("/sys/bus/pci/devices/0000:06:07.0/", {st_mode=S_IFDIR|0755,
st_size=0, ...}) = 0
8048 readlink("/sys/bus/pci/devices/0000:06:07.0/iommu_group",
"../../../../kernel/iommu_groups/9"..., 4096) = 33
8048 open("/dev/vfio/9", O_RDWR) = 14
8048 ioctl(14, 0x3b67, 0x7fff237d5ac0) = 0
8048 open("/dev/vfio/vfio", O_RDWR) = 15
8048 ioctl(15, 0x3b64, 0xf) = 0
8048 ioctl(15, 0x3b65, 0x1) = 1
8048 ioctl(14, 0x3b68, 0x7fff237d5ad8) = 0
8048 ioctl(15, 0x3b66, 0x1) = -1 EPERM (Operation not permitted)
...
/dev/vfio # ls -l
total 0
crw-rw-rw- 1 root root 250, 1 Jun 5 17:42 9
crw-rw-rw- 1 root root 250, 0 Jun 5 17:41 vfio
Kind regards,
Andreas
next prev parent reply other threads:[~2012-06-05 16:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 21:11 AMD KVM Pci Passthrough reports device busy Chris Sanders
2012-06-05 3:44 ` 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 [this message]
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=4FCE2C89.90209@01019freenet.de \
--to=andihartmann@01019freenet.de \
--cc=Joerg.Roedel@amd.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=sanders.chris@gmail.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 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).