From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: Re: [PATCH v6 05/10] xsm: add XENMEM_soft_reset support Date: Fri, 22 May 2015 16:59:09 +0200 Message-ID: <87vbfku08y.fsf@vitty.brq.redhat.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YvoQ2-0002cx-Oe for xen-devel@lists.xenproject.org; Fri, 22 May 2015 14:59:26 +0000 In-Reply-To: <555F15C1020000780007D211@mail.emea.novell.com> (Jan Beulich's message of "Fri, 22 May 2015 10:40:49 +0100") 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: 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, Daniel De Graaf , Keir Fraser List-Id: xen-devel@lists.xenproject.org "Jan Beulich" writes: >>>> 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? > No reason to be honest. We agreed on a 2-step check for FLASK with Daniel (the caller has permission to operate on both domains and the memory itself can be transfered), XSM_TARGET against both domains in dummy seems reasonable too. > Jan -- Vitaly