Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7281382ybl; Wed, 15 Jan 2020 19:28:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxSHR1xN2mzu5QSkqK9OegSI5wCdZiedxd/KdWEg+6m6zAI7RdWZOPY2iFUkf/UESZ2Le+I X-Received: by 2002:a05:6808:6d6:: with SMTP id m22mr2475181oih.138.1579145329481; Wed, 15 Jan 2020 19:28:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1579145329; cv=pass; d=google.com; s=arc-20160816; b=BHeGDtLi0HEispvYxtnywhsg3v0SZKagDRkDrNi9hgNsBmQhXEn2+g+HK3AqxKw46y jTeD3sGkFoEnwYiUvMXwQsiA2XanyttIPk1tngPWM4/6Xn53ZUWIdTAjsSfvV6xmg8kv fvExUHvSFdKQDYnpoxHBnF8kcZTbGGp2C+Kus8sVCExl1v4NFFfHGPPSlqi2NomoKjal Zi/FQlXKyyb11/0yR2ibpM2en8+W9TXk3WZ1+ExRpp8ix5accKyTsFKew2BmDcBllKW6 cqomhs4kgWlNBgLW7O+JXZ6b1EjdDAq1uvcthOXEUv0rVW9VE/DiqiMY/FExySvpAcvT v2yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=RxgUBl5mzUPv8Yi9HbjdAKi6aBnXQEgojceDyofwMZs=; b=LNnAau3/pbK5eEgKBIa6wnezLwRpt4aCSKNHp66r1VRCRZ3Hy59/+F5XXDSb9RTT4y pPHfmmnw+wVDo7++yr1XQdFew+dekxpXb/kzJPpEuIepZui6gjbjVtuH0UASrHZwaDmq 23DLTM4vrFxS1klE3Lj9qdS5xRfwNcw3iGN87xNWA7DNzvE46c4cRTnz5pOqg+3gka6E veozcYvxAFLhdJEuf55mnNSpX+ev1F18bUnJB7jzuC1Lwwtsb64f+2uFXThOvrt1bnAi V9laZM4u1VOvuUlVN5Fm6kITURuJUXpO1wirm4+X9dB3mlgltony/GtisnNTWAKCUKSx Rj+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NextfourGroupOy.onmicrosoft.com header.s=selector2-NextfourGroupOy-onmicrosoft-com header.b=iNqt18pP; arc=pass (i=1 spf=pass spfdomain=nextfour.com dkim=pass dkdomain=nextfour.com dmarc=pass fromdomain=nextfour.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si4454584otf.178.2020.01.15.19.28.36; Wed, 15 Jan 2020 19:28:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@NextfourGroupOy.onmicrosoft.com header.s=selector2-NextfourGroupOy-onmicrosoft-com header.b=iNqt18pP; arc=pass (i=1 spf=pass spfdomain=nextfour.com dkim=pass dkdomain=nextfour.com dmarc=pass fromdomain=nextfour.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729206AbgAPDQE (ORCPT + 99 others); Wed, 15 Jan 2020 22:16:04 -0500 Received: from mail-vi1eur05on2064.outbound.protection.outlook.com ([40.107.21.64]:6032 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726552AbgAPDQD (ORCPT ); Wed, 15 Jan 2020 22:16:03 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WJbRTf6fyJuyDu1/xSzRwDkW72FH4W7BXVb2KQUeIa4yFZaQloNYy+ZyJScrepKZ9fWNN3SY3Z8KJXKSlP2djn5Gl2dqlO6CojtINR1J1q2tsY5KQ0qt4Jlfem9xqhWW2AiniP7f7UlQnObwpl0Odqq3tev1RGb/DLE6KwFPPXnC3FXuNtGkQMozuP/cEFfqFTPTm2FAMd2Qxhd6qCphYmsthXpj6GTDHcBADKueItuMoQ/yM6FLpjZX/yubp5hupapz2Lp3ps0QYEJ+jQzM720okepBkdJXY4Be3mDhRf4vgOAL+I5mxz6QFVMrJSMok9dMhia/RFZc7RZDxuMWSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RxgUBl5mzUPv8Yi9HbjdAKi6aBnXQEgojceDyofwMZs=; b=b5x18LSV3u2m7v8CyU5NEcTVtDM4zBAyGFmDw7CrHozPlFGDGgey8gkxfK50pj+uqEdzkmR9amlamnchtzs262DlbE10FD/hva7NwMyIU+bqNzkwxFYxXCR9mnpMM/FW0b2bqqUcDBRPqZsHPu9/I1wqFr3xB+4MeBwLJuiBlEclySpkRHSDkV1TwUkNF5TQdnh7dCkEYrCZ3wYO0ZgfYQqihPJZzhsAv0d2i0R7klq3i2o7ZGch2NqDY6Ce8dCMbq4VZ/+K63DLOnmagU43sng2MPMVcfYRTbVxU6Hgf47W00zpLJeY2pCiAw29LpqhGNx2Zy85Jc8g3xBbQL81Hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nextfour.com; dmarc=pass action=none header.from=nextfour.com; dkim=pass header.d=nextfour.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NextfourGroupOy.onmicrosoft.com; s=selector2-NextfourGroupOy-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RxgUBl5mzUPv8Yi9HbjdAKi6aBnXQEgojceDyofwMZs=; b=iNqt18pP4ldIDrx0xw4wi3sVpEE8CzQ3ji9FsKo876DjINl4HfEOr3INqnqTQbSsHXi1D0a8ePNM80uB8l6oSWSRZSYkQCE9Lu3ZncJiEU9YcoGHH+mtH29mPQUxK9fpKUQRA9+CEFqe7KC4NupvlkRrsBd2fHrXteuTZ2i5J/8= Received: from VI1PR03MB3775.eurprd03.prod.outlook.com (52.134.21.155) by VI1PR03MB4799.eurprd03.prod.outlook.com (20.178.13.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9; Thu, 16 Jan 2020 03:15:58 +0000 Received: from VI1PR03MB3775.eurprd03.prod.outlook.com ([fe80::fdfe:b987:16ad:9de9]) by VI1PR03MB3775.eurprd03.prod.outlook.com ([fe80::fdfe:b987:16ad:9de9%5]) with mapi id 15.20.2623.018; Thu, 16 Jan 2020 03:15:58 +0000 Received: from [192.168.1.121] (91.145.109.188) by HE1PR07CA0046.eurprd07.prod.outlook.com (2603:10a6:7:66::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.10 via Frontend Transport; Thu, 16 Jan 2020 03:15:57 +0000 From: =?utf-8?B?TWlrYSBQZW50dGlsw6Q=?= To: Alex Williamson CC: Yan Zhao , "zhenyuw@linux.intel.com" , "intel-gvt-dev@lists.freedesktop.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "kevin.tian@intel.com" , "peterx@redhat.com" Subject: Re: [PATCH v2 1/2] vfio: introduce vfio_dma_rw to read/write a range of IOVAs Thread-Topic: [PATCH v2 1/2] vfio: introduce vfio_dma_rw to read/write a range of IOVAs Thread-Index: AQHVy1izPc+ONnk2aUegZV3QDrVrz6fsJ+UAgACM3wD//+aegIAABHUA Date: Thu, 16 Jan 2020 03:15:58 +0000 Message-ID: <7528cfff-2512-538e-4e44-85f0a0b0130a@nextfour.com> References: <20200115034132.2753-1-yan.y.zhao@intel.com> <20200115035303.12362-1-yan.y.zhao@intel.com> <20200115130638.6926dd08@w520.home> <80cf3888-2e51-3fd7-a064-213e7ded188e@nextfour.com> <20200115195959.28f33078@x1.home> In-Reply-To: <20200115195959.28f33078@x1.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR07CA0046.eurprd07.prod.outlook.com (2603:10a6:7:66::32) To VI1PR03MB3775.eurprd03.prod.outlook.com (2603:10a6:803:2b::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=mika.penttila@nextfour.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [91.145.109.188] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c9b6101b-7c90-45d9-c6ea-08d79a32684b x-ms-traffictypediagnostic: VI1PR03MB4799: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02843AA9E0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(376002)(39830400003)(346002)(136003)(189003)(199004)(66446008)(31696002)(956004)(66946007)(86362001)(5660300002)(2616005)(85182001)(66476007)(64756008)(31686004)(508600001)(6916009)(36756003)(26005)(6486002)(2906002)(71200400001)(4326008)(16576012)(316002)(186003)(16526019)(54906003)(81156014)(52116002)(8676002)(81166006)(8936002)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR03MB4799;H:VI1PR03MB3775.eurprd03.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nextfour.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UjEhWoQqkxzT/vvsU2JSZ6NJdqHWZVp28WFLEWuXmhGt91RlBTENI1dLD1NLqjh+1rKcXaGwN2u0UJpQBJfnUCvNo7IXmG6wxQljAlSZiw5140rAIhSXG2cZB0J2K+Y04tobEaMms7KdaeSeVeuZsgFnLlRBdr0zv5Q7zk4xz70Um1ekyKvPQb3f5d4VuP62YoxKthI+cd7cWE94gah8ZdzYZzrDcRa+KBCGQCHPI5KDdrfQyHEH1GY/MXTErwKWAPUS9hNry9yiP8761IDMiKl7MiEJPnpjoQMS7vDBjSEL4Cke7F2YgykeCO0bbB6Db/6SRf0YESrs4UiX8IfjHomvKg7Vz34Xc1qRM7HmlrjT2OYmEBvhYqIeB4MKxUxLcDJd7AbXyG3V8Hx6yMinxzXHg3zDRMty7I5BDAFRmL7daojFeBgVDsPuVm8rr+V8 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: <7673813CB012A949B8A7EA6C0DAE93DA@eurprd03.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nextfour.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9b6101b-7c90-45d9-c6ea-08d79a32684b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2020 03:15:58.6952 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 972e95c2-9290-4a02-8705-4014700ea294 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NfLWCPlPecdvWYIQt7lG96z7U3vegE+Uj19weEXwKzs7HZ9HiQpA4RbEUYxdHPqZyCCoVtHndJr8IFPI7xDiQJN/6rc//76QLDZTdHLKCkw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4799 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCk9uIDE2LjEuMjAyMCA0LjU5LCBBbGV4IFdpbGxpYW1zb24gd3JvdGU6DQo+IE9uIFRodSwg MTYgSmFuIDIwMjAgMDI6MzA6NTIgKzAwM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