Problem with PCI device assignment (KVM-79, 2.6.28)

2008-12-07 Thread Jakob Sandgren
Hi,

I get the following (fatal) error when trying to assign a pci device
(USB 2.0 controller) to a guest: 
create_userspace_phys_mem: Invalid argument
assigned_dev_iomem_map: Error: create new mapping failed

Assigning another (USB 1.1) device works.



Backgroud and additional information:

This is on an Ubuntu Intrepid with an AMD Phenom(tm) 9350e CPU. 
KVM-79 has been compiled and 2.6.28 is installed from Ubuntu:s
repository. 

I'm trying to assign my DVB-T (Nova 500) card to my guest. It's
basically a PCI card with an USB controller chip (two 1.1 ports and
one 2.0 port) that is connected to the actuall DVB-T chip.

Since the DVB-T chip is connected to USB-2.0 and since there is no USB
2.0 (EHCI) support in KVM, I'm trying to use pci device assignment
instead. 

I have disabled any other USB controllers/hubs in the system;

[EMAIL PROTECTED]:/var/log/libvirt/qemu# lspci |grep USB
06:07.0 USB Controller: VIA Technologies, Inc. VT82x UHCI USB 1.1Controller 
(rev 61)
06:07.1 USB Controller: VIA Technologies, Inc. VT82x UHCI USB 1.1 
Controller (rev 61)
06:07.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 63)

Starting kvm with; /usr/bin/kvm -pcidevice host=06:07.1,dma=none
... args ... works and the device shows up in the guest (some errors
in guest, but it starts and the device sees an USB controller)

However starting kvm with; /usr/bin/kvm -pcidevice
host=06:07.2,dma=none ... args ...  gives the following errors; 
create_userspace_phys_mem: Invalid argument
assigned_dev_iomem_map: Error: create new mapping failed

I have tried above both with and without ,dma=none. 

I'm confused since it seem to work with some devices, but not with
others. Any suggestions?  
 

/Jakob
-- 
Jakob Sandgren  South Pole AB

--
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


Re: Problem with PCI device assignment (KVM-79, 2.6.28)

2008-12-07 Thread Jan C. Bernauer
Hi,

 just saw the kvm-80 announcement, and from the changelog, I think
this might be fixed already.


Best regards,
Jan

--
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


Re: Problem with PCI device assignment (KVM-79, 2.6.28)

2008-12-07 Thread Jan C. Bernauer
Jakob Sandgren wrote:
  Hi,
 
  I get the following (fatal) error when trying to assign a pci device
  (USB 2.0 controller) to a guest:
  create_userspace_phys_mem: Invalid argument
  assigned_dev_iomem_map: Error: create new mapping failed
 
  Assigning another (USB 1.1) device works.
 
 

Can you check what lspci -v says?
I suspect the size of a memory region is not a multiple of 4096.
Same thing happens for me for a network and a dvb card.

As far as I know, the mapping code can only map whole pages. So the code
has to expand the size to the nearest multiple.


Best regards,
Jan C. Bernauer







--
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