From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhHg9-0002Gj-Ah for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:53:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhHg5-0004Zv-5n for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:53:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41128) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhHg5-0004Zf-0G for qemu-devel@nongnu.org; Mon, 14 Aug 2017 11:53:17 -0400 Date: Mon, 14 Aug 2017 18:53:14 +0300 From: "Michael S. Tsirkin" Message-ID: <20170814185150-mutt-send-email-mst@kernel.org> References: <20170811151138.29405-1-anthony.perard@citrix.com> <20170811151138.29405-2-anthony.perard@citrix.com> <20170811201006-mutt-send-email-mst@kernel.org> <20170814145550.GA1475@perard.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170814145550.GA1475@perard.uk.xensource.com> Subject: Re: [Qemu-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: qemu-devel@nongnu.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Bruce Rogers , Igor Mammedov , Paolo Bonzini , Richard Henderson , Eduardo Habkost On Mon, Aug 14, 2017 at 03:55:50PM +0100, Anthony PERARD wrote: > On Fri, Aug 11, 2017 at 08:18:28PM +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2017 at 04:11:37PM +0100, Anthony PERARD wrote: > > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > > > set, but this was done only when ACPI tables are built which is not > > > needed for a Xen guest. The need for the property starts with commit > > > "pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice" > > > (f0c9d64a68b776374ec4732424a3e27753ce37b6). > > > > > > Set pci info before checking for the needs to build ACPI tables. > > > > > > Reported-by: Sander Eikelenboom > > > Tested-by: Sander Eikelenboom > > > Signed-off-by: Anthony PERARD > > > > I am worried that Xen will come to depend on specific > > assignment of bsel which isn't guaranteed. Thoughts on > > how to avoid that? > > Is it possible to have a different BSEL than 0 with PIIX ? With PCI to PCI bridges, yes. > Also, I don't known if having more than on PCI bus is going to work on > Xen, there is nothing in our ACPI tables beyond _SB.PCI0, and nothing to > use a different BSEL. My worry is someone might decide to implement hotplug for pci to pci bridges on Xen. If doing that, it's important to use the qemu supplied acpi tables. > > > > > > --- > > > In this patch rather than always calling acpi_set_pci_info() when > > > acpi_setup() is called, we could check first for acpi_enabled? (which is > > > true for Xen.) > > > > Yes, please change it like this. Also, please add > > a comment explainging what it does. > > Will do. > > -- > Anthony PERARD