RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 860418 - create_userspace_phys_mem & assigned_dev_iomem_map - when device passed through
Summary: create_userspace_phys_mem & assigned_dev_iomem_map - when device passed through
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-25 19:12 UTC by lejeczek
Modified: 2014-10-31 12:21 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-27 00:28:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lejeczek 2012-09-25 19:12:54 UTC
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 192.168.2.103:10 -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:
device_add


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

qemu-kvm-tools-0.12.1.2-2.295.el6_3.2.x86_64
qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64
qemu-img-0.12.1.2-2.295.el6_3.2.x86_64
gpxe-roms-qemu-0.9.7-6.9.el6.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 lejeczek 2012-09-26 10:02:36 UTC
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-27 00:28:10 UTC
Assignment of VGA devices is not currently supported.

Comment 4 lejeczek 2012-09-27 14:08:05 UTC
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:

pci-assign.host=pci-hostaddr
pci-assign.iommu=uint32
pci-assign.bootindex=int32
pci-assign.configfd=string
pci-assign.addr=pci-devfn
pci-assign.romfile=string
pci-assign.rombar=uint32
pci-assign.multifunction=on/off

any user-friendly docs on it?

Comment 5 Markus Armbruster 2012-10-02 14:10:58 UTC
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.