kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with PCI device assignment (KVM-79, 2.6.28)
@ 2008-12-07 21:59 Jakob Sandgren
  2008-12-07 22:54 ` Jan C. Bernauer
  0 siblings, 1 reply; 3+ messages in thread
From: Jakob Sandgren @ 2008-12-07 21:59 UTC (permalink / raw)
  To: kvm

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;

root@cosmos:/var/log/libvirt/qemu# lspci |grep USB
06:07.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1Controller (rev 61)
06:07.1 USB Controller: VIA Technologies, Inc. VT82xxxxx 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with PCI device assignment (KVM-79, 2.6.28)
@ 2008-12-07 22:42 Jan C. Bernauer
  0 siblings, 0 replies; 3+ messages in thread
From: Jan C. Bernauer @ 2008-12-07 22:42 UTC (permalink / raw)
  To: kvm

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








^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with PCI device assignment (KVM-79, 2.6.28)
  2008-12-07 21:59 Jakob Sandgren
@ 2008-12-07 22:54 ` Jan C. Bernauer
  0 siblings, 0 replies; 3+ messages in thread
From: Jan C. Bernauer @ 2008-12-07 22:54 UTC (permalink / raw)
  To: Jakob Sandgren; +Cc: kvm

Hi,

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


Best regards,
Jan


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-07 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 22:42 Problem with PCI device assignment (KVM-79, 2.6.28) Jan C. Bernauer
  -- strict thread matches above, loose matches on Subject: below --
2008-12-07 21:59 Jakob Sandgren
2008-12-07 22:54 ` Jan C. Bernauer

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