public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, Dominik Csapak <d.csapak@proxmox.com>
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	[thread overview]
Message-ID: <177064395383.107692.307285237184899802.b4-ty@proxmox.com> (raw)
In-Reply-To: <20260203141202.3567520-1-d.csapak@proxmox.com>

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 <f.ebner@proxmox.com>
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 <f.ebner@proxmox.com>
---
 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)) {





      reply	other threads:[~2026-02-09 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 14:10 Dominik Csapak
2026-02-09 13:34 ` Fiona Ebner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=177064395383.107692.307285237184899802.b4-ty@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal