all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager] [multiarch] pvestatd: don't query supported CPU flags if we are not x86_64
@ 2025-03-30 16:28 Jing Luo via pve-devel
  0 siblings, 0 replies; only message in thread
From: Jing Luo via pve-devel @ 2025-03-30 16:28 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-30 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-30 16:28 [pve-devel] [PATCH pve-manager] [multiarch] pvestatd: don't query supported CPU flags if we are not x86_64 Jing Luo via pve-devel

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