From nobody Wed Mar 12 13:21:39 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; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741680838728437.58881727757023; Tue, 11 Mar 2025 01:13:58 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 28C971CD7; Tue, 11 Mar 2025 04:13:58 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A970B1BD4; Tue, 11 Mar 2025 04:13:11 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C546E1B64; Tue, 11 Mar 2025 04:13:08 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E989A1B66 for ; Tue, 11 Mar 2025 04:13:07 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-81-DBgL4nLiOs6ATOTaxG1sxw-1; Tue, 11 Mar 2025 04:13:06 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 781CC1954B3B for ; Tue, 11 Mar 2025 08:13:05 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 83E1C1955BCB for ; Tue, 11 Mar 2025 08:13:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741680787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E3ACmyfJ1/gIIUmxjJ5kgEmdzAHsyh3xPIIF5Ba7fj8=; b=IEy0ZAKouAklO1LH8+Pe7RNhuHq9MT/dYrKNKRjkve4DLOuse6dZ5ivrKZb+lxFllHjaEk RGr9aYEKtgXk9t6uOJ9cd0HpLrbnDYRbACAK8yTEt4dfdTfLo+VXN4W+JG8G0FldwQG02Y kBosy54mpIfikkdWsS4K6/VY5jkWV3E= X-MC-Unique: DBgL4nLiOs6ATOTaxG1sxw-1 X-Mimecast-MFC-AGG-ID: DBgL4nLiOs6ATOTaxG1sxw_1741680785 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 1/3] qemuxmlconftest: Include shared memory 'net-vhostuser' test cases Date: Tue, 11 Mar 2025 09:12:59 +0100 Message-ID: <3bd85e8107721eb7ce44fa33cf7c4811546244e8.1741680723.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: DTIPvx1Ka6x-tO5SorOfuhXpCHMv41_e8R6aoZNigMs_1741680785 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WCB7YJFZJ5LVSXGQ2YUGZK4HU42IDN3M X-Message-ID-Hash: WCB7YJFZJ5LVSXGQ2YUGZK4HU42IDN3M X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741680840491019000 Content-Type: text/plain; charset="utf-8" The vhost-user protocol requires shared memory support to work properly. Our test XMLs didn't have it configured as for interface the check if shared memory is present only produces a warning instead of a proper error. Upcoming patches will be moving the check to become fatal so the test cases need to be fixed first. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tests/qemuxmlconfdata/net-vhostuser-fail.x86_64-latest.xml | 3 +++ tests/qemuxmlconfdata/net-vhostuser-fail.xml | 3 +++ tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.xml | 3 +++ tests/qemuxmlconfdata/net-vhostuser-multiq.xml | 3 +++ tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.xml | 3 +++ tests/qemuxmlconfdata/net-vhostuser.xml | 3 +++ 8 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/qemuxmlconfdata/net-vhostuser-fail.x86_64-latest.xml b/t= ests/qemuxmlconfdata/net-vhostuser-fail.x86_64-latest.xml index 60e591001d..ce1ebf9462 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-fail.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/net-vhostuser-fail.x86_64-latest.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm diff --git a/tests/qemuxmlconfdata/net-vhostuser-fail.xml b/tests/qemuxmlco= nfdata/net-vhostuser-fail.xml index d50589af6f..b6b0b977d5 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-fail.xml +++ b/tests/qemuxmlconfdata/net-vhostuser-fail.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm diff --git a/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.args = b/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.args index 922758a034..4ea3d4eebd 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.args +++ b/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.args @@ -14,7 +14,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -accel tcg \ -cpu qemu64 \ -m size=3D219136k \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/= lib/libvirt/qemu/ram/-1-QEMUGuest1/pc.ram","share":true,"x-use-canonical-pa= th-for-ramblock-id":false,"size":224395264}' \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.xml b= /tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.xml index 5c2cf70a4b..93524c2864 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/net-vhostuser-multiq.x86_64-latest.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm diff --git a/tests/qemuxmlconfdata/net-vhostuser-multiq.xml b/tests/qemuxml= confdata/net-vhostuser-multiq.xml index ed492ea41a..fa324c9d17 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-multiq.xml +++ b/tests/qemuxmlconfdata/net-vhostuser-multiq.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm diff --git a/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.args b/tests= /qemuxmlconfdata/net-vhostuser.x86_64-latest.args index bc1de8c8ed..f5925c77fe 100644 --- a/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.args +++ b/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.args @@ -14,7 +14,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -accel tcg \ -cpu qemu64 \ -m size=3D219136k \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/= lib/libvirt/qemu/ram/-1-QEMUGuest1/pc.ram","share":true,"x-use-canonical-pa= th-for-ramblock-id":false,"size":224395264}' \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ diff --git a/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.xml b/tests/= qemuxmlconfdata/net-vhostuser.x86_64-latest.xml index c77d46147e..44bebef2c8 100644 --- a/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/net-vhostuser.x86_64-latest.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm diff --git a/tests/qemuxmlconfdata/net-vhostuser.xml b/tests/qemuxmlconfdat= a/net-vhostuser.xml index e55a30a54f..91d1abc027 100644 --- a/tests/qemuxmlconfdata/net-vhostuser.xml +++ b/tests/qemuxmlconfdata/net-vhostuser.xml @@ -3,6 +3,9 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 219136 + + + 1 hvm --=20 2.48.1 From nobody Wed Mar 12 13:21:39 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; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741680884124949.8477375463373; Tue, 11 Mar 2025 01:14:44 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2A8B31B76; Tue, 11 Mar 2025 04:14:43 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E30C11B64; Tue, 11 Mar 2025 04:13:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BF54D1BCC; Tue, 11 Mar 2025 04:13:16 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 49BB41B89 for ; Tue, 11 Mar 2025 04:13:11 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-BAC4fGhNOhG9NyebLqMNAA-1; Tue, 11 Mar 2025 04:13:07 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D5AD019560B7 for ; Tue, 11 Mar 2025 08:13:06 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0236B1944EAA for ; Tue, 11 Mar 2025 08:13:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741680791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GiWpQ40WBxj/eCDTpFa75klBv+NX5CI+X4dNZDfURVI=; b=CMdMeop6SDBg/E/CWkOMWysFhuFWq/cvG9fWVfQ5+QEFbbMwRpFcBpDY4E8JcUEsKT2MVW LRo7G0MCORjUDH9lFurlOXMRVs+LEzsD5amWgEHIDhrwbTGPtgyKfd7j+HFusQSKwJAV6I iwsCDgFMjB3Vqw4b/jFl2YRZc69DZ6s= X-MC-Unique: BAC4fGhNOhG9NyebLqMNAA-1 X-Mimecast-MFC-AGG-ID: BAC4fGhNOhG9NyebLqMNAA_1741680787 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 2/3] qemuValidateDomainDeviceDefNetwork: Require shared memory for all vhost-user interfaces Date: Tue, 11 Mar 2025 09:13:00 +0100 Message-ID: <77607ccea1e77ad453fd3f4cd591f961237a7365.1741680723.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: KYWKaWJkzpmsWgDujpNEn6OeXLO0TIlLoN44zlCWatk_1741680787 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6GDJYXBEBZ7ZOHVGYOM6G5Z2ZULCQKCA X-Message-ID-Hash: 6GDJYXBEBZ7ZOHVGYOM6G5Z2ZULCQKCA X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741680886537019100 Content-Type: text/plain; charset="utf-8" Currently we produce only a warning into the log if a non-passt vhost-user interface is configured with shared memory. Since we do make it fatal with all other vhost-user types, fix the check to trigger also for normal-vhost-user interfaces. Since passt-based vhost-user interfaces are checked separately the check will no longer be required. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_validate.c | 9 +++------ .../net-vhostuser-passt-no-shmem.x86_64-latest.err | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 4ab7af36f3..4282d8c11d 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1843,12 +1843,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, return -1; } - if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_VHOSTUSER && - net->backend.type =3D=3D VIR_DOMAIN_NET_BACKEND_PASST) { - if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interf= ace type=3D\"vhostuser\" backend type=3D\"passt\"") < 0) - return -1; - } - if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_VDPA) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_VHOST_VDPA)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -1872,6 +1866,9 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNet= Def *net, _("'reconnect' attribute is not supported when = source mode=3D'server' for ")); return -1; } + + if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interf= ace") < 0) + return -1; } if (!virDomainNetIsVirtioModel(net)) { diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-late= st.err b/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.e= rr index 274af5c722..babde17518 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err +++ b/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: 'interface type=3D"vhostuser" backend type=3D"p= asst"' requires shared memory +unsupported configuration: 'interface' requires shared memory --=20 2.48.1 From nobody Wed Mar 12 13:21:40 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; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741680866455955.5091798533255; Tue, 11 Mar 2025 01:14:26 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 64E551C14; Tue, 11 Mar 2025 04:14:25 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id ED3741CB8; Tue, 11 Mar 2025 04:13:15 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7279C1B65; Tue, 11 Mar 2025 04:13:11 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DED971B65 for ; Tue, 11 Mar 2025 04:13:10 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341---9sIu9fPmym50V9jDgyyg-1; Tue, 11 Mar 2025 04:13:08 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2E4B71828AB1 for ; Tue, 11 Mar 2025 08:13:08 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 59F571955BCB for ; Tue, 11 Mar 2025 08:13:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741680790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=buR0wCB9PSe5ffVjuZ/L7Iz0pDPksvARAUCLkBthR8g=; b=THq03QmtbOiyNgorG+W24r8N6EIg+SKgts/3sPbJNIoe0BsTEHbxwDCP7AXxpH2VY8TrjO CWo6ca6BzCWPJ/m7++EUF82vJyEm4RAwcvQko7ajUHE3gt86EWMfKS2jIciX0ysuWw5vW1 wVXF0l8v9FyqR1O1XZumEKSvXFgYwL0= X-MC-Unique: --9sIu9fPmym50V9jDgyyg-1 X-Mimecast-MFC-AGG-ID: --9sIu9fPmym50V9jDgyyg_1741680788 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 3/3] qemu: process: Remove un-updated 'qemuProcessStartWarnShmem' Date: Tue, 11 Mar 2025 09:13:01 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7DmRefqOs_9BgLcTGStB1HPP7S7yM307HIUuxEqAYnY_1741680788 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JV6VJ3ZGEZOCDZABKKWAKFYYOTTYYLOE X-Message-ID-Hash: JV6VJ3ZGEZOCDZABKKWAKFYYOTTYYLOE X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741680870398019100 Content-Type: text/plain; charset="utf-8" The checks in qemuProcessStartWarnShmem are no longer current. Since previous patch made it fatal for vhost-user interfaces to be configured without shared memory this warning code can be deleted. Resolves: https://issues.redhat.com/browse/RHEL-80533 Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_process.c | 54 ----------------------------------------- 1 file changed, 54 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7b7b5c17e3..0173fbe3be 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5409,56 +5409,6 @@ qemuProcessMakeDir(virQEMUDriver *driver, } -static void -qemuProcessStartWarnShmem(virDomainObj *vm) -{ - size_t i; - bool check_shmem =3D false; - bool shmem =3D vm->def->nshmems; - - /* - * For vhost-user to work, the domain has to have some type of - * shared memory configured. We're not the proper ones to judge - * whether shared hugepages or shm are enough and will be in the - * future, so we'll just warn in case neither is configured. - * Moreover failing would give the false illusion that libvirt is - * really checking that everything works before running the domain - * and not only we are unable to do that, but it's also not our - * aim to do so. - */ - for (i =3D 0; i < vm->def->nnets; i++) { - if (virDomainNetGetActualType(vm->def->nets[i]) =3D=3D - VIR_DOMAIN_NET_TYPE_VHOSTUSER) { - check_shmem =3D true; - break; - } - } - - if (!check_shmem) - return; - - /* - * This check is by no means complete. We merely check - * whether there are *some* hugepages enabled and *some* NUMA - * nodes with shared memory access. - */ - if (!shmem && vm->def->mem.nhugepages) { - for (i =3D 0; i < virDomainNumaGetNodeCount(vm->def->numa); i++) { - if (virDomainNumaGetNodeMemoryAccessMode(vm->def->numa, i) =3D= =3D - VIR_DOMAIN_MEMORY_ACCESS_SHARED) { - shmem =3D true; - break; - } - } - } - - if (!shmem) { - VIR_WARN("Detected vhost-user interface without any shared memory,= " - "the interface might not be operational"); - } -} - - static int qemuProcessStartValidateGraphics(virDomainObj *vm) { @@ -5693,10 +5643,6 @@ qemuProcessStartValidate(virQEMUDriver *driver, if (qemuProcessStartValidateTSC(driver, vm) < 0) return -1; - VIR_DEBUG("Checking for any possible (non-fatal) issues"); - - qemuProcessStartWarnShmem(vm); - return 0; } --=20 2.48.1