[pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config

Dominik Csapak d.csapak at proxmox.com
Fri Sep 2 11:02:28 CEST 2022


On 8/27/22 18:09, DERUMIER, Alexandre wrote:
> Le 26/08/22 à 08:39, Dominik Csapak a écrit :
>> On 8/25/22 16:53, DERUMIER, Alexandre wrote:
>>>    > root at pve2:~# qm start 101
>>>    > ignoring mediated device with multifunction device
>>>
>>> ok, it's simply that indeed I have specify a multifunction path
>>> "0000:02".
>>>
>>> I think it should better/safe to die here, instead to simply warn and
>>> continue.
>> i agree die'ing here is better, for the mapped case we could do that now,
>> but for the old case of a pciid we can't (for backwards compat) until 8.0
>>
>> [snip]
>>
>>>>
>>>> maybe not related, but after that, stop/start are not working anymore
>>>>
>>>> root at pve2:~# qm stop 101
>>>> PCI device mapping invalid (hardware probably changed): 'mdev'
>>>> configured but should not be
>>>>
>>>> root at pve2:~# qm start 101
>>>> PCI device mapping invalid (hardware probably changed): 'mdev'
>>>> configured but should not be
>>>>
> 
> I can reproduce this 100%, if the start with mdev of multifunction path
> fallback to classic pci passthrough.
> 
> and I was able to configure this on the vm pci configuration.
> No sure, maybe I have configure the mapping with single function,
> configure the vm, then change the mapping with multifunction.
> 
> 
> 
> 
> I see that currently it's possible to mix multifunction,  single
> function devices in same mapping group.
> I wonder if it couldn't be better to add an option on the group, to
> define "multifunction=on/off , mdev=on/off.
> 
> then only add devices with theses 2 options, don't mix different kind of
> devices.

in my current version (here locally) i changed it so that for multifunction devices
mdev is always false (since that wouldn't make sense anyway)

this way you cannot mix them anymore since the attributes must match for all ids
(i don't really like a seperate multifunction/mdev toggle; but we could implement
a filter for the grid in the gui later)

> 
> Also, multifuction && mdev can't be changed on the group if devices are
> already in the group.
> 
> 


what do you mean by that?

the attributes (vendor/mdev/...) are only meant as read only to verify that
the ids are really the device the user configured

mdev itself will be configured in the vm config then





More information about the pve-devel mailing list