From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v7 13/15] x86/altp2m: XSM hooks for altp2m HVM ops Date: Fri, 24 Jul 2015 01:49:02 -0600 Message-ID: <55B20A0E0200007800094F7D@prv-mh.provo.novell.com> References: <1437606081-6964-1-git-send-email-edmund.h.white@intel.com> <1437606081-6964-14-git-send-email-edmund.h.white@intel.com> <55B12DB90200007800094C70@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ravi Sahita Cc: Tim Deegan , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Edmund H White , "xen-devel@lists.xen.org" , Jun Nakajima , "tlengyel@novetta.com" , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org >>> On 23.07.15 at 18:56, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >>Sent: Thursday, July 23, 2015 9:09 AM >> >>>>> On 23.07.15 at 01:01, wrote: >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -6005,6 +6005,9 @@ static int hvmop_set_param( >>> nestedhvm_vcpu_destroy(v); >>> break; >>> case HVM_PARAM_ALTP2M: >>> + rc = xsm_hvm_param_altp2mhvm(XSM_PRIV, d); >>> + if ( rc ) >>> + break; >>> if ( a.value > 1 ) >>> rc = -EINVAL; >>> if ( a.value && >>> @@ -6189,6 +6192,9 @@ static int do_altp2m_op( >>> goto out; >>> } >>> >>> + if ( (rc = xsm_hvm_altp2mhvm_op(XSM_TARGET, d ? d : current- >>>domain)) ) >>> + goto out; >>> + >> >>Shouldn't this have got updated after the changes to patch 11? > > It was updated - a number of similar calls to check xsm permissions for this > op were collapsed due to the sub-op'ing. > We don't differentiate across sub-ops for altp2m w.r.t. XSM permissions. But I'm talking about the conditional expression still used there. Jan