From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3D01C43331 for ; Wed, 1 Apr 2020 22:40:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F8D72077D for ; Wed, 1 Apr 2020 22:40:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AnjH6Guw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ids4QEDa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F8D72077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q0pNvTJtZnXw75jRgKDKtt1d80rW0garrWgJfx5Ryvc=; b=AnjH6GuwN2BObD a7dqsf6VH8RuFmuIBlkrGongao99BY3o7qbuVIOVMy5F29wfwhIwcRRw18Wll8VsnBlDlXRt3ck2M h20n2jnS5Iv9H+hvFAVhACAFFJ3FTJ/odr+P4ysjBfUUznKBo97SEyIBt+0jJz88JB6ANzfFpILYC cs0xLhA5lvJojvD6P3nCX2ku+kzIcAiy9XZntP3B2gArEKBra5NQvxJlFQKTLiy2SxrwQUBUCevvB DjgydJr2yJA6wBYOYM1HhTYLu68X1indDjqEHRGNOKQV0BZ9ZvWsDhdE0yweV47uWEqdRNgHBAvYa DRR4u6BLtp6rgOC3SbTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jJm1m-0003TV-Kq; Wed, 01 Apr 2020 22:40:06 +0000 Received: from us-smtp-1.mimecast.com ([205.139.110.61] helo=us-smtp-delivery-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jJm1i-0002d7-Ji for linux-arm-kernel@lists.infradead.org; Wed, 01 Apr 2020 22:40:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585780799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+QivSXL5xhLG7M9lhqztlvCh/YTXTzVLqfa0HHMNH8=; b=ids4QEDaAGpfUaMUzyz0WUmWZiPbIb3JzMxH/JRsCO9OAb3KyPGjRlMvX1wELi8mG6dlIS AKImGokl0hHmtx+EOf1vjU1VZJAgeT276WsQfaKade2XzrFZeeGE7TiPVEPdtXY0SZnKaE xIY2c2S4zQUfqoCTH2NgMG91b3CBqKk= 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-94-qsuGeAdaM0m_TotbpNGXTg-1; Wed, 01 Apr 2020 18:39:56 -0400 X-MC-Unique: qsuGeAdaM0m_TotbpNGXTg-1 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 0915A800D4E; Wed, 1 Apr 2020 22:39:55 +0000 (UTC) Received: from w520.home (ovpn-112-162.phx2.redhat.com [10.3.112.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 749B389F0A; Wed, 1 Apr 2020 22:39:51 +0000 (UTC) Date: Wed, 1 Apr 2020 16:39:50 -0600 From: Alex Williamson To: Andre Przywara Subject: Re: [PATCH] vfio: Ignore -ENODEV when getting MSI cookie Message-ID: <20200401163950.61741738@w520.home> In-Reply-To: <20200401102724.161712-1-andre.przywara@arm.com> References: <20200401102724.161712-1-andre.przywara@arm.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200401_154002_750374_505BD6A0 X-CRM114-Status: GOOD ( 19.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Robin Murphy , Cornelia Huck , linux-kernel@vger.kernel.org, Eric Auger , iommu@lists.linux-foundation.org, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 1 Apr 2020 11:27:24 +0100 Andre Przywara wrote: > When we try to get an MSI cookie for a VFIO device, that can fail if > CONFIG_IOMMU_DMA is not set. In this case iommu_get_msi_cookie() returns > -ENODEV, and that should not be fatal. > > Ignore that case and proceed with the initialisation. > > This fixes VFIO with a platform device on the Calxeda Midway (no MSIs). > > Fixes: f6810c15cf973f ("iommu/arm-smmu: Clean up early-probing workarounds") > Signed-off-by: Andre Przywara > Acked-by: Robin Murphy > Reviewed-by: Eric Auger > --- > drivers/vfio/vfio_iommu_type1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c > index 9fdfae1cb17a..85b32c325282 100644 > --- a/drivers/vfio/vfio_iommu_type1.c > +++ b/drivers/vfio/vfio_iommu_type1.c > @@ -1787,7 +1787,7 @@ static int vfio_iommu_type1_attach_group(void *iommu_data, > > if (resv_msi) { > ret = iommu_get_msi_cookie(domain->domain, resv_msi_base); > - if (ret) > + if (ret && ret != -ENODEV) > goto out_detach; > } > Applied to vfio next branch for v5.7. Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel