From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server] machine: fix not trying to set S3/S4 ACPI power state for virt machine
Date: Tue, 3 Feb 2026 15:10:50 +0100 [thread overview]
Message-ID: <20260203141202.3567520-1-d.csapak@proxmox.com> (raw)
For aarch64 the default machine is 'virt' already, so we have to consider
this case as well here.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
we could maybe also just skip this entire function if the arch is not
'x86_64'. Can send a v2 with that if that's preferred.
src/PVE/QemuServer.pm | 2 +-
src/PVE/QemuServer/Machine.pm | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index dae72c40..5d2dbe03 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -3730,7 +3730,7 @@ sub config_to_command {
push @$machineFlags, 'accel=tcg';
}
my $power_state_flags =
- PVE::QemuServer::Machine::get_power_state_flags($machine_conf, $version_guard);
+ PVE::QemuServer::Machine::get_power_state_flags($machine_conf, $arch, $version_guard);
push $cmd->@*, $power_state_flags->@* if defined($power_state_flags);
push @$machineFlags, 'smm=off' if should_disable_smm($conf, $vga, $machine_type);
diff --git a/src/PVE/QemuServer/Machine.pm b/src/PVE/QemuServer/Machine.pm
index 93a90c47..c5f0104a 100644
--- a/src/PVE/QemuServer/Machine.pm
+++ b/src/PVE/QemuServer/Machine.pm
@@ -468,9 +468,12 @@ sub check_and_pin_machine_string {
# disable s3/s4 by default for 9.2+pve1 machine types
# returns an arrayref of cmdline options for qemu or undef
sub get_power_state_flags {
- my ($machine_conf, $version_guard) = @_;
+ my ($machine_conf, $arch, $version_guard) = @_;
- if (defined($machine_conf->{type}) && $machine_conf->{type} =~ /^virt/) {
+ if (
+ defined($machine_conf->{type}) && $machine_conf->{type} =~ /^virt/
+ || !defined($machine_conf->{type}) && $arch eq 'aarch64'
+ ) {
return; # virt machines are normally ARM64 ones which have no concept of s3/s4
}
--
2.47.3
reply other threads:[~2026-02-03 14:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260203141202.3567520-1-d.csapak@proxmox.com \
--to=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