From nobody Sun Feb 8 17:14:33 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=1663938708; cv=none; d=zohomail.com; s=zohoarc; b=AXzRHNHiOulKXMfrJRMEnRziKmkq9G8WPmwf47WDwWcvKej0CUn6kDi5OMqYCJlElImQcYTidXR5TFcu8zTa4mOYjv6KvllX/dxOqnGDlLJ/BnUWkesRpYar74MWftYzveE0n8GXtfsUAYHYnzglCSaAwT+e70GRZKCZkT553qg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663938708; 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=xcEG70NeqdiFoSkGdFoCA6L2MAeayChdE1vEZsM46DU=; b=aV+cj+TongN98N7w5c0uFycIYfyxmOVgpe4vi0g7paCiIa2XMNPpv/toh99AkE49I18OkSQD1h/5T9NR28mRTTtp+e+BrXhJIrSSZzX3yClhBLnI+BY+CagFgfEL88vjGQolBkJwqDoITx9+dYJLgYr4VfL1yxwX6u80mW5ImY0= 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 1663938708630672.6700903107733; Fri, 23 Sep 2022 06:11:48 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-249-CumVhz03NjeZ4aM0xRVQKQ-1; Fri, 23 Sep 2022 09:11:46 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B3BC5800B30; Fri, 23 Sep 2022 13:11:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42FF4215CDAC; Fri, 23 Sep 2022 13:11:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0550C19465B6; Fri, 23 Sep 2022 13:11:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2864819465A4 for ; Fri, 23 Sep 2022 13:11:42 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1D0371121331; Fri, 23 Sep 2022 13:11:42 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9B99112132E for ; Fri, 23 Sep 2022 13:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663938707; 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=xcEG70NeqdiFoSkGdFoCA6L2MAeayChdE1vEZsM46DU=; b=TyXWcChR5YkFdxMw/8p7qLakFB6kOd0L2Xu3ipjbIVgiZ/Y2KtA/n45fSteWwWu49RaUt8 P6qtucciL3czlcf5Vy7kPeXzMbyGRz2ArTt4/QTDZqi0OyYrfR5QuAI7nXcRHqeAYlVna4 dQIyI3weoJvCofiu9Bi5Dn/t54AXnow= X-MC-Unique: CumVhz03NjeZ4aM0xRVQKQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemu_domain: Ignore all but SCSI hostdevs in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias() Date: Fri, 23 Sep 2022 15:11:40 +0200 Message-Id: <36c8ca20aa8b2280f31453c8b3da44318378214b.1663938700.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663938709826100001 Content-Type: text/plain; charset="utf-8"; x-default="true" When retiring QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI capability the commit removed a bit too much. Previously, all other devices than VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI were ignored in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias(). But the commit in question removed not only the capability check but also this return early statement. Restore it back. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2129239 Fixes: dc8dbb27d40968c9d9bfad2c6181bccc20c0e44e Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander Reviewed-by: Peter Krempa --- src/qemu/qemu_domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d7ef23f493..ee024d17cd 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5596,6 +5596,10 @@ qemuDomainDeviceHostdevDefPostParseRestoreBackendAli= as(virDomainHostdevDef *host if (!(parseFlags & VIR_DOMAIN_DEF_PARSE_STATUS)) return 0; =20 + if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || + hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SC= SI) + return 0; + switch ((virDomainHostdevSCSIProtocolType) scsisrc->protocol) { case VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_NONE: if (!scsisrc->u.host.src) --=20 2.35.1