fix #5798: ui: qemu pci edit: fix warning for shared IOMMU groups
When selecting a raw PCI device, a warning should be shown if the device
is not in a separate IOMMU group. To not count the other functions of
the selected device itself, the check only compares the bus and device
part of the PCI IDs, by taking their first five characters.
But since the PCI selector also shows the domain, for example
'0000:01:00.0', the first five characters are just the domain. So all
devices of the same domain were treated as functions of the selected
device and the warning was never shown.
Compare everything before the function instead, so the domain, bus and
device, like the IOMMU check in the PCI mapping editor does.
Fixes: f36240c5 ("gui: pci passthrough: consider domain in PCISelector")
Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
1 parent
886410eb9f
commit
7ed7d7cdb0
1 file changed
+2
-2
@@ -83,10 +83,10 @@ Ext.define('PVE.qemu.PCIInputPanel', {
|
||||
return;
|
||||
}
|
||||
// try to find out if there are more devices in that iommu group
|
||||
let id = path.substring(0, 5); // 00:00
|
||||
let id = path.substring(0, path.indexOf('.')); // 0000:00:00
|
||||
let count = 0;
|
||||
pcisel.getStore().each(({ data }) => {
|
||||
if (data.iommugroup === iommu && data.id.substring(0, 5) !== id) {
|
||||
if (data.iommugroup === iommu && !data.id.startsWith(id)) {
|
||||
count++;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user