From nobody Sat Feb 7 08:45:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642824690351696.6961882871851; Fri, 21 Jan 2022 20:11:30 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-49-1kJLswb8Pk2AHuGM0dQbAg-1; Fri, 21 Jan 2022 23:11:25 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DA131083F61; Sat, 22 Jan 2022 04:11:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79E024DC02; Sat, 22 Jan 2022 04:11:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 536224BB7C; Sat, 22 Jan 2022 04:11:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20M4BClU013966 for ; Fri, 21 Jan 2022 23:11:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 79363C0808A; Sat, 22 Jan 2022 04:11:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74E92C08F3B for ; Sat, 22 Jan 2022 04:11:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 592D8837185 for ; Sat, 22 Jan 2022 04:11:12 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-605-VDwFEH2qN72N_TU8fEhcwg-1; Fri, 21 Jan 2022 23:11:10 -0500 Received: by mail-pf1-f177.google.com with SMTP id h5so2233863pfv.13 for ; Fri, 21 Jan 2022 20:11:02 -0800 (PST) Received: from localhost.localdomain ([113.128.84.192]) by smtp.gmail.com with ESMTPSA id f12sm3846582pfe.204.2022.01.21.20.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 20:11:00 -0800 (PST) X-MC-Unique: 1kJLswb8Pk2AHuGM0dQbAg-1 X-MC-Unique: VDwFEH2qN72N_TU8fEhcwg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o+izReIDoXIq2sr7sHYKuegGLFrvypxHypYkQWyP0pI=; b=k3DRoOkPwjol327IP/mkEdsDVQnNxq/KnATAepLTHgEIuO3uju6cNVPEMhac7/TeCk lcvV+EloDRiF92LOo8+nMSphgVU7dbQxFF8K+27tvv4hLWrjNAaMMnk0t4n43K7Gx/eW vXrNmi6MTz4CyQuKav0weC8HNxBG/C760bFmREzNqRJirQT0tDwnmcrc62iR7F5mVM7U x3X4jWhlc/FkFsuuBk5Ruhs9Y7ZyNXUWE6pBaAoIVl/P3vPAaG0uaQLejYo+0gdY6ys2 ORIwkgs6AnnaGoJ3VP98K8KO2UBtP5QicwUMaqnj1CE1sH1u8m2r0TU8taWb1f3sSGXp 4NkQ== X-Gm-Message-State: AOAM531wrlfJgqCV5N8CvSWIN3r/Dt/REbbIPz42FKIYTY8T/07iWndG 6wUSgh4TC/EqVKd5VZNUAwVnja2NQKDUAnzl X-Google-Smtp-Source: ABdhPJyVgsEE8jSxhIZcT9Jd39dBnSZTMULtX/OoRIdM51i/KnLbs0LfHcxX3B47V2yfHHwPiZHcYw== X-Received: by 2002:a62:2f06:0:b0:4c7:43cc:2d51 with SMTP id v6-20020a622f06000000b004c743cc2d51mr6016500pfv.53.1642824661221; Fri, 21 Jan 2022 20:11:01 -0800 (PST) From: yshxxsjt715@gmail.com To: libvir-list@redhat.com Subject: [PATCH 2/2] Remove scsi parameter for vhost-user-blk for qemu 4.2 Date: Sat, 22 Jan 2022 12:10:35 +0800 Message-Id: <20220122041035.3550657-3-yshxxsjt715@gmail.com> In-Reply-To: <20220122041035.3550657-1-yshxxsjt715@gmail.com> References: <20220122041035.3550657-1-yshxxsjt715@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-loop: libvir-list@redhat.com Cc: shenjiatong X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1642824691659100001 Content-Type: text/plain; charset="utf-8" From: shenjiatong When trying to attach vhost-user-blk device to virtual machine using libvirt 7.8 and qemu 4.2. Libvirt mistakenly add a scsi=3Doff parameter which is not supported by Qemu Signed-off-by: shenjiatong --- src/qemu/qemu_command.c | 6 +++++- .../qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 662d15e28e..cdf89fc74c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2253,11 +2253,15 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, "S:iothread", iothread, "T:ioeventfd", disk->ioeventfd, "T:event_idx", disk->event_idx, - "T:scsi", scsi, "p:num-queues", disk->queues, "p:queue-size", disk->queue_size, NULL) < 0) return NULL; + + if (virStorageSourceGetActualType(disk->src) !=3D VIR_STORAGE_TYPE= _VHOST_USER) { + if (virJSONValueObjectAdd(&props, "T:scsi", scsi, NULL) < 0) + return NULL; + } } break; =20 diff --git a/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args b= /tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args index 6c5d6de46b..4480266e75 100644 --- a/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/disk-vhostuser-numa.x86_64-4.2.0.args @@ -30,9 +30,9 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -boot strict=3Don \ -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -chardev socket,id=3Dchr-vu-virtio-disk0,path=3D/tmp/vhost1.sock \ --device vhost-user-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x2,chardev=3Dchr= -vu-virtio-disk0,id=3Dvirtio-disk0,bootindex=3D1 \ +-device vhost-user-blk-pci,bus=3Dpci.0,addr=3D0x2,chardev=3Dchr-vu-virtio-= disk0,id=3Dvirtio-disk0,bootindex=3D1 \ -chardev socket,id=3Dchr-vu-virtio-disk1,path=3D/tmp/vhost1.sock,reconnect= =3D10 \ --device vhost-user-blk-pci,iommu_platform=3Don,ats=3Don,packed=3Don,scsi= =3Doff,bus=3Dpci.0,addr=3D0x3,chardev=3Dchr-vu-virtio-disk1,id=3Dvirtio-dis= k1 \ +-device vhost-user-blk-pci,iommu_platform=3Don,ats=3Don,packed=3Don,bus=3D= pci.0,addr=3D0x3,chardev=3Dchr-vu-virtio-disk1,id=3Dvirtio-disk1 \ -audiodev '{"id":"audio1","driver":"none"}' \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ --=20 2.25.1