From nobody Sat Apr 27 15:53:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612526898; cv=none; d=zohomail.com; s=zohoarc; b=DBUL+s0tAeDl2NnjVuAN6JBbnRqw6QWvJNw4N7tehMvvKTwnVoiBiIAEqHQCqRhXAI+fDguToixo+dLg1WDCflNVpsYWxmtmRvdbeQzemTL3VRcCoDkToB2Qq1a2Cba/MOxzAOiMoKDwMr/lvkvR2Bt1ktp2uwthOheIEGp1aLE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612526898; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=wkC1ugFEQCCLAJysgQMs79ANv6RDZb9D0n+Y958oLvI=; b=bT7pXTLpmF4WCTo607ZPz17y6CMiu6tSdYcOIMZY0JmUJ2Qatzsfqe06s4YZCAVks0TZM+obJ0y161LDYmnTM3fj1xwHC0wA9vFiLUa0f4JHe1qYxtl5gbAR49hxQ1Mu9Feejo6/MGnFLgjwhM/QGXFnXHirIJmM2K0cSvVJlmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612526898720713.4728499776376; Fri, 5 Feb 2021 04:08:18 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-454-_SkRed1TNOCivgQceyPdew-1; Fri, 05 Feb 2021 07:08:15 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F263801976; Fri, 5 Feb 2021 12:08:10 +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 B42381346F; Fri, 5 Feb 2021 12:08:09 +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 BBF4B57DFA; Fri, 5 Feb 2021 12:08:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 115C7ktH028854 for ; Fri, 5 Feb 2021 07:07:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6731C60937; Fri, 5 Feb 2021 12:07:46 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id D752F60936 for ; Fri, 5 Feb 2021 12:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612526897; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wkC1ugFEQCCLAJysgQMs79ANv6RDZb9D0n+Y958oLvI=; b=UyYs+G0L/WbqTZAYTTQAzc+RxcNsdkE62x3YW52AnT1bObg5HF/Zbpmb7s3Dkg4lb7b7+X jhZo/paUkOPu1OTytpIarJmXRE9ghLRky/8uvmlufqMXRF1cRuxMpdxQL0px3c2fsGDeSm TyW8KPydsnRSIdzXsHH2suUK4KrPbgo= X-MC-Unique: _SkRed1TNOCivgQceyPdew-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: allow virtio driver attributes for vhostuser disk Date: Fri, 5 Feb 2021 13:07:41 +0100 Message-Id: <30bc3ff30bad62bccd603c0a17dae648f131805e.1612526846.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.11 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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" All of these options are actually supported by vhostuser disk so we should allow them to be usable. Signed-off-by: Pavel Hrdina Reviewed-by: Han Han Reviewed-by: Peter Krempa Tested-by: Han Han --- src/conf/domain_validate.c | 20 ------------------- .../disk-vhostuser.x86_64-latest.args | 4 ++-- tests/qemuxml2argvdata/disk-vhostuser.xml | 2 +- .../disk-vhostuser.x86_64-latest.xml | 2 +- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 222a9386f6..6b3e892332 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -322,26 +322,6 @@ virDomainDiskVhostUserValidate(const virDomainDiskDef = *disk) =20 /* Unsupported driver elements */ =20 - if (disk->virtio) { - if (disk->virtio->iommu !=3D VIR_TRISTATE_SWITCH_ABSENT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("iommu is not supported with vhostuser disk")= ); - return -1; - } - - if (disk->virtio->ats !=3D VIR_TRISTATE_SWITCH_ABSENT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("ats is not supported with vhostuser disk")); - return -1; - } - - if (disk->virtio->packed !=3D VIR_TRISTATE_SWITCH_ABSENT) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("packed is not supported with vhostuser disk"= )); - return -1; - } - } - if (disk->src->metadataCacheMaxSize > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("metadata_cache is not supported with vhostuser d= isk")); diff --git a/tests/qemuxml2argvdata/disk-vhostuser.x86_64-latest.args b/tes= ts/qemuxml2argvdata/disk-vhostuser.x86_64-latest.args index b24b2c0b4f..30acd7c78b 100644 --- a/tests/qemuxml2argvdata/disk-vhostuser.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-vhostuser.x86_64-latest.args @@ -33,8 +33,8 @@ file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -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,bus=3Dpci.0,addr=3D0x3,chardev=3Dchr-vu-virtio-= disk1,\ -id=3Dvirtio-disk1 \ +-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 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ diff --git a/tests/qemuxml2argvdata/disk-vhostuser.xml b/tests/qemuxml2argv= data/disk-vhostuser.xml index c96ef9119c..cbe2804e39 100644 --- a/tests/qemuxml2argvdata/disk-vhostuser.xml +++ b/tests/qemuxml2argvdata/disk-vhostuser.xml @@ -20,7 +20,7 @@ - + diff --git a/tests/qemuxml2xmloutdata/disk-vhostuser.x86_64-latest.xml b/te= sts/qemuxml2xmloutdata/disk-vhostuser.x86_64-latest.xml index 9712dc0b12..87f5ec46ac 100644 --- a/tests/qemuxml2xmloutdata/disk-vhostuser.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/disk-vhostuser.x86_64-latest.xml @@ -28,7 +28,7 @@
- + --=20 2.29.2