From patchwork Thu Jan 29 00:41:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiejun Chen X-Patchwork-Id: 434245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DDE28140083 for ; Thu, 29 Jan 2015 11:42:06 +1100 (AEDT) Received: from localhost ([::1]:57156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGdBN-0000Dd-4L for incoming@patchwork.ozlabs.org; Wed, 28 Jan 2015 19:42:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGdAt-0007x8-55 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 19:41:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGdAm-0002f3-TR for qemu-devel@nongnu.org; Wed, 28 Jan 2015 19:41:35 -0500 Received: from mga02.intel.com ([134.134.136.20]:17982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGdAm-0002eq-Gs for qemu-devel@nongnu.org; Wed, 28 Jan 2015 19:41:28 -0500 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 28 Jan 2015 16:41:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="446739569" Received: from unknown (HELO [10.238.128.158]) ([10.238.128.158]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jan 2015 16:27:37 -0800 Message-ID: <54C981B4.5070205@intel.com> Date: Thu, 29 Jan 2015 08:41:24 +0800 From: "Chen, Tiejun" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Wei Liu References: <1421824792-3925-1-git-send-email-tiejun.chen@intel.com> <21695.36752.122911.770104@mariner.uk.xensource.com> <1421848132.11160.44.camel@nilsson.home.kraxel.org> <54C0498D.1030603@intel.com> <54C19936.1060804@intel.com> <54C58DF2.2090509@intel.com> <21703.41796.519916.252197@mariner.uk.xensource.com> <54C83090.2080202@intel.com> <20150128111219.GN24026@zion.uk.xensource.com> In-Reply-To: <20150128111219.GN24026@zion.uk.xensource.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.20 Cc: qemu-devel@nongnu.org, xen-devel@lists.xen.org, Ian Jackson , Gerd Hoffmann , ian.campbell@citrix.com Subject: Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 2015/1/28 19:12, Wei Liu wrote: > On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote: >> On 2015/1/27 22:40, Ian Jackson wrote: >>> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"): >>>> On 2015/1/23 8:43, Chen, Tiejun wrote: >>>>> On 2015/1/22 8:51, Chen, Tiejun wrote: >>>>>> At this point I just concern here if we still use 'gfx_passthrou', at >>>>>> least it may look like a backward compatibility with older versions of >>>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your >>>>>> final option. >>> ... >>>>> Any feedback to this option I should follow here? >>>> >>>> Ping... >>> >>> I think this is a question that qemu upstream should answer. >>> >> >> Actually this is just commented by Gerd in qemu upstream. So now looks in >> Xen side you guys don't have any objection to use 'igd-passthru' as well. If >> yes, I'm fine to adopt this. >> > > Yes, we would like to stay in line with upstream. Wei, Thanks for your response. > > Just remember to handle old option in libxl if your old option is already > released by some older version of QEMUs. I just drop that old option, -gfx_passthru, if we're under qemu upstream circumstance, like this, 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) { Is this good enough? Thanks Tiejun --- 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 {