summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-08-30 09:15:57 +0200
committerManuel Bentele2021-08-30 09:15:57 +0200
commitc77a91fafad1a1d38af658dcbb64ffc4f484a262 (patch)
tree07bebe3a57030010665bc051af46a801d0849d9e
parent[qemu] Remove local declaration outside of any function (diff)
downloadmltk-c77a91fafad1a1d38af658dcbb64ffc4f484a262.tar.gz
mltk-c77a91fafad1a1d38af658dcbb64ffc4f484a262.tar.xz
mltk-c77a91fafad1a1d38af658dcbb64ffc4f484a262.zip
[qemu] Add printing of status for mediated device setup
-rw-r--r--core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc3
-rw-r--r--core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include7
2 files changed, 6 insertions, 4 deletions
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc
index 067cc35d..f2e2942b 100644
--- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc
+++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/includes/passthrough-mdev.inc
@@ -145,14 +145,11 @@ function passthrough_mdev_setup() {
return 1;
fi
- writelog "Passthrough of mediated devices (mdev) is enabled successfully"
-
# obtain created mediated device for passthrough
local pt_gpu_mdev_id="$(passthrough_mdev_instance_get)"
# check if mediated device ID could be obtained
if [ -z "${pt_gpu_mdev_id}" ]; then
- writelog "Failed to obtain created mediated device UUID"
return 2;
fi
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include
index 12239b4e..d61ff97d 100644
--- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include
+++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include
@@ -46,7 +46,12 @@ run_plugin() {
local pt_gpu_pci_ids=($(passthrough_pci_setup))
# setup GPU mediated device passthrough and obtain mediated device address
- local pt_gpu_mdev_id=($(passthrough_mdev_setup))
+ pt_gpu_mdev_id="$(passthrough_mdev_setup)"
+ if [ "${?}" -eq 0 ]; then
+ writelog "Mediated device (${pt_gpu_mdev_id}) is set up for passthrough successfully."
+ else
+ writelog "Failed to obtain created mediated device UUID!"
+ fi
# write finalized config in debug mode to temporary folder for debugging purposes
if [ "${DEBUG}" = "true" ]; then