[libvirt] [PATCH] qemu: qxl devices don't support multifunction yet
wency at cn.fujitsu.com
Tue Sep 20 01:11:04 UTC 2011
At 09/20/2011 01:16 AM, Marc-André Lureau Write:
> Hi hi
> On Fri, Sep 16, 2011 at 1:38 PM, Marc-André Lureau <mlureau at redhat.com> wrote:
>>>> How do we allow other devices to share the slot? It seems to me that
>>>> qemuDomainPCIAddressSetNextAddr() only allocate whole slot, while
>>>> making sure there is no conflicts on the same slot.
>>> So, if the user wants to use multi function pci device, he should
>>> specify the
>>> pci address.
>> So adding a check such as:
>> if (!multiFunc && info->addr.pci.function != 0)
>> return error("The %s device doesn't support multifunction address")
> Wen, does that sound reasonable to you?
Here is part of my xml config file:
<model type='qxl' vram='65536' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
<model type='qxl' vram='32768' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
I can start the domain, and I run lspci on guest:
[root at RHEL6RCi386 ~]# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Red Hat, Inc. Device 0100 (rev 02)
00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
00:04.0 RAM memory: Red Hat, Inc Virtio memory balloon
00:04.1 Display controller: Red Hat, Inc. Device 0100 (rev 02)
00:06.0 Ethernet controller: Red Hat, Inc Virtio network device
00:07.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:08.0 SCSI storage controller: LSI Logic / Symbios Logic 53c895a
So I think qxl device supports multifunction.
> Daniel, did you had time to verify that PCI allocation is per-slot?
> (It would be nice to get this "workaround" for the next release)
More information about the libvir-list