* Prasad Joshi ([email protected]) wrote:
> > From: [email protected] [[email protected]] on behalf of 
> > Chris Wright [[email protected]]
> > 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.
> 
> r...@prasad-kvm:/sys# uptime 
>  17:29:11 up 2 min,  3 users,  load average: 0.93, 0.52, 0.20
> 
> r...@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
> 
> r...@prasad-kvm:/sys# lsmod | grep pci_stub
> 
> r...@prasad-kvm:/sys# modprobe pci_stub
> 
> r...@prasad-kvm:/sys# lsmod | grep pci_stub
> pci_stub                1590  0 
> 
> r...@prasad-kvm:/sys# echo "8086 1229" > /sys/bus/pci/drivers/pci-stub/new_id 
> 
> r...@prasad-kvm:/sys# echo "0000:01:05.0" > /sys/bus/pci/drivers/e100/unbind 
> 
> r...@prasad-kvm:/sys# echo "0000:01:05.0" > 
> /sys/bus/pci/drivers/pci-stub/bind 
> 
> r...@prasad-kvm:/sys# echo "8086 1229" > 
> /sys/bus/pci/drivers/pci-stub/remove_id 
> 
> r...@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
> 
> r...@prasad-kvm:~/VMDisks# modprobe kvm_amd
> 
> r...@prasad-kvm:~/VMDisks# lsmod | grep -i kvm
> kvm_amd                56416  0 
> kvm                   348987  1 kvm_amd
> 
> r...@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
> r...@prasad-kvm:~/VMDisks# echo $?
> 1
> r...@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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to