* ia64 event channels
@ 2005-06-14 20:32 Matt Chapman
[not found] ` <mailman.1118781182.16413@unix-os.sc.intel.com>
0 siblings, 1 reply; 5+ messages in thread
From: Matt Chapman @ 2005-06-14 20:32 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
This is the one change we've made to architecture-independent code
for event channels. Rather than polling the event channel flags
on every return, we pend an interrupt in evtchn_set_pending.
This might be better abstracted into some architecture-dependent
header file, but I'm not sure where. We could add an asm/event.h,
though it does seem a bit excessive to add a file just for one
trivial hook.
Matt
===== event.h 1.26 vs 1.27 =====
--- 1.26/xen/include/xen/event.h Fri Jun 3 10:42:09 2005
+++ 1.27/xen/include/xen/event.h Fri Jun 10 17:26:21 2005
@@ -34,6 +34,9 @@
{
/* The VCPU pending flag must be set /after/ update to evtchn-pend. */
set_bit(0, &v->vcpu_info->evtchn_upcall_pending);
+#ifdef __ia64__
+ vcpu_pend_interrupt(v, s->arch.evtchn_vector);
+#endif
/*
* NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <mailman.1118781182.16413@unix-os.sc.intel.com>]
* Re: ia64 event channels [not found] ` <mailman.1118781182.16413@unix-os.sc.intel.com> @ 2005-06-14 22:17 ` Arun Sharma 2005-06-15 0:50 ` Matt Chapman 0 siblings, 1 reply; 5+ messages in thread From: Arun Sharma @ 2005-06-14 22:17 UTC (permalink / raw) To: Matt Chapman; +Cc: Ling, Xiaofeng, xen-devel Matt Chapman wrote: > This is the one change we've made to architecture-independent code > for event channels. Rather than polling the event channel flags > on every return, we pend an interrupt in evtchn_set_pending. > > This might be better abstracted into some architecture-dependent > header file, but I'm not sure where. We could add an asm/event.h, > though it does seem a bit excessive to add a file just for one > trivial hook. Not all event channel events get injected into the guest. For eg, on VT-x and VT-i, we use event channels to communicate events from the device models to the hypervisor on handling memory mapped and accesses to I/O ports. Have you already looked at this patch: http://article.gmane.org/gmane.comp.emulators.xen.devel/10852 vmx_check_guest_event() does something very similar. Also, it might be good to unify the names (callback_irq vs evtchn_vector -- I like evtchn_vector better). -Arun ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ia64 event channels 2005-06-14 22:17 ` Arun Sharma @ 2005-06-15 0:50 ` Matt Chapman 2005-06-15 19:29 ` [PATCH] " Matt Chapman 0 siblings, 1 reply; 5+ messages in thread From: Matt Chapman @ 2005-06-15 0:50 UTC (permalink / raw) To: Arun Sharma; +Cc: Ling, Xiaofeng, xen-devel On Tue, Jun 14, 2005 at 03:17:48PM -0700, Arun Sharma wrote: > > Not all event channel events get injected into the guest. For eg, on > VT-x and VT-i, we use event channels to communicate events from the > device models to the hypervisor on handling memory mapped and accesses > to I/O ports. > > Have you already looked at this patch: > > http://article.gmane.org/gmane.comp.emulators.xen.devel/10852 > > vmx_check_guest_event() does something very similar. Ah, I hadn't seen that patch. In that case, it is indeed better to abstract what I added to evtchn.h behind a hook function like check_guest_event(). I think this hook should be relevant for x86 VMX as well? i.e. if we arrange it so that vmx_check_guest_event is called from evtchn_set_pending, then you don't have to call it on every exit to user? > Also, it might be good to unify the names (callback_irq vs evtchn_vector > -- I like evtchn_vector better). Sure. Also, I put it in the shared_info; I'm happy to move it to the VCPU structure though, that may be more appropriate. Matt ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ia64 event channels 2005-06-15 0:50 ` Matt Chapman @ 2005-06-15 19:29 ` Matt Chapman 2005-06-15 20:15 ` Arun Sharma 0 siblings, 1 reply; 5+ messages in thread From: Matt Chapman @ 2005-06-15 19:29 UTC (permalink / raw) To: Keir Fraser; +Cc: Arun Sharma, Ling, Xiaofeng, xen-devel [-- Attachment #1: Type: text/plain, Size: 302 bytes --] This patch adds an architecture-specific hook function for event delivery, which does any necessary actions to notify the recipient, e.g. pending an IRQ. We plan to use this on IA64, I imagine it will be useful for VT-x domains as well. Thanks, Matt Signed-off-by: Matthew Chapman <matthewc@hp.com> [-- Attachment #2: event2.patch --] [-- Type: text/plain, Size: 1637 bytes --] diff -Nru a/xen/include/asm-ia64/event.h b/xen/include/asm-ia64/event.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/xen/include/asm-ia64/event.h Wed Jun 15 13:24:58 2005 @@ -0,0 +1,16 @@ +/****************************************************************************** + * event.h + * + * A nice interface for passing asynchronous events to guest OSes. + * (architecture-dependent part) + * + */ + +#ifndef __ASM_EVENT_H__ +#define __ASM_EVENT_H__ + +static inline void evtchn_notify(struct vcpu *v) +{ +} + +#endif diff -Nru a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/xen/include/asm-x86/event.h Wed Jun 15 13:24:58 2005 @@ -0,0 +1,16 @@ +/****************************************************************************** + * event.h + * + * A nice interface for passing asynchronous events to guest OSes. + * (architecture-dependent part) + * + */ + +#ifndef __ASM_EVENT_H__ +#define __ASM_EVENT_H__ + +static inline void evtchn_notify(struct vcpu *v) +{ +} + +#endif diff -Nru a/xen/include/xen/event.h b/xen/include/xen/event.h --- a/xen/include/xen/event.h Wed Jun 15 13:24:58 2005 +++ b/xen/include/xen/event.h Wed Jun 15 13:24:58 2005 @@ -13,6 +13,7 @@ #include <xen/sched.h> #include <xen/smp.h> #include <asm/bitops.h> +#include <asm/event.h> /* * EVENT-CHANNEL NOTIFICATIONS @@ -34,6 +35,7 @@ { /* The VCPU pending flag must be set /after/ update to evtchn-pend. */ set_bit(0, &v->vcpu_info->evtchn_upcall_pending); + evtchn_notify(v); /* * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of [-- Attachment #3: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ia64 event channels 2005-06-15 19:29 ` [PATCH] " Matt Chapman @ 2005-06-15 20:15 ` Arun Sharma 0 siblings, 0 replies; 5+ messages in thread From: Arun Sharma @ 2005-06-15 20:15 UTC (permalink / raw) To: Matt Chapman; +Cc: Ling, Xiaofeng, xen-devel Matt Chapman wrote: > This patch adds an architecture-specific hook function for event > delivery, which does any necessary actions to notify the recipient, > e.g. pending an IRQ. We plan to use this on IA64, I imagine it > will be useful for VT-x domains as well. Looks good to me. -Arun ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-06-15 20:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-14 20:32 ia64 event channels Matt Chapman
[not found] ` <mailman.1118781182.16413@unix-os.sc.intel.com>
2005-06-14 22:17 ` Arun Sharma
2005-06-15 0:50 ` Matt Chapman
2005-06-15 19:29 ` [PATCH] " Matt Chapman
2005-06-15 20:15 ` Arun Sharma
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.