Received: from eggs.gnu.org ([2001:4830:134:3::10]:56111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlfyD-0004Cn-Kv for qemu-devel@nongnu.org; Tue, 04 Nov 2014 10:24:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlfy7-0002zo-FT for qemu-devel@nongnu.org; Tue, 04 Nov 2014 10:24:33 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:32881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlfy7-0002zc-92 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 10:24:27 -0500 Date: Tue, 4 Nov 2014 15:24:18 +0000 From: Stefano Stabellini In-Reply-To: <5458DDB5.5030807@redhat.com> Message-ID: References: <1400846632-28506-1-git-send-email-imammedo@redhat.com> <5458DDB5.5030807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: Re: [Qemu-devel] [PATCH] pc: piix4_pm: init legacy PCI hotplug when running on Xen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Wu, Feng" , Stefano Stabellini , "mst@redhat.com" , "qemu-devel@nongnu.org" , "aliguori@amazon.com" , "Chen, Tiejun" , "anthony.perard@citrix.com" , Igor Mammedov On Tue, 4 Nov 2014, Paolo Bonzini wrote: > On 04/11/2014 11:36, Stefano Stabellini wrote: > > Feng, thanks for the email. > > > > I was assuming that one of the other maintainers would take care of the > > patch, but I am happy to submit a pull request for it too. > > > > Paolo, Michael? > > I think this patch is not okay, because Xen does use fw_cfg when you > have -kernel. So I think you should really use "if (xen_enabled())". Well spotted! The original patch was submitted before we introduced -kernel to hvm guests. If (xen_enabled()) would work. > >>> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c > >>> index 227ea30..12542c3 100644 > >>> --- a/hw/acpi/piix4.c > >>> +++ b/hw/acpi/piix4.c > >>> @@ -501,6 +501,9 @@ I2CBus *piix4_pm_init(PCIBus *bus, int devfn, > >>> uint32_t smb_io_base, > >>> s->irq = sci_irq; > >>> s->smi_irq = smi_irq; > >>> s->kvm_enabled = kvm_enabled; > >>> + if (!fw_cfg) { > >>> + s->use_acpi_pci_hotplug = false; > >>> + } > >>> > >>> qdev_init_nofail(dev); > >>> > >>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c > >>> index a13e8d6..067ff0c 100644 > >>> --- a/hw/i386/pc_piix.c > >>> +++ b/hw/i386/pc_piix.c > >>> @@ -840,17 +840,6 @@ static QEMUMachine xenfv_machine = { > >>> .max_cpus = HVM_MAX_VCPUS, > >>> .default_machine_opts = "accel=xen", > >>> .hot_add_cpu = pc_hot_add_cpu, > >>> - .compat_props = (GlobalProperty[]) { > >>> - /* xenfv has no fwcfg and so does not load acpi from QEMU. > >>> - * as such new acpi features don't work. > >>> - */ > >>> - { > >>> - .driver = "PIIX4_PM", > >>> - .property = "acpi-pci-hotplug-with-bridge-support", > >>> - .value = "off", > >>> - }, > >>> - { /* end of list */ } > >>> - }, > >>> }; > >>> #endif > >>> > >>> -- > >>> 1.9.0 > >>> > >> >