From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzi0B-0004NR-Uo for qemu-devel@nongnu.org; Wed, 25 Jun 2014 03:52:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzi05-0005P3-PK for qemu-devel@nongnu.org; Wed, 25 Jun 2014 03:52:19 -0400 Received: from mga09.intel.com ([134.134.136.24]:2760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzi05-0005Or-Jy for qemu-devel@nongnu.org; Wed, 25 Jun 2014 03:52:13 -0400 Message-ID: <53AA7F8C.2010703@intel.com> Date: Wed, 25 Jun 2014 15:51:40 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 References: <1403662641-28526-1-git-send-email-tiejun.chen@intel.com> <1403662641-28526-3-git-send-email-tiejun.chen@intel.com> <53AA6AC2.1060301@redhat.com> In-Reply-To: <53AA6AC2.1060301@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , 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 On 2014/6/25 14:22, Paolo Bonzini wrote: > Il 25/06/2014 04:17, Tiejun Chen ha scritto: >> +static int create_pseudo_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice >> *hdev) >> +{ >> + struct PCIDevice *dev; >> + >> + char rid; >> + >> + /* We havt to use a simple PCI device to fake this ISA bridge >> + * to avoid making some confusion to BIOS and ACPI. >> + */ >> + dev = pci_create(bus, PCI_DEVFN(0x1f, 0), >> "pseudo-intel-pch-isa-bridge"); >> + >> + qdev_init_nofail(&dev->qdev); >> + >> + pci_config_set_vendor_id(dev->config, hdev->vendor_id); >> + pci_config_set_device_id(dev->config, hdev->device_id); >> + >> + xen_host_pci_get_block(hdev, PCI_REVISION_ID, (uint8_t *)&rid, 1); >> + >> + pci_config_set_revision(dev->config, rid); >> + >> + XEN_PT_LOG(dev, "The pseudo Intel PCH ISA bridge created.\n"); >> + return 0; >> +} > > This patch doesn't compile on its own (this static function is unused). > > pci_create_pch should be moved in this patch. > Okay I will try this. Thanks Tiejun