diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php
index 484f5e011..cebfe945f 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php
@@ -732,6 +732,7 @@
$pcidevs='';
$gpudevs_used=[];
+ $multidevices = [] ; #Load?
$vmrc='';
$channelscopypaste = '';
if (!empty($gpus)) {
@@ -834,6 +835,13 @@
$strRomFile = "";
}
+ if ($gpu['multi'] == "on"){
+ $strSpecialAddress = "
" ;
+ $multidevices[$gpu_bus] = "0x$gpu_bus" ;
+ }
+
+
+
$pcidevs .= "
@@ -846,8 +854,8 @@
$gpudevs_used[] = $gpu['id'];
}
}
-
$audiodevs_used=[];
+ $strSpecialAddressAudio = "" ;
if (!empty($audios)) {
foreach ($audios as $i => $audio) {
// Skip duplicate audio devices
@@ -856,12 +864,16 @@
}
[$audio_bus, $audio_slot, $audio_function] = my_explode(":", str_replace('.', ':', $audio['id']), 3);
+ if ($audio_function != 0) {
+ if (isset($multidevices[$audio_bus])) $strSpecialAddressAudio = "" ;
+ }
$pcidevs .= "
+ $strSpecialAddressAudio
";
$audiodevs_used[] = $audio['id'];
@@ -869,6 +881,7 @@
}
$pcidevs_used=[];
+ $strSpecialAddressOther = "" ;
if (!empty($pcis)) {
foreach ($pcis as $i => $pci_id) {
// Skip duplicate other pci devices
@@ -877,12 +890,18 @@
}
if ($vmclone) [$pci_bus, $pci_slot, $pci_function] = my_explode(":", str_replace('.', ':', $pci_id['id']), 3);
else [$pci_bus, $pci_slot, $pci_function] = my_explode(":", str_replace('.', ':', $pci_id), 3);
+
+ if ($pci_function != 0) {
+ if (isset($multidevices[$pci_bus])) $strSpecialAddressOther = "" ;
+ }
$pcidevs .= "
- " ;
+
+ $strSpecialAddressOther " ;
+
if (!empty($pciboot[$pci_id]) && !$vmclone) {
$pcidevs .= "" ;
}
@@ -2235,7 +2254,11 @@
$boot =$xpath->query('boot/@order', $objNode)->Item(0)->value;
$devid = str_replace('0x', '', 'pci_'.$dom.'_'.$bus.'_'.$slot.'_'.$func);
$tmp2 = $this->get_node_device_information($devid);
-
+ $guest["multi"] = $xpath->query('address/@multifunction', $objNode)->Item(0)->value ? "on" : "off" ;
+ $guest["dom"] = $xpath->query('address/@domain', $objNode)->Item(0)->value;
+ $guest["bus"] = $xpath->query('address/@bus', $objNode)->Item(0)->value;
+ $guest["slot"] = $xpath->query('address/@slot', $objNode)->Item(0)->value;
+ $guest["func"] = $xpath->query('address/@function', $objNode)->Item(0)->value;
$devs[] = [
'domain' => $dom,
'bus' => $bus,
@@ -2247,7 +2270,8 @@
'product' => $tmp2['product_name'],
'product_id' => $tmp2['product_id'],
'boot' => $boot,
- 'rom' => $rom
+ 'rom' => $rom,
+ 'guest' => $guest
];
}
}
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
index 7acceeeb9..337dd1480 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
@@ -1166,25 +1166,26 @@ private static $encoding = 'UTF-8';
'wsport' => $lv->domain_get_ws_port($res),
'autoport' => $autoport,
'copypaste' => $getcopypaste,
+ 'guest' => ['multi' => 'off' ],
];
}
foreach ($arrHostDevs as $arrHostDev) {
$arrFoundGPUDevices = array_filter($arrValidGPUDevices, function($arrDev) use ($arrHostDev) {return ($arrDev['id'] == $arrHostDev['id']);});
if (!empty($arrFoundGPUDevices)) {
- $arrGPUDevices[] = ['id' => $arrHostDev['id'], 'rom' => $arrHostDev['rom']];
+ $arrGPUDevices[] = ['id' => $arrHostDev['id'], 'rom' => $arrHostDev['rom'], 'guest' => $arrHostDev['guest']];
continue;
}
$arrFoundAudioDevices = array_filter($arrValidAudioDevices, function($arrDev) use ($arrHostDev) {return ($arrDev['id'] == $arrHostDev['id']);});
if (!empty($arrFoundAudioDevices)) {
- $arrAudioDevices[] = ['id' => $arrHostDev['id']];
+ $arrAudioDevices[] = ['id' => $arrHostDev['id'], 'guest' => $arrHostDev['guest']];
continue;
}
$arrFoundOtherDevices = array_filter($arrValidOtherDevices, function($arrDev) use ($arrHostDev) {return ($arrDev['id'] == $arrHostDev['id']);});
if (!empty($arrFoundOtherDevices)) {
- $arrOtherDevices[] = ['id' => $arrHostDev['id'],'boot' => $arrHostDev['boot']];
+ $arrOtherDevices[] = ['id' => $arrHostDev['id'],'boot' => $arrHostDev['boot'], 'guest' => $arrHostDev['guest']];
continue;
}
}
diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
index d5fa2369a..939d352ed 100644
--- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
+++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
@@ -985,6 +985,17 @@
}
?>
+
+ if ($arrGPU['id'] != 'virtual') $multifunction = "" ; else $multifunction = " disabled " ;
+ ?>
+ _(Multifunction)_:
+
+
@@ -1122,6 +1133,13 @@
}
?>
+ _(Multifunction)_:
+
@@ -1825,9 +1843,13 @@ $(function() {
if (myvalue == 'virtual') {
$vnc_sections.filter('.wasadvanced').removeClass('wasadvanced').addClass('advanced');
slideDownRows($vnc_sections.not(isVMAdvancedMode() ? '.basic' : '.advanced'));
+ var MultiSel = document.getElementById("GPUMultiSel0") ;
+ MultiSel.disabled = true ;
} else {
slideUpRows($vnc_sections);
$vnc_sections.filter('.advanced').removeClass('advanced').addClass('wasadvanced');
+ var MultiSel = document.getElementById("GPUMultiSel0") ;
+ MultiSel.disabled = false ;
}
}
diff --git a/emhttp/plugins/dynamix/include/SysDrivers.php b/emhttp/plugins/dynamix/include/SysDrivers.php
index 47ac13566..2b6ee2fa0 100644
--- a/emhttp/plugins/dynamix/include/SysDrivers.php
+++ b/emhttp/plugins/dynamix/include/SysDrivers.php
@@ -79,7 +79,9 @@ switch ($_POST['table']) {
$supporthtml = "" ;
}
}
- $html .= "| $modname$supporthtml | " ;
+ if (isset($module["version"])) $version = "(".$module["version"].")" ; else $version = "" ;
+
+ $html .= "$modname $version$supporthtml | " ;
$html .= "{$module['description']} | {$module['state']} | {$module['type']} | ";
$text = "" ;
diff --git a/emhttp/plugins/dynamix/include/SysDriversHelpers.php b/emhttp/plugins/dynamix/include/SysDriversHelpers.php
index b85f01cf4..382e5791f 100644
--- a/emhttp/plugins/dynamix/include/SysDriversHelpers.php
+++ b/emhttp/plugins/dynamix/include/SysDriversHelpers.php
@@ -52,6 +52,9 @@ function getmodules($line) {
case "file":
$file = trim(str_replace("file:","",$outline)) ;
break ;
+ case "version":
+ $version = trim(str_replace("version:","",$data[1])) ;
+ break ;
case "alias":
case "author":
case "firmware":
@@ -103,7 +106,8 @@ $dir = str_replace("/lib/modules/$kernel/kernel/", "" ,$dir) ;
if ($desc != null) $description = substr($desc , 0 ,60) ; else $description = null ;
$arrModules[$modname] = [
'modname' => $modname,
- 'dependacy' => $depends,
+ 'dependacy' => $depends,
+ 'version' => $version,
'parms' => $parms,
'file' => $file,
'modprobe' => $modprobe,