From patchwork Thu May 1 21:04:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886368 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp513897wrq; Thu, 1 May 2025 14:06:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLnsQhIBci0GAGnqunnHhdfPxfmFOwaAGJ5LmwjBp6gwg2NH0U+8MZ75NXscDvui7mwr8N5g==@linaro.org X-Google-Smtp-Source: AGHT+IHLwyt02CdwTHCifH/KxVMx2v2+xFL3zMQQgyWqv3xE5pa4G5sruWnqjR37gHXIDS6mRBoG X-Received: by 2002:a05:622a:4cca:b0:477:1b2d:f05 with SMTP id d75a77b69052e-48c1950a30emr11797711cf.15.1746133571470; Thu, 01 May 2025 14:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746133571; cv=none; d=google.com; s=arc-20240605; b=RUm7p3TxZHkpxbNd0J1frGxs8645Y0DzEBELpzBjOWuLElpH1GyYUi4zhbq+Lx/U2z 9Uxdwwt2W1IHoffODU0GiHOXCtOLuO4WGXIhegUEqhRc7Fa50fyJquuoXyqUPWP4A+M8 ywnHq/kz8asVBFXIV96L8lWmPRQ2xo5IdGFggS2nsFLYhCi283BQHKoCWswbXjP9XpiB BVS4t3hsphq86mVJMN7GLJnMOIXnzqHhcZx6xyFydGES6M0lE8um9vVynLXx7CkdCZyc /3kvoQelf3AdAul+kuYlQct5HnJ0Xf93HSi7lvAV3PuZ6k8pmDfM6eKimnbu6keG+Rzo xtOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j5ZMEn7NCnklWa+DQm3mEiEs22N/Anfjag2M9l8eBgM=; fh=uloqeIiLIhsqAWHY8zIEmzfMIcw7bGWZuINspytDykk=; b=Z2yCmsh4PptU9tp97sFfc6Ow5U4RSZPk6mgBCHpbIowcy8rk+gxCgx3r2OKnolF4ja uY6eiD1nwQXfYARZdszIdIIdN4RH9NbvLWvOjjQOIOj+6GhONDOwH5dxvXBB6cqKfiSq DnQrhUd+569SmWBpoTbaWvNSZotGG0hFbWDitVq0MoLBHtSup+O6C6QcxBGlC0Hrl7Lv 0MsMmeaF37qYaJymlWlGr7NhHSbRoyp8BemyrwUe/7oVru8RZHtv3G3A9nRu/h5tkOFe YiO2XVA88io/ClFgBo317B9ZXoZXvbpGSX6Ie+Rx/HvYre1NF7ZybSNoAihPEMWyZGCn 6DYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gDP/Cp1+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b9872442csi14347981cf.353.2025.05.01.14.06.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 May 2025 14:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gDP/Cp1+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAb64-00014K-UZ; Thu, 01 May 2025 17:05:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uAb63-00013G-Gc for qemu-devel@nongnu.org; Thu, 01 May 2025 17:05:31 -0400 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAb61-0006VR-MQ for qemu-devel@nongnu.org; Thu, 01 May 2025 17:05:31 -0400 Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-3d8fc9dbce4so9431785ab.0 for ; Thu, 01 May 2025 14:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746133528; x=1746738328; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j5ZMEn7NCnklWa+DQm3mEiEs22N/Anfjag2M9l8eBgM=; b=gDP/Cp1+nSdU3DlP3mtW04nBm9J4WCQR7XHpqtmvYc5tTDHZI7BK/quNDH21I8kqs2 5T8oU+FuAgDSzl4LMOusSq2FX9fUgTsfeFGc7CpuoROSVffwN+oMwgvvw3QtkFKWkNZo 0fkcG8Fp6bsy1AxIwmjCYPW0NLDHaNuOzJKABDYKWGO7EhHN6sbCDoa23cVU1KT6cWbo ELRjMZ9+jztJ+Ho9rK2W5RblCQ0/WkgNPZS6u86GKBYzDG+SUSuRN6GBYdkT8lVKUAZj baxfujiuOJf768bpVVD53n7NrAUGnbOjWBwiBpzXLsyA2GPJw/OunX/2xMRCwTIFqpao 3oaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746133528; x=1746738328; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j5ZMEn7NCnklWa+DQm3mEiEs22N/Anfjag2M9l8eBgM=; b=BrKbnc9bjYq7M/qvO2lVLh9jYMuC05r9wHYT9+n7VxtgIPuc+kNB6677KJr85Q9O/O v6rWRz7zrA6J9BfhkIKqJ3mlfpa3qnna456AZqb+w4plavrPtQicrdy9dD9xqBfF/mF1 wV4p53g4DATG9FIxsSQxkH63LxB4koV4OQ5WnECCPE2jmFA+rXWDvDUzaJEB0NljiKVp o8we41W4VVO8/bwKsMBjsLZMKRHxlj0FiVNsGfBFHhWPVKyA/V3uFuRGdnIuxvk8XEVH BVNMfe+hFEA+8AS1jSnbWqiIhy2b/Pdp4pPHtYhH7rxZH2LhalGSj/7ITDif3NL2g0w8 hxsw== X-Gm-Message-State: AOJu0YxGdA1VOUV2WXoD98J9TyFEARCfF3p8DpFjWJMLn5nwJHoYtgQu P33aPWZX+WL2WPbod65Onqhj/NvamzoHZJnB/yqgQYib/TLfc+hOpG52VYBfA3id7/CAPJFgpIh N X-Gm-Gg: ASbGncv6nXe5dRR2r/+iTzok8pnkkOrOd2jiZqlWsPhS5fQ1Mykkp929vfDGmhAKcpk e5YwUJMIMX0q+HeJZann1ds8AV783TKdL8CHIlkfMjxViV9/TbrEw0JK8tRVv01EfxhaFlj8Ano +tsbdxt0e0J8cL11D8+hm2Y8NqQWL32Cp79zV5UYRiHDOnYvGmvrTX5ohtw4o1t47QRCNPTCF2v cut21RTT6hm2pPah569xvbbJQ3nd4PWucSqT+irDoQ7OANGFUQTBdF+BA24zMacmS+p209MpXw3 y7weX157UqrfHqHYDeSPsWkLBkhacgZdW/ssXz/DbOMTJSm/amOdO+/9VnkD4KqZebUEqbDV24t +HzQsIwebtCup1cCEOtEAB44ebg== X-Received: by 2002:a05:6e02:3e8d:b0:3d9:3675:f531 with SMTP id e9e14a558f8ab-3d97ae710cbmr8096145ab.6.1746133528213; Thu, 01 May 2025 14:05:28 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d975e27d71sm3033745ab.10.2025.05.01.14.05.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 01 May 2025 14:05:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Zhao Liu , Hanna Reitz , Igor Mammedov , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Paolo Bonzini , Eduardo Habkost , qemu-block@nongnu.org, Jason Wang , Richard Henderson , Yanan Wang , Ani Sinha , "Michael S. Tsirkin" , Thomas Huth , Gerd Hoffmann , Kevin Wolf , Yi Liu Subject: [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Date: Thu, 1 May 2025 23:04:41 +0200 Message-ID: <20250501210456.89071-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250501210456.89071-1-philmd@linaro.org> References: <20250501210456.89071-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12d; envelope-from=philmd@linaro.org; helo=mail-il1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 The ICH9_LPC_SMI_F_BROADCAST_BIT feature bit was only set in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off' property. We removed all machines using that array, lets remove that property and all the code around it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/southbridge/ich9.h | 1 - hw/acpi/ich9.c | 6 ++---- hw/isa/lpc_ich9.c | 22 +++------------------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h index 1e231e89c92..4764c03ac2d 100644 --- a/include/hw/southbridge/ich9.h +++ b/include/hw/southbridge/ich9.h @@ -244,7 +244,6 @@ struct ICH9LPCState { #define ICH9_LPC_SMI_NEGOTIATED_FEAT_PROP "x-smi-negotiated-features" /* bit positions used in fw_cfg SMI feature negotiation */ -#define ICH9_LPC_SMI_F_BROADCAST_BIT 0 #define ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT 1 #define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT 2 diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index c7a735bf642..40564605735 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -477,8 +477,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { uint64_t negotiated = lpc->smi_negotiated_features; - if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && - !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) { + if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) { error_setg(errp, "cpu hotplug with SMI wasn't enabled by firmware"); error_append_hint(errp, "update machine type to newer than 5.1 " "and firmware that suppors CPU hotplug with SMM"); @@ -526,8 +525,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, !lpc->pm.cpu_hotplug_legacy) { uint64_t negotiated = lpc->smi_negotiated_features; - if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && - !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) { + if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) { error_setg(errp, "cpu hot-unplug with SMI wasn't enabled " "by firmware"); error_append_hint(errp, "update machine type to a version having " diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 71afb45b631..c57a06e0dde 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -400,15 +400,6 @@ static void smi_features_ok_callback(void *opaque) guest_cpu_hotplug_features = guest_features & (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) | BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)); - if (!(guest_features & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT)) && - guest_cpu_hotplug_features) { - /* - * cpu hot-[un]plug with SMI requires SMI broadcast, - * leave @features_ok at zero - */ - return; - } - if (guest_cpu_hotplug_features == BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) { /* cpu hot-unplug is unsupported without cpu-hotplug */ @@ -470,14 +461,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg) /* SMI_EN = PMBASE + 30. SMI control and enable register */ if (lpc->pm.smi_en & ICH9_PMIO_SMI_EN_APMC_EN) { - if (lpc->smi_negotiated_features & - (UINT64_C(1) << ICH9_LPC_SMI_F_BROADCAST_BIT)) { - CPUState *cs; - CPU_FOREACH(cs) { - cpu_interrupt(cs, CPU_INTERRUPT_SMI); - } - } else { - cpu_interrupt(current_cpu, CPU_INTERRUPT_SMI); + CPUState *cs; + CPU_FOREACH(cs) { + cpu_interrupt(cs, CPU_INTERRUPT_SMI); } } } @@ -830,8 +816,6 @@ static const Property ich9_lpc_properties[] = { DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, false), DEFINE_PROP_BOOL("smm-compat", ICH9LPCState, pm.smm_compat, false), DEFINE_PROP_BOOL("smm-enabled", ICH9LPCState, pm.smm_enabled, false), - DEFINE_PROP_BIT64("x-smi-broadcast", ICH9LPCState, smi_host_features, - ICH9_LPC_SMI_F_BROADCAST_BIT, true), DEFINE_PROP_BIT64("x-smi-cpu-hotplug", ICH9LPCState, smi_host_features, ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT, true), DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,