From: Tim Deegan Subject: Re: [PATCH 09/11] x86/altp2m: define and implement alternate p2m HVMOP types. Date: Fri, 16 Jan 2015 18:57:16 +0100 Message-ID: <20150116175716.GF48064@deinos.phlegethon.org> References: <1420838801-11704-1-git-send-email-edmund.h.white@intel.com> <1420838801-11704-10-git-send-email-edmund.h.white@intel.com> <20150115170951.GH57240@deinos.phlegethon.org> <54B82665.5030205@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54B82665.5030205@intel.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: Ed White Cc: keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 12:43 -0800 on 15 Jan (1421322197), Ed White wrote: > On 01/15/2015 09:09 AM, Tim Deegan wrote: > > Hi, > > > > These _definitely_ need XSM checks, otherwise any domain can call them > > on any other! I think you can probably copy the other p2m-munging > > operations to see how to make a sensible default policy. > > Understood. I'll look at this subject again, but it's an area where > I could really use some help. There aren't any similar hypercalls that > I could find where the target domain and source domain may or may not > be the same, and the processing required varies depending on which is > the case. Yeah, this stuff is a bit non-obvious. IIUC what you want is basically for all these operations to be available to either the VM itself or a privileged helper in another domain. The shorthand for that is XSM_TARGET, so you should be ok with something like rc = xsm_hvm_control(XSM_TARGET, d, op); Cheers, Tim.