[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v6 05/10] xsm: add XENMEM_soft_reset support
 
- To: Jan Beulich <JBeulich@xxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
 
- From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
 
- Date: Fri, 22 May 2015 10:58:47 -0400
 
- Cc: Olaf Hering <olaf@xxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>,	Ian Campbell <ian.campbell@xxxxxxxxxx>,	Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>,	Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,	Julien Grall <julien.grall@xxxxxxxxxx>,	Ian Jackson <ian.jackson@xxxxxxxxxxxxx>,	Andrew Jones <drjones@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>,	David Vrabel <david.vrabel@xxxxxxxxxx>,	xen-devel@xxxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxx>
 
- Delivery-date: Fri, 22 May 2015 14:59:18 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
On 05/22/2015 05:40 AM, Jan Beulich wrote:
 
On 13.05.15 at 11:49, <vkuznets@xxxxxxxxxx> 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?
Jan
 
 
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.
--
Daniel De Graaf
National Security Agency
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
    
     |