From nobody Fri Nov 14 03:48:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=marvell.com ARC-Seal: i=1; a=rsa-sha256; t=1584526477; cv=none; d=zohomail.com; s=zohoarc; b=my6bWJyCM8a5VNBVJh80kD/NwlWKKMwxyPji8Z+2wQuC7TjDXuw9/hXk7+IEYroq9wxH9SW2u6UWwQmnj8T+xJEWbmfAz7DOqLehHuSDuUWFp8vTzviRh1Woo5d4z8smSLVG9/KYbKeplVct77XnxrAg63SK/BpA29RHucgEqRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584526477; h=Content-Type:Cc: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=FbEgKzpeFw4OscqegPpPMFTJgFQvhUCCZhKzMe/ZA1w=; b=eOikmU4NUQcDkePFFI1hbZOl+NM2BSK1tGaj91A6l+RdciSmqrhtMkjE0QSsjf9uRlZMja6Zd6fJ210Lihx2vWBGUpnMPi6+txfaFGzLGLa483ONq0eH3FGbGfNhbRnsuzeScmb7gjKD3NkP9WGPOPuIa+7iyah8xbeJFKfxFg8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584526477057427.70079075296655; Wed, 18 Mar 2020 03:14:37 -0700 (PDT) Received: from localhost ([::1]:48022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEVic-0005ei-AO for importer@patchew.org; Wed, 18 Mar 2020 06:14:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37156) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEVgb-00021J-2C for qemu-devel@nongnu.org; Wed, 18 Mar 2020 06:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEVga-0004au-5Q for qemu-devel@nongnu.org; Wed, 18 Mar 2020 06:12:28 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:43926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jEVga-0004aY-0T; Wed, 18 Mar 2020 06:12:28 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02IABKBe030363; Wed, 18 Mar 2020 03:12:26 -0700 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2yu9rp9tur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 18 Mar 2020 03:12:26 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 18 Mar 2020 03:12:23 -0700 Received: from bbhushan2.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 18 Mar 2020 03:12:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=FbEgKzpeFw4OscqegPpPMFTJgFQvhUCCZhKzMe/ZA1w=; b=S8kUj1rP7r46a3n7d0DFqDR3T/eB5PHPtcaCVxCb7JY2nZ3REtiUDpVkDtMXLfDwsxc8 aqv3VRKXOo+GDxJ3pxGRB6ZVJcoIqD9ObBdyRUC6zRIDxHEmYUL5UWH5zBgH+cuvnlgK g1ctP7Rse+QpdCGIaPEM6E3YtYxjOCwXKQXehETDCycMkQN+ujH8k/12H+FRSQXm46bg VMxw/cIh9J+zI9+dJBxRQFavmITCTM7uqkb6c9qhUMxK2uO+GRHcfNnU1aI4J5qq9KIo TeIp15UvkUNPA/sOAtLh7/G10h2qTte/y3GUxA1l2fcLPONxLqDNzO1Pj3WXT4U9nnmp iQ== From: Bharat Bhushan To: , , , , , , , , , , , , , Subject: [PATCH v8 3/8] vfio: set iommu page size as per host supported page size Date: Wed, 18 Mar 2020 15:41:54 +0530 Message-ID: <20200318101159.8767-4-bbhushan2@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200318101159.8767-1-bbhushan2@marvell.com> References: <20200318101159.8767-1-bbhushan2@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-18_04:2020-03-18, 2020-03-18 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 67.231.156.173 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bharat Bhushan Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @marvell.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Set iommu supported page size mask same as host Linux supported page size mask. Signed-off-by: Bharat Bhushan --- v7->v8: - new patch hw/vfio/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c586edf47a..6ea50d696f 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -635,6 +635,9 @@ static void vfio_listener_region_add(MemoryListener *li= stener, int128_get64(llend), iommu_idx); =20 + memory_region_iommu_set_page_size_mask(giommu->iommu, + container->pgsizes); + ret =3D memory_region_register_iommu_notifier(section->mr, &giommu= ->n, &err); if (ret) { --=20 2.17.1