Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp223394pxk; Wed, 16 Sep 2020 02:45:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqpR7bfC9ptRZKf0QnTOeff9Ip1kqJnyrfeMte1EOCpXZ4EKjV4DaEp8QGGl7ldTEdyYUW X-Received: by 2002:aa7:c0d3:: with SMTP id j19mr27541657edp.40.1600249526471; Wed, 16 Sep 2020 02:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600249526; cv=none; d=google.com; s=arc-20160816; b=kUYcOEU31RB506xFhiratdyhlCJVFDrj9N7qtCZrpuIClAq40C03x5mcOfewgx+Sr+ t5c8SVEMnxJqBS7xV9rmE7iNMfkERPibzcnh72ZTezs9KwT6rvJ2PQwAOY5e0BIDvxEg Ey8HofcsV73GFSY32tWBJDTbJcFGLqTKX2SuEzRQlXPASMUgbwO94x6AyJj1ce2W5qpl oZKlytsVFvNlwY2Y0pG8AyaQC2Hlt4+s7LBRQgjTQxQussXiwXYZ3svI91ck7NJoCumG sUzPBiN+N7VWhi20rAAGXkV4b5bGm2YZ94F913lkR61REudGwZ/Re6smtyhG+RmmfTk8 yegw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=SFaZWPLKSCf3bE5hLnZDxFsTVIgAlxg96TUTz46i64w=; b=G7ZYIfA2VPOmaSIPgD23M3j6HdWaD1qf/PQBvZKrAaNocSkQJN5mx9knPX50yLozfU FrS9XqBUyzCPNVpJckAjo3lgs2j/9e/VXFg/jNT5veGxR373Ex5GuYaQXdDC4rFRJM3I m3R0HZRIxTlNpa4wp++p2n09DC4JYa0DYmF3QzuSkH3G8H056fmn/UPKb1gvdOpmjC8f imUaI+8Em1hWWZEtpaTdEnXmhyXc0M/Vqx2yNwSXJW09oayJs7VisSvf9kkFHxY7pBN9 ecADHpooI0vSFlM2BfyJFIB/xYQ1EmTxGaHwhRDe0UTx1ILYy/sp+xuCRs8F7aUb/6os p7Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GURjBdA1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si11076649ejb.444.2020.09.16.02.45.03; Wed, 16 Sep 2020 02:45:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GURjBdA1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726653AbgIPJoO (ORCPT + 99 others); Wed, 16 Sep 2020 05:44:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34214 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbgIPJoL (ORCPT ); Wed, 16 Sep 2020 05:44:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600249450; 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=SFaZWPLKSCf3bE5hLnZDxFsTVIgAlxg96TUTz46i64w=; b=GURjBdA1XqOF9pxwQHHqvWA48WVnZO1/ZNT7V5Qozv64IehAapQOtGRlYkv227aTJ/K1sG O/DMSuarLpRTAMfW6KsuneHM+01ExM1DxLUeLDnkiReWQ4Nc47Yv5yUSmiNg8bSuET3+FS arnMDO4laLC+WENEFJ9NRDDuD2Li9XI= 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-121-0M9Tfb-_MIGuYoFDQeNTGg-1; Wed, 16 Sep 2020 05:44:07 -0400 X-MC-Unique: 0M9Tfb-_MIGuYoFDQeNTGg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E0CB1007469; Wed, 16 Sep 2020 09:44:05 +0000 (UTC) Received: from gondolin (ovpn-112-252.ams2.redhat.com [10.36.112.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id B77A819D6C; Wed, 16 Sep 2020 09:44:00 +0000 (UTC) Date: Wed, 16 Sep 2020 11:41:59 +0200 From: Cornelia Huck To: Matthew Rosato Cc: alex.williamson@redhat.com, pmorel@linux.ibm.com, schnelle@linux.ibm.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] vfio iommu: Add dma available capability Message-ID: <20200916114159.42e145fd.cohuck@redhat.com> In-Reply-To: <1600196718-23238-2-git-send-email-mjrosato@linux.ibm.com> References: <1600196718-23238-1-git-send-email-mjrosato@linux.ibm.com> <1600196718-23238-2-git-send-email-mjrosato@linux.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Sep 2020 15:05:18 -0400 Matthew Rosato wrote: > Commit 492855939bdb ("vfio/type1: Limit DMA mappings per container") > added the ability to limit the number of memory backed DMA mappings. > However on s390x, when lazy mapping is in use, we use a very large > number of concurrent mappings. Let's provide the current allowable > number of DMA mappings to userspace via the IOMMU info chain so that > userspace can take appropriate mitigation. > > Signed-off-by: Matthew Rosato > --- > drivers/vfio/vfio_iommu_type1.c | 17 +++++++++++++++++ > include/uapi/linux/vfio.h | 15 +++++++++++++++ > 2 files changed, 32 insertions(+) Reviewed-by: Cornelia Huck