All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
@ 2015-01-21  7:19 Tiejun Chen
  2015-01-21  7:26 ` Chen, Tiejun
                   ` (3 more replies)
  0 siblings, 4 replies; 39+ messages in thread
From: Tiejun Chen @ 2015-01-21  7:19 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2; +Cc: qemu-devel, kraxel, xen-devel

When we're working to support IGD GFX passthrough with qemu
upstream, instead of "-gfx_passthru" we'd like to make that
a machine option, "-machine xxx,gfx_passthru=on". This need
to bring several changes on tool side.

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
 tools/libxl/libxl_dm.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index c2b0487..2b59d2c 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -318,7 +318,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
             flexarray_vappend(dm_args, "-net", "none", NULL);
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc)
@@ -702,7 +705,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
             flexarray_append(dm_args, "none");
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc) {
@@ -748,6 +754,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                                             machinearg, max_ram_below_4g);
             }
         }
+
+        if (b_info->device_model_version ==
+            LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+            if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
+                machinearg = libxl__sprintf(gc, "%s,gfx_passthru=on",
+                                            machinearg);
+            }
+        }
+
         flexarray_append(dm_args, machinearg);
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2015-02-02  0:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
2015-01-21  7:26 ` Chen, Tiejun
2015-01-21  7:26 ` Chen, Tiejun
2015-01-21 11:37 ` Ian Jackson
2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
2015-01-21 11:56   ` Ian Campbell
2015-01-22  0:55     ` Chen, Tiejun
2015-01-22  0:55     ` Chen, Tiejun
2015-01-21 11:56   ` Ian Campbell
2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
2015-01-22  0:51     ` Chen, Tiejun
2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
2015-01-23  0:43       ` Chen, Tiejun
2015-01-26  0:44         ` Chen, Tiejun
2015-01-26  0:44         ` Chen, Tiejun
2015-01-27 14:40           ` Ian Jackson
2015-01-28  0:42             ` Chen, Tiejun
2015-01-28  0:42             ` Chen, Tiejun
2015-01-28 11:12               ` Wei Liu
2015-01-28 11:12               ` Wei Liu
2015-01-29  0:41                 ` Chen, Tiejun
2015-01-29 10:50                   ` Wei Liu
2015-01-30  0:56                     ` Chen, Tiejun
2015-01-30 12:26                       ` Wei Liu
2015-01-31  7:07                         ` Xu, Quan
2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
2015-01-31 14:33                           ` Wei Liu
2015-01-31 15:21                             ` [Qemu-devel] " Xu, Quan
2015-01-31 15:21                             ` [Qemu-devel] [Xen-devel] " Xu, Quan
2015-01-31 14:33                           ` [Qemu-devel] " Wei Liu
2015-02-02  0:43                         ` Chen, Tiejun
2015-02-02  0:43                         ` Chen, Tiejun
2015-01-30 12:26                       ` Wei Liu
2015-01-30  0:56                     ` Chen, Tiejun
2015-01-29 10:50                   ` Wei Liu
2015-01-29  0:41                 ` Chen, Tiejun
2015-01-27 14:40           ` Ian Jackson
2015-01-23  0:43       ` Chen, Tiejun
2015-01-21 13:48   ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.