From patchwork Fri Nov 14 11:30:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 40812 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 11B8E244FC for ; Fri, 14 Nov 2014 11:31:25 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id a1sf500436wgh.7 for ; Fri, 14 Nov 2014 03:31:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type; bh=1k38b/KoXQXIwz3+BPMUiApTqIO77nQQ5Mqkav7Z920=; b=kaUVSPObRlRWKC+38cVBvlNckV8kNNIZtjF3yLq1jI54BmMmJvlofpCkxeqdio3FWP OINgCzE92tm+HOOLNhNbDyHkc/13dUfGVS/ISu4gBEPLhN6ss+QECa2zOilBqiRkT6A7 r13ybpUYJWrcUzHSzUcbPlLC1czek0RAjo/gC1a2gQknRDgGeVoBa213e209wl79RDpg QLKlnUMN0mB8Q0qNBkxE1mrVf/pHJ/m3jlf/D6GIexgqlT0LBnlc4hh+HZ9uGtzJv7nc gWhnI6tcsXgK8ISoDA7yR5K0P/e7AQ4SBHqDDKRL3Z7lq34d7HrXMAo1/dZhMDR/cJNK 2Bng== X-Gm-Message-State: ALoCoQnMu4PgRdSRX1VQtLYibd1fFULG6fNwMFnSLlNBwtgiDvmCGBCz4mP1BuVGNzYmOXTXPcYs X-Received: by 10.112.151.38 with SMTP id un6mr6600893lbb.0.1415964684320; Fri, 14 Nov 2014 03:31:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.4 with SMTP id i4ls973771laf.59.gmail; Fri, 14 Nov 2014 03:31:24 -0800 (PST) X-Received: by 10.112.133.138 with SMTP id pc10mr7829709lbb.48.1415964684063; Fri, 14 Nov 2014 03:31:24 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id o1si41376551lbw.57.2014.11.14.03.31.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 03:31:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so14663313lab.26 for ; Fri, 14 Nov 2014 03:31:23 -0800 (PST) X-Received: by 10.152.42.226 with SMTP id r2mr7734927lal.29.1415964683923; Fri, 14 Nov 2014 03:31:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp748473lbc; Fri, 14 Nov 2014 03:31:22 -0800 (PST) X-Received: by 10.236.30.33 with SMTP id j21mr9003893yha.157.1415964682173; Fri, 14 Nov 2014 03:31:22 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t4si4872860qar.121.2014.11.14.03.31.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Nov 2014 03:31:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:35953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpF60-0008MC-I9 for patch@linaro.org; Fri, 14 Nov 2014 06:31:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpF5L-0007kA-F3 for qemu-devel@nongnu.org; Fri, 14 Nov 2014 06:30:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpF5H-0008Gl-21 for qemu-devel@nongnu.org; Fri, 14 Nov 2014 06:30:39 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:53346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpF5G-0008Gg-TP for qemu-devel@nongnu.org; Fri, 14 Nov 2014 06:30:34 -0500 X-IronPort-AV: E=Sophos;i="5.07,385,1413244800"; d="scan'208";a="192811192" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Fri, 14 Nov 2014 06:30:33 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XpF59-0006kB-Kr; Fri, 14 Nov 2014 11:30:27 +0000 From: Stefano Stabellini To: Date: Fri, 14 Nov 2014 11:30:09 +0000 Message-ID: <1415964611-20838-1-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: peter.maydell@linaro.org, Igor Mammedov , xen-devel@lists.xensource.com, Li Liang , Stefano Stabellini Subject: [Qemu-devel] [PULL for-2.2 1/2] pc: piix4_pm: init legacy PCI hotplug when running on Xen 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Igor Mammedov If user starts QEMU with "-machine pc,accel=xen", then compat property in xenfv won't work and it would cause error: "Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set" when PCI device is added with -device on QEMU CLI. From: Igor Mammedov In case of Xen instead of using compat property, just use the fact that xen doesn't use QEMU's fw_cfg/acpi tables to switch piix4_pm into legacy PCI hotplug mode when Xen is enabled. Signed-off-by: Igor Mammedov Signed-off-by: Li Liang Signed-off-by: Stefano Stabellini Acked-by: Paolo Bonzini --- hw/acpi/piix4.c | 4 ++++ hw/i386/pc_piix.c | 11 ----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 78c0a6d..481a16c 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -36,6 +36,7 @@ #include "hw/mem/pc-dimm.h" #include "hw/acpi/memory_hotplug.h" #include "hw/acpi/acpi_dev_interface.h" +#include "hw/xen/xen.h" //#define DEBUG @@ -501,6 +502,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 (xen_enabled()) { + 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 b559181..7bb97a4 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -916,17 +916,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