* [PATCH] Argo/XSM: add SILO hooks
@ 2021-05-07 9:20 Jan Beulich
2021-05-07 15:09 ` Daniel P. Smith
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2021-05-07 9:20 UTC (permalink / raw)
To: xen-devel
Cc: Christopher Clark, Daniel de Graaf, Andrew Cooper, George Dunlap,
Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu
In SILO mode restrictions for inter-domain communication should apply
here along the lines of those for evtchn and gnttab.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Really I was first thinking about the shim: Shouldn't that proxy argo
requests just like it does for gnttab ones? It only then occurred to me
that there's also an implication for SILO mode.
--- a/xen/xsm/silo.c
+++ b/xen/xsm/silo.c
@@ -81,12 +81,35 @@ static int silo_grant_copy(struct domain
return -EPERM;
}
+#ifdef CONFIG_ARGO
+
+static int silo_argo_register_single_source(const struct domain *d1,
+ const struct domain *d2)
+{
+ if ( silo_mode_dom_check(d1, d2) )
+ return xsm_argo_register_single_source(d1, d2);
+ return -EPERM;
+}
+
+static int silo_argo_send(const struct domain *d1, const struct domain *d2)
+{
+ if ( silo_mode_dom_check(d1, d2) )
+ return xsm_argo_send(d1, d2);
+ return -EPERM;
+}
+
+#endif
+
static struct xsm_operations silo_xsm_ops = {
.evtchn_unbound = silo_evtchn_unbound,
.evtchn_interdomain = silo_evtchn_interdomain,
.grant_mapref = silo_grant_mapref,
.grant_transfer = silo_grant_transfer,
.grant_copy = silo_grant_copy,
+#ifdef CONFIG_ARGO
+ .argo_register_single_source = silo_argo_register_single_source,
+ .argo_send = silo_argo_send,
+#endif
};
void __init silo_init(void)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Argo/XSM: add SILO hooks
2021-05-07 9:20 [PATCH] Argo/XSM: add SILO hooks Jan Beulich
@ 2021-05-07 15:09 ` Daniel P. Smith
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Smith @ 2021-05-07 15:09 UTC (permalink / raw)
To: Jan Beulich, xen-devel
Cc: Christopher Clark, Daniel de Graaf, Andrew Cooper, George Dunlap,
Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu
On 5/7/21 5:20 AM, Jan Beulich wrote:
> In SILO mode restrictions for inter-domain communication should apply
> here along the lines of those for evtchn and gnttab.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> ---
> Really I was first thinking about the shim: Shouldn't that proxy argo
> requests just like it does for gnttab ones? It only then occurred to me
> that there's also an implication for SILO mode.
>
> --- a/xen/xsm/silo.c
> +++ b/xen/xsm/silo.c
> @@ -81,12 +81,35 @@ static int silo_grant_copy(struct domain
> return -EPERM;
> }
>
> +#ifdef CONFIG_ARGO
> +
> +static int silo_argo_register_single_source(const struct domain *d1,
> + const struct domain *d2)
> +{
> + if ( silo_mode_dom_check(d1, d2) )
> + return xsm_argo_register_single_source(d1, d2);
> + return -EPERM;
> +}
> +
> +static int silo_argo_send(const struct domain *d1, const struct domain *d2)
> +{
> + if ( silo_mode_dom_check(d1, d2) )
> + return xsm_argo_send(d1, d2);
> + return -EPERM;
> +}
> +
> +#endif
> +
> static struct xsm_operations silo_xsm_ops = {
> .evtchn_unbound = silo_evtchn_unbound,
> .evtchn_interdomain = silo_evtchn_interdomain,
> .grant_mapref = silo_grant_mapref,
> .grant_transfer = silo_grant_transfer,
> .grant_copy = silo_grant_copy,
> +#ifdef CONFIG_ARGO
> + .argo_register_single_source = silo_argo_register_single_source,
> + .argo_send = silo_argo_send,
> +#endif
> };
>
> void __init silo_init(void)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-07 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 9:20 [PATCH] Argo/XSM: add SILO hooks Jan Beulich
2021-05-07 15:09 ` Daniel P. Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).