Red Hat Bugzilla – Bug 860418
create_userspace_phys_mem & assigned_dev_iomem_map - when device passed through
Last modified: 2014-10-31 08:21:55 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 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
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):
Steps to Reproduce:
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?
Assignment of VGA devices is not currently supported.
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?
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.