From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 9E11E1FF136 for ; Mon, 09 Feb 2026 14:33:32 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DE2DA7499; Mon, 9 Feb 2026 14:34:14 +0100 (CET) From: Fiona Ebner To: pve-devel@lists.proxmox.com, Dominik Csapak Subject: applied: [PATCH qemu-server] machine: fix not trying to set S3/S4 ACPI power state for virt machine Date: Mon, 9 Feb 2026 14:34:03 +0100 Message-ID: <177064395383.107692.307285237184899802.b4-ty@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260203141202.3567520-1-d.csapak@proxmox.com> References: <20260203141202.3567520-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770643966705 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.016 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: MQNEI6XA5QA2LUPS2KZ2M3GVGN76VPER X-Message-ID-Hash: MQNEI6XA5QA2LUPS2KZ2M3GVGN76VPER X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 03 Feb 2026 15:10:50 +0100, Dominik Csapak wrote: > For aarch64 the default machine is 'virt' already, so we have to consider > this case as well here. Applied, with the below follow-up, thanks! [1/1] machine: fix not trying to set S3/S4 ACPI power state for virt machine commit: 0c14d454f482bb0ded435782155d444ae9885db1 commit f68db077fe6a96c05081f5306bf63097a84ed79f (HEAD -> master, proxdev/master, origin/master) Author: Fiona Ebner Date: Mon Feb 9 14:21:09 2026 +0100 machine: power state flags: determine actual machine type up front to improve readability While it should not matter in practice, other functions check if the value is falsy rather than defined to apply the fallback, so do the same here to keep it consistent. Signed-off-by: Fiona Ebner --- src/PVE/QemuServer/Machine.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/PVE/QemuServer/Machine.pm b/src/PVE/QemuServer/Machine.pm index c5f0104a..b87889b4 100644 --- a/src/PVE/QemuServer/Machine.pm +++ b/src/PVE/QemuServer/Machine.pm @@ -470,15 +470,13 @@ sub check_and_pin_machine_string { sub get_power_state_flags { my ($machine_conf, $arch, $version_guard) = @_; - if ( - defined($machine_conf->{type}) && $machine_conf->{type} =~ /^virt/ - || !defined($machine_conf->{type}) && $arch eq 'aarch64' - ) { + my $machine = $machine_conf->{type} || default_machine_for_arch($arch); + + if ($machine =~ /^virt/) { return; # virt machines are normally ARM64 ones which have no concept of s3/s4 } - my $object = - $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) ? "ICH9-LPC" : "PIIX4_PM"; + my $object = ($machine =~ m/q35/) ? "ICH9-LPC" : "PIIX4_PM"; my $default = 1; if ($version_guard->(9, 2, 1)) {