From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEHb-0001QG-NA for qemu-devel@nongnu.org; Wed, 01 Apr 2015 04:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdEHY-0006Oz-E9 for qemu-devel@nongnu.org; Wed, 01 Apr 2015 04:45:55 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:43615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEHY-0006On-92 for qemu-devel@nongnu.org; Wed, 01 Apr 2015 04:45:52 -0400 Message-ID: <1427877942.2115.224.camel@citrix.com> From: Ian Campbell Date: Wed, 1 Apr 2015 09:45:42 +0100 In-Reply-To: <551B4445.9070007@intel.com> References: <1427073466-16956-1-git-send-email-tiejun.chen@intel.com> <1427073466-16956-3-git-send-email-tiejun.chen@intel.com> <1427208618.21742.421.camel@citrix.com> <55120B1C.5080004@intel.com> <1427279543.10784.53.camel@citrix.com> <551358A7.2090607@intel.com> <1427364418.10784.122.camel@citrix.com> <5514B281.1050301@intel.com> <1427450046.13935.90.camel@citrix.com> <5518A6B8.2050407@intel.com> <1427707150.13935.235.camel@citrix.com> <551B4445.9070007@intel.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Chen, Tiejun" Cc: Ian.Jackson@eu.citrix.com, wei.liu2@citrix.com, qemu-devel@nongnu.org, stefano.stabellini@citrix.com, xen-devel@lists.xen.org On Wed, 2015-04-01 at 09:05 +0800, Chen, Tiejun wrote: > @@ -699,9 +699,35 @@ working graphics passthrough. See the > XenVGAPassthroughTestedAdapters > L wiki page > for currently supported graphics cards for gfx_passthru. > > -gfx_passthru is currently only supported with the qemu-xen-traditional > -device-model. Upstream qemu-xen device-model currently does not have > -support for gfx_passthru. > +gfx_passthru is currently supported both with the qemu-xen-traditional > +device-model and upstream qemu-xen device-model. > + > +When given as a boolean the B option either disables gfx > +passthru or enables autodetection. > + > +But when given as a string the B option describes the type > +of device to enable. Note this behavior is only supported with the upstream > +qemu-xen device-model. Perhaps add "With qemu-xen-traditional IGD is always assumed and other options than autodetect or explicit IGD will result in an error"? > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index a8b08f2..4fd6310 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -325,7 +325,15 @@ 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"); > + switch (b_info->u.hvm.gfx_passthru_kind) { > + case LIBXL_GFX_PASSTHRU_KIND_DEFAULT: > + case LIBXL_GFX_PASSTHRU_KIND_IGD: > + flexarray_append(dm_args, "-gfx_passthru"); > + break; > + default: > + LOG(ERROR, "unsupported gfx_passthru_kind.\n"); Sorry, LOG should not get a \n like my example had, my fault. With that if you resend the series with git send-email (so it doesn't get whitespace mangled) I think we are good to go! Ian.