From: "Jan Beulich" Subject: Re: [PATCH v6 05/10] xsm: add XENMEM_soft_reset support Date: Fri, 22 May 2015 16:26:21 +0100 Message-ID: <555F66BD020000780007D5A1@mail.emea.novell.com> References: <1431510585-12544-1-git-send-email-vkuznets@redhat.com> <1431510585-12544-6-git-send-email-vkuznets@redhat.com> <555F15C1020000780007D211@mail.emea.novell.com> <555F4427.5020302@tycho.nsa.gov> 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 1Yvoq8-0004Zd-U4 for xen-devel@lists.xenproject.org; Fri, 22 May 2015 15:26:25 +0000 In-Reply-To: <555F4427.5020302@tycho.nsa.gov> 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: Vitaly Kuznetsov , Daniel De Graaf Cc: Olaf Hering , Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Andrew Jones , Tim Deegan , David Vrabel , xen-devel@lists.xenproject.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 22.05.15 at 16:58, wrote: > On 05/22/2015 05:40 AM, Jan Beulich wrote: >>>>> On 13.05.15 at 11:49, wrote: >>> --- a/xen/include/xsm/dummy.h >>> +++ b/xen/include/xsm/dummy.h >>> @@ -193,6 +193,13 @@ static XSM_INLINE int > xsm_memory_exchange(XSM_DEFAULT_ARG struct domain *d) >>> return xsm_default_action(action, current->domain, d); >>> } >>> >>> +static XSM_INLINE int xsm_memory_soft_reset(XSM_DEFAULT_ARG struct domain > *d1, >>> + struct domain *d2) >>> +{ >>> + XSM_ASSERT_ACTION(XSM_PRIV); >>> + return xsm_default_action(action, current->domain, NULL); >>> +} >> >> Why XSM_PRIV instead of XSM_TARGET against _both_ domains? > > Unless there is a change in how XSM_TARGET is implemented, the result > is going to be equivalent: it is not possible for a domain to have > more than one target at a time, so if current->domain is not dom0, > then one of the two XSM_TARGET checks will fail. Ah, right. But the thing here wants that expressed. But I guess this should be a separate change later on. Vitaly - please leave a respective comment around. Jan