[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 23/25] argo: signal x86 HVM and ARM via VIRQ
* x86 PV domains are notified via event channel. PV guests are known to have the event channel software present in the guest kernel, so it is fine to depend on and use it. * x86 HVM domains and all ARM domains are notified via VIRQ. The intent is to remove the requirement for event channel software to be installed within these guests in order to use Argo. VIRQ signalling is also the method that has been in use for the longest period with this hypercall in both XenClient and OpenXT. Signed-off-by: Christopher Clark <christopher.clark6@xxxxxxxxxxxxxx> --- xen/common/argo.c | 39 ++++++++++++++++++++++++++++++++++++--- xen/include/public/argo.h | 3 +++ xen/include/public/xen.h | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/xen/common/argo.c b/xen/common/argo.c index fa969ab..9b12e6b 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -181,18 +181,51 @@ static DEFINE_RWLOCK(argo_lock); /* L1 */ #endif /* - * Event channel + * Signalling */ +static unsigned int argo_signal_method(const struct domain *d) +{ + unsigned int method; +#ifdef CONFIG_X86 + if ( is_hvm_domain(d) ) + method = ARGO_SIGNAL_METHOD_VIRQ; + else + method = ARGO_SIGNAL_METHOD_EVTCHN; +#else + method = ARGO_SIGNAL_METHOD_VIRQ; +#endif + return method; +} + static void argo_signal_domain(struct domain *d) { - argo_dprintk("signalling domid:%d\n", d->domain_id); + unsigned int method = argo_signal_method(d); if ( !d->argo ) /* This can happen if the domain is being destroyed */ return; - evtchn_send(d, d->argo->evtchn_port); + argo_dprintk("signalling domid:%d via method:%u\n", d->domain_id, method); + + switch ( method ) + { + case ARGO_SIGNAL_METHOD_EVTCHN: + { + evtchn_send(d, d->argo->evtchn_port); + break; + } + case ARGO_SIGNAL_METHOD_VIRQ: + { + send_guest_global_virq(d, VIRQ_ARGO); + break; + } + default: + { + BUG(); + break; + } + } } static void diff --git a/xen/include/public/argo.h b/xen/include/public/argo.h index 42f551f..710baa6 100644 --- a/xen/include/public/argo.h +++ b/xen/include/public/argo.h @@ -150,6 +150,9 @@ struct argo_ring_message_header #endif }; +#define ARGO_SIGNAL_METHOD_EVTCHN 1 +#define ARGO_SIGNAL_METHOD_VIRQ 2 + /* * Hypercall operations */ diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 8dc032b..8a64875 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -178,7 +178,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t); #define VIRQ_CON_RING 8 /* G. (DOM0) Bytes received on console */ #define VIRQ_PCPU_STATE 9 /* G. (DOM0) PCPU state changed */ #define VIRQ_MEM_EVENT 10 /* G. (DOM0) A memory event has occurred */ -#define VIRQ_XC_RESERVED 11 /* G. Reserved for XenClient */ +#define VIRQ_ARGO 11 /* G. Argo interdomain message notification */ #define VIRQ_ENOMEM 12 /* G. (DOM0) Low on heap memory */ #define VIRQ_XENPMU 13 /* V. PMC interrupt */ -- 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 |