From: Tim Deegan Subject: Re: struct paging_mode's {write, cmpxchg}_guest_entry and guest_{map, get_eff}_l1e Date: Wed, 28 Oct 2015 14:39:10 +0000 Message-ID: <20151028143910.GA12902@deinos.phlegethon.org> References: <561F864E02000078000AB436@prv-mh.provo.novell.com> <20151015093931.GA39600@deinos.phlegethon.org> <562FA21102000078000AF32F@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZrRsn-0003GT-9E for xen-devel@lists.xenproject.org; Wed, 28 Oct 2015 14:39:21 +0000 Content-Disposition: inline In-Reply-To: <562FA21102000078000AF32F@prv-mh.provo.novell.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: Jan Beulich Cc: George Dunlap , xen-devel List-Id: xen-devel@lists.xenproject.org At 09:10 -0600 on 27 Oct (1445937057), Jan Beulich wrote: > >>> On 15.10.15 at 11:39, wrote: > > At 02:56 -0600 on 15 Oct (1444877774), Jan Beulich wrote: > >> what's the reason that these aren't in struct shadow_paging_mode > >> instead? They're only being used by shadow code, and I can't see > >> an abstract reason why HAP would ever want to use them. > > > > That seems fair. In fact AFAICT they're only called for > > _translated-mode_ PV guests! > > > > So we should just refuse to enter a translated-but-not-external paging > > mode, since that's not maintained and almost certainly doesn't work, > > and then these hooks can go away entirely. > > Looking more closely, I think this is true for the latter two (in the > subject), but not the former two (and indeed migration triggers > them). Oh, yes, I hadn't looked at those. Yes, we need to keep write/cmpxchg. I would be inclined to keep them as paging-level operations, at least as far as non-mm code is concerned. I have no objection to moving the function pointers into a shadow-specific struct and having the wrapper assert that the caller is in shadow mode. Cheers, Tim.