From nobody Mon Feb 9 00:56:05 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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=1642096230; cv=none; d=zohomail.com; s=zohoarc; b=Wsd/WXfUhZuu3w03r8GLZBbQxMUPGS+ZqvIfOWJTWy2lUkhDPhekyGGU9TOnWTxYrXn+LKJxfGIs15jfB9zIDjbQ9GSLwNLdwn+8tkXluqTIsCd0sJVpJkuAIkfgJZWhZgqmOKZTUgQA0hMb2SN3Pq0xsiKfaUgJYWLTTQAvNW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642096230; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hD4mpG6pYCaJmr9QGdaKghCr2BGtFekwwwrrgYvzpdE=; b=UfYfAtBy6/UN2yaRWh0cNEsmdp9F+SGUfeTcqZf1iIecHiFn3B4vZygwE3jvAKVICpQ6lFJNRZA1VnHjBVIlszf8MVSIejYfAvUeuSjpNk6g/NEJwRx0up2mNJ7Wj0sQgbWaMi2iC0V4gptxydjPtntvnj10L/5o8RYfB68xPp4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) 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 1642096230584914.9163782154919; Thu, 13 Jan 2022 09:50: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-1-7TOd9PGVOeSiWeN48_cyYQ-1; Thu, 13 Jan 2022 12:50:26 -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 482FD81EE96; Thu, 13 Jan 2022 17:50:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2126E5DBA9; Thu, 13 Jan 2022 17:50:20 +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 DE3111806D03; Thu, 13 Jan 2022 17:50:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20DHluP4004974 for ; Thu, 13 Jan 2022 12:47:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id EB9FD2ED67; Thu, 13 Jan 2022 17:47:56 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E69B2E053 for ; Thu, 13 Jan 2022 17:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642096229; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hD4mpG6pYCaJmr9QGdaKghCr2BGtFekwwwrrgYvzpdE=; b=S3yauECuqwBoQfQpcPpfJLFvdSR9D9oyeSukN+9zdKRGjq1MRV+phCnvZG2o2w9gROADr9 4ZYzFK8TAvgU529AH7ToTvfvSi/LNNkx7vSVfIrnGsjCRikhIBJF5xab1ecOfIvxl+acfY Cmc+We7Z7hDMZojWxVSI9eEFJWLiT1g= X-MC-Unique: 7TOd9PGVOeSiWeN48_cyYQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/7] conf: reject unfiltered sgio on validation Date: Thu, 13 Jan 2022 18:47:37 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642096231084100001 No kernels supported by upstream libvirt have the feature. Signed-off-by: J=C3=A1n Tomko --- src/conf/domain_validate.c | 11 +++++ .../disk-scsi-lun-passthrough-sgio.xml | 35 -------------- tests/qemuxml2argvdata/hostdev-scsi-rawio.xml | 37 --------------- tests/qemuxml2argvdata/hostdev-scsi-sgio.xml | 37 --------------- .../disk-scsi-lun-passthrough-sgio.xml | 46 ------------------ .../qemuxml2xmloutdata/hostdev-scsi-rawio.xml | 47 ------------------- .../qemuxml2xmloutdata/hostdev-scsi-sgio.xml | 47 ------------------- tests/qemuxml2xmltest.c | 11 ----- 8 files changed, 11 insertions(+), 260 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-scsi-lun-passthrough-sgio.x= ml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-rawio.xml delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-sgio.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-scsi-lun-passthrough-sgio= .xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-rawio.xml delete mode 100644 tests/qemuxml2xmloutdata/hostdev-scsi-sgio.xml diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index a4271f1247..e9baf1d41a 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -621,6 +621,12 @@ virDomainDiskDefValidate(const virDomainDef *def, if (virDomainDiskDefValidateSource(disk->src) < 0) return -1; =20 + if (disk->sgio =3D=3D VIR_DOMAIN_DEVICE_SGIO_UNFILTERED) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unfiltered sgio is no longer supported")); + return -1; + } + /* Validate LUN configuration */ if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_LUN) { if (virDomainDiskDefSourceLUNValidate(disk->src) < 0) @@ -1917,6 +1923,11 @@ virDomainHostdevDefValidate(const virDomainHostdevDe= f *hostdev) "address type")); return -1; } + if (hostdev->source.subsys.u.scsi.sgio =3D=3D VIR_DOMAIN_DEVIC= E_SGIO_UNFILTERED) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unfiltered sgio is no longer supported")= ); + return -1; + } break; case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST: if (hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NO= NE && diff --git a/tests/qemuxml2argvdata/disk-scsi-lun-passthrough-sgio.xml b/te= sts/qemuxml2argvdata/disk-scsi-lun-passthrough-sgio.xml deleted file mode 100644 index 3e561642a3..0000000000 --- a/tests/qemuxml2argvdata/disk-scsi-lun-passthrough-sgio.xml +++ /dev/null @@ -1,35 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i386 - - - -
- - - - -
- - - - - - - - - - diff --git a/tests/qemuxml2argvdata/hostdev-scsi-rawio.xml b/tests/qemuxml2= argvdata/hostdev-scsi-rawio.xml deleted file mode 100644 index eb60e550f0..0000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-rawio.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest2 - c7a5fdbd-edaf-9466-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i386 - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/tests/qemuxml2argvdata/hostdev-scsi-sgio.xml b/tests/qemuxml2a= rgvdata/hostdev-scsi-sgio.xml deleted file mode 100644 index bfc5346807..0000000000 --- a/tests/qemuxml2argvdata/hostdev-scsi-sgio.xml +++ /dev/null @@ -1,37 +0,0 @@ - - QEMUGuest2 - c7a5fdbd-edaf-9466-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i386 - - - -
- - - - - - - - - - -
- -
- - - - diff --git a/tests/qemuxml2xmloutdata/disk-scsi-lun-passthrough-sgio.xml b/= tests/qemuxml2xmloutdata/disk-scsi-lun-passthrough-sgio.xml deleted file mode 100644 index 2b62595805..0000000000 --- a/tests/qemuxml2xmloutdata/disk-scsi-lun-passthrough-sgio.xml +++ /dev/null @@ -1,46 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - destroy - restart - destroy - - /usr/bin/qemu-system-i386 - - - - -
- - - - - -
- - -
- - -
- - -
- - - - -