Bug 860418 - create_userspace_phys_mem & assigned_dev_iomem_map - when device passed through
create_userspace_phys_mem & assigned_dev_iomem_map - when device passed through
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Alex Williamson
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2012-09-25 15:12 EDT by lejeczek
Modified: 2014-10-31 08:21 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-26 20:28:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description lejeczek 2012-09-25 15:12:54 EDT
Description of problem:

/usr/libexec/qemu-kvm -rtc base=localtime -m 4g -smp cores=4 -nographic -drive file=work5-win7_64.img,index=0,media=disk -vnc -monitor tcp::5911,server,nowait,nodelay -net tap,name=tap,vlan=0,ifname=tap0,script=no,downscript=no -net nic,macaddr=52:54:00:12:34:81,model=e1000 -device pci-assign,host=25:00.0

fails with:

create_userspace_phys_mem: File exists
assigned_dev_iomem_map: Error: create new mapping failed

works if device is passed later with:

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 2 lejeczek 2012-09-26 06:02:36 EDT
seems that seabios-0.6.2-3.el6.x86_64(which is not in repositories at this moment) helps, but! how to passtrhough VGA on 6.3 Santiago?
does it even work?
Comment 3 Alex Williamson 2012-09-26 20:28:10 EDT
Assignment of VGA devices is not currently supported.
Comment 4 lejeczek 2012-09-27 10:08:05 EDT
understand that it may never be officially supported,
however I fidlle with it all with some success, but becase I'am a newbie and cannot read the code I can't figure out how to get hold of values for:


any user-friendly docs on it?
Comment 5 Markus Armbruster 2012-10-02 10:10:58 EDT
Context: the "equations" in comment#4 are output of "-device pci-assign,\?", which lists the properties of device model "pci-assign".

Unfortunately, upstream QEMU documentation on device properties is very, very sparse in general.  For RHEL, the recommended way to configure guests is libvirt.  Deficiencies of upstream QEMU documents don't apply there.

If you want to play with unsupported functionality of qemu-kvm, you're on your own.  But nice questions deserve nice answers, so here goes.

Three properties are common to all device models, and not listed: id, driver, bus.  Properties addr, romfile, rombar, multifunction are common to all PCI device models.  The rest are specific to pci-assign. Here's how I understand them:

* id lets you give the device a unique name, for use with device_del and so forth.

* driver is the name of the device model.  "-device pci-assign" is actually shorthand for "-device driver=pci-assign".

* bus lets you pick a non-default bus for the device.  Not relevant for PCI devices, because there's just one PCI bus, called pci.0.

* addr is the device's PCI address as it appears in the guest.

* romfile and rombar let you set up an option ROM.  The former names a file containing the ROM image.  If the latter is zero, the ROM is created the old-fashioned way, for backward compatibility.

* multifunction lets you define PCI devices consisting of multiple functions.  If the physical device you want to assign has multiple functions, you need to assign all functions to the same guest, with multifunction=on (as far as I know).

* host is the PCI address of the host device to assign.

* iommu=0 permits assignment without use of an IOMMU.  This can compromise isolation, if I remember correctly.

* bootindex controls bootorder.  Not applicable to VGA.

* configfd lets you pass in sysfs config file as a file descriptor, so you can run qemu-kvm with fewer privileges.  No need to worry about when exploring stuff.

Note You need to log in before you can comment on or make changes to this bug.