From nobody Tue Oct 28 17:53:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1760978401637706.396212947015; Mon, 20 Oct 2025 09:40:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A907041BAA; Mon, 20 Oct 2025 12:40:00 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 2A70C41BA5; Mon, 20 Oct 2025 12:38:41 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 37DD341B42; Mon, 20 Oct 2025 12:38:28 -0400 (EDT) Received: from mail.porno-bullen.de (mail.porno-bullen.de [49.13.137.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CC18041B23 for ; Mon, 20 Oct 2025 12:38:26 -0400 (EDT) Received: from Anteaus.speedport.ip (p20030006514896e85510e90B3839C2d8.dip0.t-ipconnect.de [IPv6:2003:6:5148:96e8:5510:e90b:3839:c2d8]) by mail.porno-bullen.de (Postfix) with ESMTPSA id BA8615E831; Mon, 20 Oct 2025 18:36:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 From: Friedrich Oslage To: devel@lists.libvirt.org Subject: [PATCH 1/2] qemu: Fix hyperv spinlock retries count type mismatch Date: Mon, 20 Oct 2025 18:34:29 +0200 Message-ID: <20251020163627.746587-2-friedrich@oslage.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251020163627.746587-1-friedrich@oslage.de> References: <20251020163627.746587-1-friedrich@oslage.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KVZMF77EZUO5BUN4A274AYPGT4INB3K7 X-Message-ID-Hash: KVZMF77EZUO5BUN4A274AYPGT4INB3K7 X-MailFrom: friedrich@oslage.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Friedrich Oslage X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-ZM-MESSAGEID: 1760978403766158500 Content-Type: text/plain; charset="utf-8" From: Friedrich Oslage Use unsigned int for sprintf and update tests to ensure it can hold INT_MAX= +1. Signed-off-by: Friedrich Oslage --- src/conf/domain_conf.c | 2 +- tests/qemuxmlconfdata/hyperv.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/hyperv.x86_64-latest.xml | 2 +- tests/qemuxmlconfdata/hyperv.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4737594487..7c951fdc32 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28633,7 +28633,7 @@ virDomainFeaturesHyperVDefFormat(virBuffer *buf, case VIR_DOMAIN_HYPERV_SPINLOCKS: if (def->hyperv.features[j] =3D=3D VIR_TRISTATE_SWITCH_ON) { virBufferAsprintf(&hypervAttrBuf, - " retries=3D'%d'", def->hyperv.spinlocks= ); + " retries=3D'%u'", def->hyperv.spinlocks= ); } break; =20 diff --git a/tests/qemuxmlconfdata/hyperv.x86_64-latest.args b/tests/qemuxm= lconfdata/hyperv.x86_64-latest.args index 30d63bae6b..ea4b77de74 100644 --- a/tests/qemuxmlconfdata/hyperv.x86_64-latest.args +++ b/tests/qemuxmlconfdata/hyperv.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Don \ -accel tcg \ --cpu 'qemu64,hv-time=3Don,hv-relaxed=3Don,hv-vapic=3Don,hv-spinlocks=3D0x2= fff,hv-vpindex=3Don,hv-runtime=3Don,hv-synic=3Don,hv-stimer=3Don,hv-reset= =3Don,hv-vendor-id=3DKVM Hv,hv-frequencies=3Don,hv-reenlightenment=3Don,hv-= tlbflush=3Don,hv-tlbflush-direct=3Don,hv-tlbflush-ext=3Don,hv-ipi=3Don,hv-e= vmcs=3Don,hv-avic=3Don,hv-emsr-bitmap=3Don,hv-xmm-input=3Don' \ +-cpu 'qemu64,hv-time=3Don,hv-relaxed=3Don,hv-vapic=3Don,hv-spinlocks=3D0x8= 0000000,hv-vpindex=3Don,hv-runtime=3Don,hv-synic=3Don,hv-stimer=3Don,hv-res= et=3Don,hv-vendor-id=3DKVM Hv,hv-frequencies=3Don,hv-reenlightenment=3Don,h= v-tlbflush=3Don,hv-tlbflush-direct=3Don,hv-tlbflush-ext=3Don,hv-ipi=3Don,hv= -evmcs=3Don,hv-avic=3Don,hv-emsr-bitmap=3Don,hv-xmm-input=3Don' \ -m size=3D219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml b/tests/qemuxml= confdata/hyperv.x86_64-latest.xml index ee412164ed..fdcab661a6 100644 --- a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml @@ -13,7 +13,7 @@ - + diff --git a/tests/qemuxmlconfdata/hyperv.xml b/tests/qemuxmlconfdata/hyper= v.xml index 44aec004a8..9a47dd0ec8 100644 --- a/tests/qemuxmlconfdata/hyperv.xml +++ b/tests/qemuxmlconfdata/hyperv.xml @@ -13,7 +13,7 @@ - + --=20 2.51.0