[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 06/25] argo: Xen command line parameter 'argo': bool to enable/disable
Default to disabled. Signed-off-by: Christopher Clark <christopher.clark6@xxxxxxxxxxxxxx> --- xen/common/argo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 1872d37..82fab36 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -28,6 +28,10 @@ DEFINE_XEN_GUEST_HANDLE(argo_addr_t); DEFINE_XEN_GUEST_HANDLE(argo_ring_t); +/* Xen command line option to enable argo */ +static bool __read_mostly opt_argo_enabled = 0; +boolean_param("argo", opt_argo_enabled); + struct argo_pending_ent { struct hlist_node node; @@ -223,6 +227,13 @@ do_argo_message_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1, argo_dprintk("->do_argo_message_op(%d,%p,%p,%d,%d)\n", cmd, (void *)arg1.p, (void *)arg2.p, (int) arg3, (int) arg4); + if ( unlikely(!opt_argo_enabled) ) + { + rc = -ENOSYS; + argo_dprintk("<-do_argo_message_op()=%ld\n", rc); + return rc; + } + domain_lock(d); switch (cmd) @@ -245,6 +256,14 @@ argo_init(struct domain *d) int i; int rc; + if ( !opt_argo_enabled ) + { + argo_dprintk("argo disabled, domid: %d\n", d->domain_id); + return 0; + } + + argo_dprintk("argo init: domid: %d\n", d->domain_id); + argo = xmalloc(struct argo_domain); if ( !argo ) return -ENOMEM; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |