mirror of
https://github.com/unraid/webgui.git
synced 2026-01-04 16:40:21 -06:00
Merge pull request #1482 from SimonFair/VM-template-enhancements-for-Windows-VMs
Fix to multifunction which fails with non zero slot on beta21
This commit is contained in:
@@ -842,7 +842,8 @@
|
||||
}
|
||||
|
||||
if ($gpu['multi'] == "on"){
|
||||
$strSpecialAddress = "<address type='pci' domain='0x0000' bus='0x20' slot='0x$gpu_bus' function='0x".$gpu_function."' multifunction='on' />" ;
|
||||
$newgpu_bus = dechex(hexdec($gpu_bus) + 0x20) ;
|
||||
$strSpecialAddress = "<address type='pci' domain='0x0000' bus='0x$newgpu_bus' slot='0x0' function='0x".$gpu_function."' multifunction='on' />" ;
|
||||
$multidevices[$gpu_bus] = "0x$gpu_bus" ;
|
||||
}
|
||||
|
||||
@@ -871,7 +872,10 @@
|
||||
|
||||
[$audio_bus, $audio_slot, $audio_function] = my_explode(":", str_replace('.', ':', $audio['id']), 3);
|
||||
if ($audio_function != 0) {
|
||||
if (isset($multidevices[$audio_bus])) $strSpecialAddressAudio = "<address type='pci' domain='0x0000' bus='0x20' slot='0x$audio_bus' function='0x".$audio_function."' />" ;
|
||||
if (isset($multidevices[$audio_bus])) {
|
||||
$newaudio_bus = dechex(hexdec($audio_bus) + 0x20) ;
|
||||
$strSpecialAddressAudio = "<address type='pci' domain='0x0000' bus='0x$newaudio_bus' slot='0x0' function='0x".$audio_function."' />" ;
|
||||
}
|
||||
}
|
||||
|
||||
$pcidevs .= "<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
@@ -898,7 +902,10 @@
|
||||
else [$pci_bus, $pci_slot, $pci_function] = my_explode(":", str_replace('.', ':', $pci_id), 3);
|
||||
|
||||
if ($pci_function != 0) {
|
||||
if (isset($multidevices[$pci_bus])) $strSpecialAddressOther = "<address type='pci' domain='0x0000' bus='0x20' slot='0x$pci_bus' function='0x".$pci_function."' />" ;
|
||||
if (isset($multidevices[$pci_bus])) {
|
||||
$newpci_bus = dechex(hexdec($pci_bus) + 0x20) ;
|
||||
$strSpecialAddressOther = "<address type='pci' domain='0x0000' bus='0x$newpci_bus' slot='0x0' function='0x".$pci_function."' />" ;
|
||||
}
|
||||
}
|
||||
|
||||
$pcidevs .= "<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||
|
||||
Reference in New Issue
Block a user