From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 000211FF0E9 for ; Thu, 30 Jul 2026 03:50:06 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 5F2722132B; Thu, 30 Jul 2026 03:50:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785376194; x=1785980994; darn=lists.proxmox.com; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HE2+cIpH86EmVPOWtQlIcV7IUfJMFobFL0Pw3WirL9M=; b=hj2BxqAGBL8720wYN8AtS8f7E61kGC6611OyNf02/9ENwIk04SACbPl1vS3gcUWt7m u1LzYTKoUqozhq9KEFror9VO7wrsZxpSUy+KEUrVAoHKVGzV3ZaxpRGz/1zB84CrmutV yhnE42wRr+vLI8Zq+UpyGxV1LiHq6qqninJ8uxsKZPU6ihaHFj7phQuq6U7F7F3SRiws sW4kT8B8Rkdd6SthAbBc+omPnOe6uhdclKy9DwwJKJCUISoClbjSnc2XkclL8u+5Un8Y AxJkFENyurWt93atvVKwnnqKKccKC5GzxVIXJMD9fcaw+c6V6jx3+rIQOz2GEMFlXXqN iDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785376194; x=1785980994; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HE2+cIpH86EmVPOWtQlIcV7IUfJMFobFL0Pw3WirL9M=; b=NCp0dbJA9jo6RYKTpmRRp+iHfiVCh4kxOlf26cuLXb3IjHDSYUr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 -0700 (PDT) Message-ID: <8858dcfa-98b0-4863-a9f5-3736c878874f@gmail.com> Date: Thu, 30 Jul 2026 09:49:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: superseded: [PATCH qemu-server v2] query-machine-capabilities: limit AuthenticAMD and GenuineIntel checks to x86-64 To: Fiona Ebner References: <20260729111024.58285-2-wukaiyang@loongfans.cn> <3d50f82f-be99-49da-9ac2-41cc7a8cbf9e@proxmox.com> Content-Language: en-US From: Kaiyang Wu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_ENVFROM_END_DIGIT 1 Envelope-from freemail username ends in digit FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust 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: 4NA6QEKWMRSKK3SOXG3MOJEEIPEUHWBL X-Message-ID-Hash: 4NA6QEKWMRSKK3SOXG3MOJEEIPEUHWBL X-MailFrom: wukaiyang2003@gmail.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 CC: pve-devel@lists.proxmox.com, Kaiyang Wu X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Superseded by https://lore.proxmox.com/pve-devel/20260730014713.64822-2-wukaiyang@loongfans.cn/ On 2026-07-30 00:05, Kaiyang Wu wrote: > On 7/29/26 23:33, Fiona Ebner wrote: >> Am 29.07.26 um 1:11 PM schrieb Kaiyang Wu: >>> Intel TDX and AMD SEV are both x86-64-only extensions [0] [1]. The current >>> method of checking results in compilation errors on "unknown" vendors, >>> where the current placeholder string length ("Unknown") mismatches the >>> lengths of both "AuthenticAMD" and "GenuineIntel": >>> >>> error: ‘strncmp’ of strings of length 7 and 12 and bound of 12 >>> evaluates to nonzero [-Werror=string-compare] >>> >>> Limit the machine capability checks for Intel TDX and AMD SEV to x86-64 to >>> fix build. >>> >>> [0]: https://docs.kernel.org/arch/x86/tdx.html >>> [1]: https://docs.kernel.org/virt/kvm/x86/amd-memory-encryption.html >>> >>> Signed-off-by: Kaiyang Wu >>> --- >>> >>> v1: https://lore.proxmox.com/pve-devel/20260603055031.106241-1-wukaiyang@loongfans.cn/ >>> >>> Changes v1 -> v2: >>> - Use conditional compilation to limit Intel TDX and AMD SEV checks to x86-64 >>> - Eliminate the vendor string length check >>> >>> src/query-machine-capabilities/query-machine-capabilities.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/src/query-machine-capabilities/query-machine-capabilities.c b/src/query-machine-capabilities/query-machine-capabilities.c >>> index abb47acd..3ccd30da 100644 >>> --- a/src/query-machine-capabilities/query-machine-capabilities.c >>> +++ b/src/query-machine-capabilities/query-machine-capabilities.c >>> @@ -204,6 +204,7 @@ int main() { >>> eprintf("Error writing to file '" OUTPUT_PATH "': %s\n", strerror(errno)); >>> } >>> >>> +#ifdef __x86_64__ >>> if (strncmp(vendor, "AuthenticAMD", 12) == 0) { >>> cpu_caps_amd_sev_t caps_sev; >>> query_cpu_capabilities_sev(&caps_sev); >>> @@ -233,7 +234,7 @@ int main() { >>> ); >>> } >>> } >>> -#ifdef __aarch64__ >>> +#elif defined(__aarch64__) >>> else { >> >> I guess this won't compile on aarch64 now, as there will be an else >> without an if? > > I will fix this in v3. Thank you for pointing it out. > >> >>> cpu_caps_arm_t caps_arm; >>> query_cpu_capabilities_arm(&caps_arm); >> >> >> Also, did you already submit a signed CLA to office@proxmox.com? See: >> https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright >> > > Yes, I have already submitted a signed CLA for my entity (sent from > this email address on May 28, 2026).