From nobody Mon Feb 9 19:07:19 2026 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=1584953311; cv=none; d=zohomail.com; s=zohoarc; b=Tjf4bUcos3oVFNtiANbeINko3Fz3d7rj3cT/2z4n0MXQp4Ug6Xjq+wLJ4JVkAFWvykTjw2u2iYTrZ/yxLQakI1dEX+GgX0/FR3ASBy1pd6JkodDzsdjFN4icDGfftnrCu9lwwCJPMhrp9o3NGEBQtsXqfWOEy0Ur4rpsnrq/HHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584953311; 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=WEugmL+w41y9WSds0AUf8b6EHXZir+QEns7Vh2avFLc=; b=c4dMVUdFJwbUK8GdyAlrB466aPm57KEsfkLIYao523uk/I7ySRdXtq+2rJpoiD3oKs68jXyKuSSG88zUWUAc0O1ReRpAsCBxoIHoTFf0jlTzkUCjmo4c5InWnpfsdJn2fNDTv6Cix1MeMvpnVr1VI3MS+0KlkedRfwn0jBK8ifw= 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 1584953311459939.0002987595715; Mon, 23 Mar 2020 01:48:31 -0700 (PDT) Received: from localhost ([::1]:58644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGIl4-0001LR-6a for importer@patchew.org; Mon, 23 Mar 2020 04:48:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48395) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGIjT-0008EB-9n for qemu-devel@nongnu.org; Mon, 23 Mar 2020 04:46:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGIjS-00037M-7g for qemu-devel@nongnu.org; Mon, 23 Mar 2020 04:46:51 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:37044) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jGIjQ-00036x-6K; Mon, 23 Mar 2020 04:46:50 -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 02N8eL98013746; Mon, 23 Mar 2020 01:46:45 -0700 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2ywvkqkxc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 23 Mar 2020 01:46:45 -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; Mon, 23 Mar 2020 01:46:43 -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; Mon, 23 Mar 2020 01:46:39 -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=WEugmL+w41y9WSds0AUf8b6EHXZir+QEns7Vh2avFLc=; b=LAMKq5QuG4kK1ioaWD6GeDh51nj7vFAW9UY81y0rHx6XQhd/eSg9KfuuLTjVKiezo2Ku 5heCYmp31pcEOZSqvYw0IqImQnUqUBjvolwEWKnfTJWWP72OuMg0O2jg5ajdPxtqkZXx qP4srqJQZL4wws9mtKz2QUvc3inoqusQ/3cYs0yBKVeh6OrTZoW2C6pso0WVskoF4uir t1eLYWAJGgNZpdH/AZTr4doMl/AmIlW5UtiLNsL+wJ/++xP9rpP3A3auZN23pgFfhOaw oZ5ABcCvXjXjt4nP0lkrgZ/UPaf06AoHM6RZbL7/pidTtX45tL9uY0hC4OoiJ5YqJlvH EA== From: Bharat Bhushan To: , , , , , , , , , , , , , Subject: [PATCH v9 3/9] vfio: set iommu page size as per host supported page size Date: Mon, 23 Mar 2020 14:16:11 +0530 Message-ID: <20200323084617.1782-4-bbhushan2@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200323084617.1782-1-bbhushan2@marvell.com> References: <20200323084617.1782-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-23_02:2020-03-21, 2020-03-23 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 --- 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