From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v10 01/10] tools: Add vga=vmware Date: Fri, 15 May 2015 00:42:30 +0100 Message-ID: <555532E6.1040608@citrix.com> References: <1431646469-23022-1-git-send-email-dslutz@verizon.com> <1431646469-23022-2-git-send-email-dslutz@verizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431646469-23022-2-git-send-email-dslutz@verizon.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Slutz , xen-devel@lists.xen.org Cc: Kevin Tian , Keir Fraser , Ian Campbell , Stefano Stabellini , Jun Nakajima , Eddie Dong , Ian Jackson , Tim Deegan , George Dunlap , Aravind Gopalakrishnan , Jan Beulich , Boris Ostrovsky , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 15/05/2015 00:34, Don Slutz wrote: > This allows use of QEMU's VMware emulated video card > > Signed-off-by: Don Slutz Nack. Qemu-trad is currently has remote code execution vulnerabilities in its vmware vga model. CVE-2014-3689 amongst others. Please fix those first before offering an option to configure it. ~Andrew > --- > v10: New at v10. > > Was part of "tools: Add vmware_hwver support" > > docs/man/xl.cfg.pod.5 | 2 +- > tools/libxl/libxl.h | 6 ++++++ > tools/libxl/libxl_dm.c | 8 ++++++++ > tools/libxl/libxl_types.idl | 1 + > tools/libxl/xl_cmdimpl.c | 2 ++ > 5 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 8e4154f..ba78374 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -1374,7 +1374,7 @@ This option is deprecated, use vga="stdvga" instead. > > =item B > > -Selects the emulated video card (none|stdvga|cirrus|qxl). > +Selects the emulated video card (none|stdvga|cirrus|qxl|vmware). > The default is cirrus. > > In general, QXL should work with the Spice remote display protocol > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 2ed7194..007a211 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -192,6 +192,12 @@ > * is not present, instead of ERROR_INVAL. > */ > #define LIBXL_HAVE_ERROR_DOMAIN_NOTFOUND 1 > + > +/* > + * The libxl_vga_interface_type has the type for vmware. > + */ > +#define LIBXL_HAVE_LIBXL_VGA_INTERFACE_TYPE_VMWARE 1 > + > /* > * libxl ABI compatibility > * > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 0c6408d..9a06f9b 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -251,6 +251,9 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, > case LIBXL_VGA_INTERFACE_TYPE_NONE: > flexarray_append_pair(dm_args, "-vga", "none"); > break; > + case LIBXL_VGA_INTERFACE_TYPE_VMWARE: > + flexarray_append_pair(dm_args, "-vga", "vmware"); > + break; > case LIBXL_VGA_INTERFACE_TYPE_QXL: > break; > } > @@ -633,6 +636,11 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, > GCSPRINTF("qxl-vga,vram_size_mb=%"PRIu64",ram_size_mb=%"PRIu64, > (b_info->video_memkb/2/1024), (b_info->video_memkb/2/1024) ) ); > break; > + case LIBXL_VGA_INTERFACE_TYPE_VMWARE: > + flexarray_append_pair(dm_args, "-device", > + GCSPRINTF("vmware-svga,vgamem_mb=%d", > + libxl__sizekb_to_mb(b_info->video_memkb))); > + break; > } > > if (b_info->u.hvm.boot) { > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index 65d479f..9d6ca45 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -184,6 +184,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [ > (2, "STD"), > (3, "NONE"), > (4, "QXL"), > + (5, "VMWARE"), > ], init_val = "LIBXL_VGA_INTERFACE_TYPE_CIRRUS") > > libxl_vendor_device = Enumeration("vendor_device", [ > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 373aa37..0e44b12 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -2117,6 +2117,8 @@ skip_vfb: > b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE; > } else if (!strcmp(buf, "qxl")) { > b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL; > + } else if (!strcmp(buf, "vmware")) { > + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_VMWARE; > } else { > fprintf(stderr, "Unknown vga \"%s\" specified\n", buf); > exit(1);