public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: freisei <forum@xp8.de>
To: unlisted-recipients:; (no To-header on input)
Cc: "'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: PCI Passthrough - create_userspace_phys_mem: Invalid argument
Date: Fri, 27 Feb 2009 18:27:36 +0100	[thread overview]
Message-ID: <49A82288.8050402@xp8.de> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C0195AD0900@pdsmsx503.ccr.corp.intel.com>

Han, Weidong schrieb:
> 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?
Thanks for your answer!

How can i check if the commit is included? And where to checkout the 
latest snapshot?
I am using kvm-84 sources from sourceforge and kernel 2.6.29rc6 on 
ubuntu 8.10


qemu-system-x86_64  |more
QEMU PC emulator version 0.9.1 (kvm-84), Copyright (c) 2003-2008 Fabrice 
Bellard


>  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
>
>   
making and installing bios done - no changes.

with "-net none" it WORKS! Bud i need network... i´ll try to passthrough 
my Intel PCIx NIC too...

>> 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?
>
>   
05:04.0 Network controller: AVM GmbH Fritz!PCI v2.0 ISDN (rev 02)
        Subsystem: AVM GmbH Fritz!PCI v2.0 ISDN
        Flags: medium devsel, IRQ 24
        Memory at f9100000 (32-bit, non-prefetchable) [size=32]
        I/O ports at 3000 [size=32]
        Capabilities: [40] Power Management version 2
        Kernel modules: hisax_fcpcipnp

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


      reply	other threads:[~2009-02-27 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 14:58 PCI Passthrough - create_userspace_phys_mem: Invalid argument freisei
2009-02-27  1:44 ` Han, Weidong
2009-02-27 17:27   ` freisei [this message]

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=49A82288.8050402@xp8.de \
    --to=forum@xp8.de \
    --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