RE: PCI Passthrough - create_userspace_phys_mem: Invalid argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



freisei wrote:
> Hi List!
> 
> i want to passthrough my isdn-card in a kvm-vm.
> 
>> qemu-system-x86_64 -vnc :3 -m 2048 -name $vmname -hda
>> /dev/vg0/xp8asterisk -boot n -net nic,macaddr=52:54:00:58:08:03 -net
>> tap,script=/etc/qemu-ifup -usbdevice tablet -k de -smp 2 -monitor
>> stdio -pcidevice host=05:04.0
>> Running /etc/qemu-ifup
>> ...Bringing up  for bridged mode
>> ...Adding tap0 to intern-interface
>> init_assigned_device: Registering real physical device 05:04.0
>> (bus=5 dev=4 func=0) get_real_device: region 0 size 32 start
>> 0xf9100000 type 512 resource_fd 14 get_real_device: region 1 size 32
>> start 0x3000 type 256 resource_fd 0 QEMU 0.9.1 monitor - type 'help'
>> for more information (qemu) assigned_dev_pci_read_config: (6.0):
>> address=0000 
>> val=0x00001244 len=2
>> assigned_dev_pci_read_config: (6.0): address=0002 val=0x00000e00
>> len=2 assigned_dev_pci_read_config: (6.0): address=0000
>> val=0x00001244 len=2 assigned_dev_pci_read_config: (6.0):
>> address=0002 val=0x00000e00 len=2 assigned_dev_pci_read_config:
>> (6.0): address=0000 val=0x00001244 len=2
>> assigned_dev_pci_read_config: (6.0): address=0002 val=0x00000e00
>> len=2 assigned_dev_pci_read_config: (6.0): address=000a
>> val=0x00000280 len=2 assigned_dev_pci_read_config: (6.0):
>> address=0000 val=0x00001244 len=2 assigned_dev_pci_read_config:
>> (6.0): address=0002 val=0x00000e00 len=2
>> assigned_dev_pci_write_config: (6.0): address=0010 val=0xffffffff
>> len=4 assigned_dev_pci_read_config: (6.0): address=0010
>> val=0xffffffe0 len=4 assigned_dev_pci_read_config: (6.0):
>> address=0010 val=0xffffffe0 len=4 assigned_dev_pci_write_config:
>> (6.0): address=0010 val=0xf2001100 len=4 assigned_dev_iomem_map:
>> e_phys=f2001100 r_virt=0x7f9374876000 type=0 len=00000020
>> region_num=0 create_userspace_phys_mem: Invalid argument   
>> assigned_dev_iomem_map: Error: create new mapping failed

This error happened when the MMIO of assigned device is not page aligned. Here MMIO size of your device is 0x20 Bytes. The commit fb48c7c858cc612e3e1cb011c534075ac5de553d in kvm userspace should fix it. Was it included in your userspace? The commit changes rom bios, you can use "make bios", and "make install" to make it take effect. And I think replacing "-net nic,macaddr=52:54:00:58:08:03 -net tap,script=/etc/qemu-ifup" with "-net none" will also work for you.

Regards,
Weidong

> Already tried:
> - remove not needed-parameters
> - dma=none
> - set assign-device DEBUG (as you see)
> 
> Additional Info:
> lspci:
> 05:04.0 Network controller: AVM GmbH Fritz!PCI v2.0 ISDN (rev 02)

Can you post output of "lspci -v"? We can see if its mmio is page aligned or not. Can you check if commit fb48c7c858cc612e3e1cb011c534075ac5de553d was included in your kvm-userspace?

> root@xp8main3:/etc/kvm# uname -a
> Linux xp8main3 2.6.29-rc6-xp8no7 #1 SMP Thu Feb 26 12:27:17 CET 2009
> x86_64 GNU/Linux
> 
> 
> greets freisei

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux