all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Jing Luo via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [pve-devel] [PATCH pve-manager] [multiarch] pvestatd: don't query supported CPU flags if we are not x86_64
Date: Mon, 31 Mar 2025 01:28:49 +0900	[thread overview]
Message-ID: <mailman.336.1743352361.359.pve-devel@lists.proxmox.com> (raw)

[-- Attachment #1: Type: message/rfc822, Size: 7082 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-manager] [multiarch] pvestatd: don't query supported CPU flags if we are not x86_64
Date: Mon, 31 Mar 2025 01:28:49 +0900
Message-ID: <20250330163006.3949380-1-jing@jing.rocks>

Only qemu-system-x86_64 will output a list of cpuflags, so let's only
do it on x86_64. For now, we don't consider the case of non-x86, and
it silences warnings on non-x86:

(e.g. on aarch64, riscv64)
Mar 31 00:20:24 debian1 pvestatd[58071]: warning: failed querying supported tcg flags: QEMU flag querying VM exited with code -1 at /usr/share/perl5/PVE/QemuServer.pm line 3312.
Mar 31 00:20:24 debian1 pvestatd[58071]: CPU flag detection failed, will try again after delay

(e.g. on powerpc64, powerpc64le)
Mar 31 00:24:25 debian2 pvestatd[58071]: VM -1 qmp command failed - VM -1 qmp command 'query-cpu-model-expansion' failed - The command query-cpu-model-expansion has not been found
Mar 31 00:24:25 debian2 pvestatd[58071]: warning: failed querying supported tcg flags: VM -1 qmp command 'query-cpu-model-expansion' failed - The command query-cpu-model-expansion has not been found
Mar 31 00:24:25 debian2 pvestatd[58071]: CPU flag detection failed, will try again after delay

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 PVE/Service/pvestatd.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 4911d4ac..f5580aec 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -9,7 +9,7 @@ use PVE::Daemon;
 use JSON;
 
 use Time::HiRes qw (gettimeofday);
-use PVE::Tools qw(dir_glob_foreach file_read_firstline);
+use PVE::Tools qw(dir_glob_foreach file_read_firstline get_host_arch);
 use PVE::ProcFSTools;
 use PVE::CpuSet;
 use Filesys::Df;
@@ -156,7 +156,9 @@ sub update_node_status {
     my $cpuinfo = PVE::ProcFSTools::read_cpuinfo();
     my $maxcpu = $cpuinfo->{cpus};
 
-    update_supported_cpuflags();
+    # only qemu-system-x86_64 can output cpuflags with "-cpu help"
+    my $arch = PVE::Tools::get_host_arch();
+    update_supported_cpuflags() if $arch eq "x86_64";
 
     my $netdev = PVE::ProcFSTools::read_proc_net_dev();
     # traffic from/to physical interface cards
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

                 reply	other threads:[~2025-03-30 16:32 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=mailman.336.1743352361.359.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=jing@jing.rocks \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal