From nobody Fri Nov 14 05:13:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584569845; cv=none; d=zohomail.com; s=zohoarc; b=eTxOt/6VXMaRzXdYeJrUh5aI5StVQgDear+eBNWJBeQz6AhsQi9X6em+WFntr1beOay0V62/ieBJrVzThzcEXVtJDV8dwPz+L5CkWOxjhPrMwSnLFAR9y67PyweObZchd3ze04vlaDj4vJEQuM/wUjP3auZNHb+Cbt/q5gAepd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584569845; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=huC2OGgYbvW84xwnIC5mxBB7O5lT6AM5qZ1RWUfo52o=; b=WnZHRisNVf7HPX+dlOd/j6kS5+SiU4ol1e/GAdSB6KLvScOd6nKqySEqp1JH5bTEghhRtnMLrn9+49hbgkjYqUjAAEkGzPOwrggTEY3IyISOUdOvLk6Pf113EdNnGu/evys4bcbHecI3hfCeogPjtWnVqChqDRa6EgkxY1eZPPk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584569845704848.70321743444; Wed, 18 Mar 2020 15:17:25 -0700 (PDT) Received: from localhost ([::1]:58969 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEh07-0007oM-Ua for importer@patchew.org; Wed, 18 Mar 2020 18:17:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60857) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEgz0-0006yS-66 for qemu-devel@nongnu.org; Wed, 18 Mar 2020 18:16:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEgyy-0002P8-L3 for qemu-devel@nongnu.org; Wed, 18 Mar 2020 18:16:13 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:48205) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jEgyy-0002M4-Ao for qemu-devel@nongnu.org; Wed, 18 Mar 2020 18:16:12 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-74gBU8XQP5yoxpccECO0qA-1; Wed, 18 Mar 2020 18:16:10 -0400 Received: by mail-wr1-f69.google.com with SMTP id t10so6804wrp.15 for ; Wed, 18 Mar 2020 15:16:09 -0700 (PDT) Received: from localhost.localdomain (37.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.37]) by smtp.gmail.com with ESMTPSA id t193sm248214wmt.14.2020.03.18.15.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 15:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584569772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=huC2OGgYbvW84xwnIC5mxBB7O5lT6AM5qZ1RWUfo52o=; b=HNV1OCFJjvvVEFegPxGRuchHk2EPF833tpMJwIID4x9KBNE3uJY3M3ScLEgMGZN7Jwtffp VBxw9TwiaeAIDhnsYi/M2BtZMyOG9TN2oNdONrSTRkO0PpKI8iP9hLhh1kf4wqx5A6Go9G Wpl4TLWuCILpFLXLdOPXbcUOi30QxYE= X-MC-Unique: 74gBU8XQP5yoxpccECO0qA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RwaXQ72KSMPLcO7npdnd4uMzaGDTxoI8eHLkc3Jule0=; b=C1CqHaY1+Y4qEaufCxFTsQqJ8yd9ykOIK3Y9BjXQTL/xmAD8uMvSZsMCxi2jt6u8J8 JPvsgGsc03ZOyei+j/YMdNuy759D9MxRurM+xljwM5t7C8oqQgKGPspO9FlvtfilUjaR pLxa8KePUblPFVZ/PcANxKjgM70YPjHaDXSC/DfxJZH/yOW+xRMBs39OH+lhyBx9V5Kh oiAEhimHumd9p4X6hRNNFnQzNSgGLInOZSWptB9khpjrG//7Yh17Xl+Kw6w3VZWbULHP JUCVKJ5pMU2BctZ+D/CEolnnYittwICh2fmQ0xaWHSPJkwJaFzVr5IP8a/zpVFeGlVp2 Guew== X-Gm-Message-State: ANhLgQ14iBKqi869ZDM4GItQaiAfqmYK9KBShKQ+8C+bC9b9OL+QqPlx orzfdderO2nlRaPLE5Gc+MvQVu8yzS/M9hJjRCE9g6IxGdsNwpHIOkmatNLQutds44jmz6ovdn1 KEoK6oTt2EL726GE= X-Received: by 2002:adf:e6ce:: with SMTP id y14mr102068wrm.152.1584569768879; Wed, 18 Mar 2020 15:16:08 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsl2x0oi4PD9D+AGQyfxhPKIVAcU4f4XQuDL0gmf+Z6vZbk7Oc+du7IwHp1jxOCpG/4+Q+sDw== X-Received: by 2002:adf:e6ce:: with SMTP id y14mr102045wrm.152.1584569768661; Wed, 18 Mar 2020 15:16:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 1/2] hw/acpi/piix4: Add 'system-hotplug-support' property Date: Wed, 18 Mar 2020 23:15:30 +0100 Message-Id: <20200318221531.22910-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200318221531.22910-1-philmd@redhat.com> References: <20200318221531.22910-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , Marcelo Tosatti , Aleksandar Markovic , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Paolo Bonzini , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" The I/O ranges registered by the piix4_acpi_system_hot_add_init() function are not documented in the PIIX4 datasheet. This appears to be a PC-only feature added in commit 5e3cb5347e ("initialize hot add system / acpi gpe") which was then moved to the PIIX4 device model in commit 9d5e77a22f ("make qemu_system_device_hot_add piix independent") Add a property (default enabled, to not modify the current behavior) to allow machines wanting to model a simple PIIX4 to disable this feature. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Should I squash this with the next patch and start with default=3Dfalse, which is closer to the hardware model? --- hw/acpi/piix4.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 964d6f5990..9c970336ac 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -78,6 +78,7 @@ typedef struct PIIX4PMState { =20 AcpiPciHpState acpi_pci_hotplug; bool use_acpi_pci_hotplug; + bool use_acpi_system_hotplug; =20 uint8_t disable_s3; uint8_t disable_s4; @@ -503,8 +504,10 @@ static void piix4_pm_realize(PCIDevice *dev, Error **e= rrp) s->machine_ready.notify =3D piix4_pm_machine_ready; qemu_add_machine_init_done_notifier(&s->machine_ready); =20 - piix4_acpi_system_hot_add_init(pci_address_space_io(dev), - pci_get_bus(dev), s); + if (s->use_acpi_system_hotplug) { + piix4_acpi_system_hot_add_init(pci_address_space_io(dev), + pci_get_bus(dev), s); + } qbus_set_hotplug_handler(BUS(pci_get_bus(dev)), OBJECT(s), &error_abor= t); =20 piix4_pm_add_propeties(s); @@ -635,6 +638,8 @@ static Property piix4_pm_properties[] =3D { use_acpi_pci_hotplug, true), DEFINE_PROP_BOOL("memory-hotplug-support", PIIX4PMState, acpi_memory_hotplug.is_enabled, true), + DEFINE_PROP_BOOL("system-hotplug-support", PIIX4PMState, + use_acpi_system_hotplug, true), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.21.1