From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH v6 02/10] xsm bits for vNUMA hypercalls Date: Fri, 18 Jul 2014 11:26:46 -0400 Message-ID: <53C93CB6.1050408@tycho.nsa.gov> References: <1405662609-31486-1-git-send-email-ufimtseva@gmail.com> <1405662609-31486-3-git-send-email-ufimtseva@gmail.com> <20140718135012.GD24044@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140718135012.GD24044@laptop.dumpdata.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: Elena Ufimtseva Cc: lccycc123@gmail.com, keir@xen.org, Ian.Campbell@citrix.com, george.dunlap@eu.citrix.com, msw@linux.com, dario.faggioli@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 07/18/2014 09:50 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Jul 18, 2014 at 01:50:01AM -0400, Elena Ufimtseva wrote: >> Define xsm_get_vnumainfo hypercall used for domain which >> wish to receive vnuma topology. Add xsm hook for >> XEN_DOMCTL_setvnumainfo. Also adds basic policies. In order to add basic policies, you should also modify the example XSM policy in tools/flask/policy/policy/modules/xen/xen.{if,te} and add the permission to the create_domain and/or manage_domain macros. Otherwise, the commit message should only refer to adding XSM checks (and the example policy will have to be modified later, so it's really preferable to update them both now). [...] >> diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h >> index a85045d..c7ec562 100644 >> --- a/xen/include/xsm/xsm.h >> +++ b/xen/include/xsm/xsm.h >> @@ -169,6 +169,7 @@ struct xsm_operations { >> int (*unbind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind); >> int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow); >> int (*ioport_mapping) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow); >> + int (*get_vnumainfo) (struct domain *d); >> #endif >> }; >> >> @@ -653,6 +654,12 @@ static inline int xsm_ioport_mapping (xsm_default_t def, struct domain *d, uint3 >> { >> return xsm_ops->ioport_mapping(d, s, e, allow); >> } >> + >> +static inline int xsm_get_vnumainfo (xsm_default_t def, struct domain *d) >> +{ >> + return xsm_ops->get_vnumainfo(d); >> +} >> + >> #endif /* CONFIG_X86 */ Both of these need to be moved outside of #ifdef CONFIG_X86 since the hook is not x86-specific. The other files' changes look correct. -- Daniel De Graaf National Security Agency