From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzgeg-0004lq-4U for qemu-devel@nongnu.org; Wed, 25 Jun 2014 02:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzgeX-0005A0-4Y for qemu-devel@nongnu.org; Wed, 25 Jun 2014 02:26:02 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:58908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzgeW-00059w-Uo for qemu-devel@nongnu.org; Wed, 25 Jun 2014 02:25:53 -0400 Received: by mail-we0-f169.google.com with SMTP id t60so1458446wes.14 for ; Tue, 24 Jun 2014 23:25:52 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53AA6B68.7050406@redhat.com> Date: Wed, 25 Jun 2014 08:25:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403662641-28526-1-git-send-email-tiejun.chen@intel.com> <1403662641-28526-4-git-send-email-tiejun.chen@intel.com> In-Reply-To: <1403662641-28526-4-git-send-email-tiejun.chen@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v5][PATCH 3/5] xen, gfx passthrough: support Intel IGD passthrough with VT-D List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tiejun Chen , anthony.perard@citrix.com, stefano.stabellini@eu.citrix.com, mst@redhat.com, Kelly.Zytaruk@amd.com Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, yang.z.zhang@intel.com Il 25/06/2014 04:17, Tiejun Chen ha scritto: > +int pci_create_pch(PCIBus *bus) > +{ > + XenHostPCIDevice hdev; > + int r = 0; > + > + if (!xen_has_gfx_passthru) { > + return r; > + } > + You could make this an assertion, since the function is never called with xen_has_gfx_passthru == 0. Or just drop the check completely, so the function can be moved in patch 2. Paolo