diff mbox

[RFC,3/3] libxl: upstream Qemu as PV backend for IOEMU stubdom

Message ID 1498428931-465-4-git-send-email-watermansrdev@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Waterman June 25, 2017, 10:15 p.m. UTC
Set the PV model version for the IOEMU stubdom from
the new device_model_pv_version setting. Existing code
sets up the command line and spawns the specified version
correctly.

In addition, the upstream QEMU doesn't allow the restore
console to be undefined (it SEGV's) so if this is not a restore
set it to "null" instead. This has the same affect on both upstream
QEMU and qemu-xen-traditional.

Signed-off-by: Simon Waterman <watermansrdev@gmail.com>
---
 tools/libxl/libxl_dm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index f8ba859..9e4a27a 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1847,8 +1847,8 @@  void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss)
 
     dm_config->b_info.u.pv.features = "";
 
-    dm_config->b_info.device_model_version =
-        guest_config->b_info.device_model_version;
+    dm_config->b_info.device_model_version = 
+        guest_config->b_info.device_model_pv_version;
     dm_config->b_info.device_model =
         guest_config->b_info.device_model;
     dm_config->b_info.extra = guest_config->b_info.extra;
@@ -2014,6 +2014,8 @@  static void spawn_stub_launch_dm(libxl__egc *egc,
                 if (d_state->saved_state)
                     console[i].output =
                         GCSPRINTF("pipe:%s", d_state->saved_state);
+                else
+                    console[i].output = "null";
                 break;
             default:
                 console[i].output = "pty";