Received: by 10.213.65.68 with SMTP id h4csp2348920imn; Mon, 9 Apr 2018 01:52:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx49TmRgXD7SQv3eUTq+5hYlZzAjlEECrhRBcL/tbEPkl1Cx/upr4uHexuq0zxGK6pSMSaYiY X-Received: by 10.99.107.8 with SMTP id g8mr14724747pgc.271.1523263927988; Mon, 09 Apr 2018 01:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523263927; cv=none; d=google.com; s=arc-20160816; b=WgjlFFxPdczZbTlx3+XQroD1bE4naDMCo/g+E1vOLcs6DjQJ8rwPq+uCf9LKo5gOhx 8hEDGjmHWyn811K7u4QK/g2LiccbfkkOdpAxnw7TMRpZp4tyEc7/63KldQBPHylFi2Jm k78DQqPnq9VDXnXs+/jv7QXrSNaaziRbj943wUvhGbKvI4qPT69oEMN3IYhM2gmnzu3p tMCzOZEo/Ve4wGHQbksyIZBdDmCVHRPnlEHtc1ooTW6d99linBG5T9xFB+BhZZ0ha6av o4Xv9cnW32ebBgh68BAIbx09t2BaoJzpkXmfDLC2wqh7q9gzxrKI/ZqfXderyUOh6YtF r80w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=ZidPrb/yRQUiKG9f3B9cwmJCUy1jfS7l/CpTDq6W+T4=; b=no/IARC6P6A8LkJSNyKwRHYPn19dTdZZbnfvp/A8dt8zIZ8y9WSqz9YVjqrITQyqUH OVzf+5Lw/IDSXrc6V5ALJ1FH2tNYM74IzWxhbiLrF6rCpdRF6Coo7TR6sEjDqun9fz1j qB36Qt9EJ/r4kxaF9dd6nWqXUHHYaA8JH8Jiu7UHnwU2KCpy+wOvQb8VIR20MBiZWQKm OIrGAMZUJFOKZVN+o/BgYjbAEVAloYZ7L8/Ld0j/9FPzAQiFIGqXKYqOOZOGoAoZWzKs JStpdwvtHE+/FHBvIhi+r9cv2WS8Lx85YCMP4F33Hx8V5Ffxdj6cZfr2vaPOknLvymNG zk7w== ARC-Authentication-Results: i=1; mx.google.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 w2-v6si14192504plk.702.2018.04.09.01.51.31; Mon, 09 Apr 2018 01:52:07 -0700 (PDT) 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; 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 S1751998AbeDIIsB (ORCPT + 99 others); Mon, 9 Apr 2018 04:48:01 -0400 Received: from smtp.eu.citrix.com ([185.25.65.24]:25552 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759AbeDIIsA (ORCPT ); Mon, 9 Apr 2018 04:48:00 -0400 X-IronPort-AV: E=Sophos;i="5.48,426,1517875200"; d="scan'208";a="71232168" From: Paul Durrant To: 'Boris Ostrovsky' , "x86@kernel.org" , "xen-devel@lists.xenproject.org" , "linux-kernel@vger.kernel.org" CC: Juergen Gross , Thomas Gleixner , Ingo Molnar Subject: RE: [PATCH v2] xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE Thread-Topic: [PATCH v2] xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE Thread-Index: AQHTzPTGdqvISTmwUkqDroW+WI1gIKPyoM0AgAWB+VA= Date: Mon, 9 Apr 2018 08:47:58 +0000 Message-ID: <1b3fc1c2e24d46539473e6191b3c3bd4@AMSPEX02CL03.citrite.net> References: <20180405154249.33929-1-paul.durrant@citrix.com> <727b9efc-f448-2955-6a47-774de330bcd8@oracle.com> In-Reply-To: <727b9efc-f448-2955-6a47-774de330bcd8@oracle.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCb3JpcyBPc3Ryb3Zza3kgW21h aWx0bzpib3Jpcy5vc3Ryb3Zza3lAb3JhY2xlLmNvbV0NCj4gU2VudDogMDUgQXByaWwgMjAxOCAy MzozNA0KPiBUbzogUGF1bCBEdXJyYW50IDxQYXVsLkR1cnJhbnRAY2l0cml4LmNvbT47IHg4NkBr ZXJuZWwub3JnOyB4ZW4tDQo+IGRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnOyBsaW51eC1rZXJu ZWxAdmdlci5rZXJuZWwub3JnDQo+IENjOiBKdWVyZ2VuIEdyb3NzIDxqZ3Jvc3NAc3VzZS5jb20+ OyBUaG9tYXMgR2xlaXhuZXINCj4gPHRnbHhAbGludXRyb25peC5kZT47IEluZ28gTW9sbmFyIDxt aW5nb0ByZWRoYXQuY29tPg0KPiBTdWJqZWN0OiBSZTogW1BBVENIIHYyXSB4ZW4vcHJpdmNtZDog YWRkDQo+IElPQ1RMX1BSSVZDTURfTU1BUF9SRVNPVVJDRQ0KPiANCj4gT24gMDQvMDUvMjAxOCAx MTo0MiBBTSwgUGF1bCBEdXJyYW50IHdyb3RlOg0KPiA+IE15IHJlY2VudCBYZW4gcGF0Y2ggc2Vy aWVzIGludHJvZHVjZXMgYSBuZXcgSFlQRVJWSVNPUl9tZW1vcnlfb3AgdG8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