From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 11/12] xen/gntdev: mark userspace PTEs as special on x86 PV guests Date: Wed, 7 Jan 2015 12:11:14 +0000 Message-ID: <1420632674.18631.66.camel@citrix.com> References: <1420570657-8203-1-git-send-email-david.vrabel@citrix.com> <1420570657-8203-12-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y8pSJ-0002OI-KB for xen-devel@lists.xenproject.org; Wed, 07 Jan 2015 12:11:19 +0000 In-Reply-To: <1420570657-8203-12-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky , Jenny Herbert , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2015-01-06 at 18:57 +0000, David Vrabel wrote: > In an x86 PV guest, get_user_pages_fast() on a userspace address range > containing foreign mappings does not work correctly because the M2P > lookup of the MFN from a userspace PTE may return the wrong page. > > Force get_user_pages_fast() to fail on such addresses by marking the PTEs > as special. > > If Xen has XENFEAT_gnttab_map_avail_bits (available since at least > 4.0), http://wiki.xenproject.org/wiki/Xen_Kernel_Feature_Matrix says the dom0 pvpops already requires >= 4.0 too, which matches my recollection (something to do with a new APIC interface which upstream insisted on during upstreaming, IIRC), but both could be out of date... Ian.