From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Schrempf Subject: mmap error on pci passthrough Date: Fri, 13 Mar 2009 19:21:20 +0100 Message-ID: <49BAA420.6060706@schrempf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]:62182 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754141AbZCMSV2 (ORCPT ); Fri, 13 Mar 2009 14:21:28 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Hi I've tried to use PCI passthrough with a DVB card which fails with an mmap error. > kvm -name test-system -boot c -m 512 -hda /dev/srv/kvmtest -k de -usb -pcidevice host=03:00.0 assigned_dev_register_regions: Error: Couldn't mmap 0xe1200000! Failed to initialize assigned device host=03:00.0 I'm using the KVM-83 backport on Ubuntu 8.10 There is no module loaded for the device on the host and no shared IRQs. Am I doing something wrong? Thanks OS dmesg ouput: [ 2193.607975] ------------[ cut here ]------------ [ 2193.607980] WARNING: at /build/buildd/linux-2.6.27/drivers/pci/pci-sysfs.c:499 pci_mmap_resource+0x15b/0x170() [ 2193.607982] process "kvm" tried to map 0x00000000-0x00000001 on 0000:03:00.0 BAR 0 (size 0x00000000) [ 2193.607984] Modules linked in: i915 drm ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 xt_state nf_conntrack ipt_REJECT xt_tcpudp bridge stp kvm_intel kvm ipv6 af_packet iptable_filter ip_tables x_tables ac parport_pc lp parport loop usblp evdev psmouse intel_agp serio_raw agpgart dm_multipath shpchp button pcspkr pci_hotplug scsi_dh iTCO_wdt iTCO_vendor_support ext3 jbd mbcache sr_mod sd_mod cdrom crc_t10dif sg pata_acpi ata_piix r8169 mii ata_generic libata scsi_mod uhci_hcd dock ehci_hcd usbcore raid10 raid456 async_xor async_memcpy async_tx xor raid1 raid0 multipath linear md_mod dm_mirror dm_log dm_snapshot dm_mod thermal processor fan fbcon tileblit font bitblit softcursor fuse [ 2193.608032] Pid: 5195, comm: kvm Not tainted 2.6.27-11-server #1 [ 2193.608035] [] warn_slowpath+0x65/0x90 [ 2193.608039] [] ? real_lookup+0x86/0x110 [ 2193.608043] [] ? __follow_mount+0xb/0x90 [ 2193.608045] [] ? dput+0x8a/0x130 [ 2193.608048] [] ? __mem_cgroup_uncharge_common+0x111/0x170 [ 2193.608052] [] ? __dec_zone_state+0x16/0x90 [ 2193.608055] [] ? __dec_zone_page_state+0x1d/0x20 [ 2193.608058] [] ? page_remove_rmap+0x49/0x110 [ 2193.608061] [] ? kunmap_atomic+0x35/0x80 [ 2193.608064] [] ? zap_pte_range+0x138/0x3a0 [ 2193.608067] [] ? get_pageblock_flags_group+0xe/0x90 [ 2193.608070] [] pci_mmap_resource+0x15b/0x170 [ 2193.608072] [] ? pci_mmap_resource_uc+0x0/0x20 [ 2193.608075] [] pci_mmap_resource_uc+0x17/0x20 [ 2193.608077] [] mmap+0x5a/0xa0 [ 2193.608079] [] mmap_region+0x1d8/0x4d0 [ 2193.608081] [] ? find_vma+0xa/0x90 [ 2193.608083] [] ? arch_get_unmapped_area_topdown+0x10d/0x170 [ 2193.608086] [] ? security_file_mmap+0x2c/0x40 [ 2193.608089] [] do_mmap_pgoff+0x269/0x370 [ 2193.608091] [] sys_mmap2+0xad/0xc0 [ 2193.608094] [] sysenter_do_call+0x12/0x2f [ 2193.608098] ======================= [ 2193.608099] ---[ end trace a770bf575e130268 ]---