From: Chris Wright <chrisw@sous-sol.org>
To: Prasad Joshi <P.G.Joshi@student.reading.ac.uk>
Cc: Chris Wright <chrisw@sous-sol.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Query on IOMMU
Date: Tue, 21 Dec 2010 10:33:22 -0800 [thread overview]
Message-ID: <20101221183322.GG15023@sequoia.sous-sol.org> (raw)
In-Reply-To: <000DF292CEBFBB41A633359D615F1514022A5FDB@DB2PRD0103MB011.eurprd01.prod.exchangelabs.com>
* Prasad Joshi (P.G.Joshi@student.reading.ac.uk) wrote:
> > From: kvm-owner@vger.kernel.org [kvm-owner@vger.kernel.org] on behalf of Chris Wright [chrisw@sous-sol.org]
> > Yes I am using AMD processor and ASUS motherboard. Both of them have the IOMMU support, atleast it is mentioned on the Xen VT-d
>
> > Looks like we need some additional info in the wiki. Care to create an
> > account and add the info?
>
> Sure I would love to.
Thanks, you can use the VT-d portion as an example.
The useful dmesg info will be AMD-Vi: messages, the important line
is this one:
AMD-Vi: Enabling IOMMU at ...
(and if you boot with amd_iommu_dump you'll get extra debugging info)
> > Thanks a lot for your reply. Yes I am interested in working on GPU pass-through to Virtual Machine. But for now I am trying to pass-through a network card to VM.
Great, GPU assignment has plenty of issues ;)
<snip>
> It still fails with the same error, here is the screen shot.
>
> root@prasad-kvm:/sys# uptime
> 17:29:11 up 2 min, 3 users, load average: 0.93, 0.52, 0.20
>
> root@prasad-kvm:/sys# ls -l /sys/bus/pci/devices/0000:01:05.0/driver
> lrwxrwxrwx 1 root root 0 2010-12-21 17:26 /sys/bus/pci/devices/0000:01:05.0/driver -> ../../../../bus/pci/drivers/e100
>
> root@prasad-kvm:/sys# lsmod | grep pci_stub
>
> root@prasad-kvm:/sys# modprobe pci_stub
>
> root@prasad-kvm:/sys# lsmod | grep pci_stub
> pci_stub 1590 0
>
> root@prasad-kvm:/sys# echo "8086 1229" > /sys/bus/pci/drivers/pci-stub/new_id
>
> root@prasad-kvm:/sys# echo "0000:01:05.0" > /sys/bus/pci/drivers/e100/unbind
>
> root@prasad-kvm:/sys# echo "0000:01:05.0" > /sys/bus/pci/drivers/pci-stub/bind
>
> root@prasad-kvm:/sys# echo "8086 1229" > /sys/bus/pci/drivers/pci-stub/remove_id
>
> root@prasad-kvm:/sys# ls -l /sys/bus/pci/devices/0000:01:05.0/driver
> lrwxrwxrwx 1 root root 0 2010-12-21 17:31 /sys/bus/pci/devices/0000:01:05.0/driver -> ../../../../bus/pci/drivers/pci-stub
>
> root@prasad-kvm:~/VMDisks# modprobe kvm_amd
>
> root@prasad-kvm:~/VMDisks# lsmod | grep -i kvm
> kvm_amd 56416 0
> kvm 348987 1 kvm_amd
>
> root@prasad-kvm:~/VMDisks# qemu-system-x86_64 -hda Ubuntu-10.10-amd64.img -m 1024M -device pci-assign,host=01:05.0
> Failed to assign device "(null)" : Device or resource busy
> *** The driver 'pci-stub' is occupying your device 0000:01:05.0.
> ***
> *** You can try the following commands to free it:
> ***
> *** $ echo "8086 1229" > /sys/bus/pci/drivers/pci-stub/new_id
> *** $ echo "0000:01:05.0" > /sys/bus/pci/drivers/pci-stub/unbind
> *** $ echo "0000:01:05.0" > /sys/bus/pci/drivers/pci-stub/bind
> *** $ echo "8086 1229" > /sys/bus/pci/drivers/pci-stub/remove_id
> ***
> qemu-system-x86_64: -device pci-assign,host=01:05.0: Device 'pci-assign' could not be initialized
> root@prasad-kvm:~/VMDisks# echo $?
> 1
> root@prasad-kvm:~/VMDisks#
>
> The VM does not boot.
Are you still seeing the same errors in dmesg? Your first dmesg showed
that the e100 driver couldn't allocate BAR0:
e100 0000:01:05.0: BAR 0: can't reserve [mem 0xf9cff000-0xf9cfffff]
If the host driver can't, then kvm_vm_ioctl_assign_device() will fail as
well. Seems as if there's a resource conflict on your machine.
Can you include a full dmesg, /proc/iomem, and lspci -vvv -xxxx?
thanks,
-chris
next prev parent reply other threads:[~2010-12-21 18:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 16:00 Query on IOMMU Prasad Joshi
2010-12-21 16:15 ` Chris Wright
2010-12-21 16:54 ` Prasad Joshi
2010-12-21 17:12 ` Chris Wright
2010-12-21 17:39 ` Prasad Joshi
2010-12-21 18:33 ` Chris Wright [this message]
[not found] ` <000DF292CEBFBB41A633359D615F1514022A5FF4@DB2PRD0103MB011.eurprd01.prod.exchangelabs.com>
2010-12-21 19:22 ` Prasad Joshi
2010-12-21 19:29 ` Chris Wright
2010-12-21 19:56 ` Prasad Joshi
2010-12-21 20:01 ` Chris Wright
2010-12-21 20:06 ` Prasad Joshi
2010-12-22 9:06 ` [PATCH] pci-stub: ignore zero-length id parameters Tejun Heo
2010-12-23 20:54 ` Jesse Barnes
2010-12-21 20:34 ` Query on IOMMU Chris Wright
2010-12-22 13:16 ` Prasad Joshi
2010-12-22 13:35 ` Prasad Joshi
2010-12-22 14:56 ` Chris Wright
2010-12-22 14:54 ` Chris Wright
2010-12-22 15:02 ` Prasad Joshi
2010-12-22 15:22 ` Chris Wright
2010-12-22 15:46 ` Prasad Joshi
2010-12-22 16:34 ` Prasad Joshi
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=20101221183322.GG15023@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=P.G.Joshi@student.reading.ac.uk \
--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