Skip to contentSkip to conversation

At what places is an event handler called besides a hypercall?

DISCUSSION Shu Wu 2 participants 3 messages Oct 22, 2009 – Oct 23, 2009

lore
Share & tools
lore

Shu Wu

author
#0 lore raw

Hi, folks. I'm puzzled when the event handler is called in xen. I've only found a pending check and an upcall at the end of each hypercall. And an event delivery will cause a schedule, but no calling to the handler. So it seems when a domain sends a event to the other, the handler of that domain won't be called until it makes a hypercall or check it itself. That sounds not so reasonable. Could anyone tell me the truth? Thanks!

Cheers,

Wu Shu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 6 lines · Shu Wu

Hi, folks. I'm puzzled when the event handler is called in xen. I've only found a pending check and an upcall at the end of each hypercall. And an event delivery will cause a schedule, but no calling to the handler. So it seems when a domain sends a event to the other, the handler of that domain won't be called until it makes a hypercall or check it itself. That sounds not so reasonable. Could anyone tell me the truth? Thanks!

Events are checked for on any return to guest context. If the event sender sees the receiver is running on another CPU, it sends an IPI, and on return to guest context from that IPI the receiving CPU will deliver the event to the receiving guest.

-- Keir

author
#2 lore raw

Yeah, I see it! Especially in the exception handler there is a call to test_all_events, which checks the event and calls the handler. All these will happen frequently. Thanks a lot!

2009/10/22 Keir Fraser <[email protected]>

Quoted 12 lines · Shu Wu
Quoted 3 lines

Hi, folks. I'm puzzled when the event handler is called in xen. I've only found a pending check and an upcall at the end of each hypercall. And an

event

Quoted 1 line

delivery will cause a schedule, but no calling to the handler. So it

seems

Quoted 1 line

when a domain sends a event to the other, the handler of that domain

won't be

Quoted 2 lines

called until it makes a hypercall or check it itself. That sounds not so reasonable. Could anyone tell me the truth? Thanks!

Quoted 9 lines

Events are checked for on any return to guest context. If the event sender sees the receiver is running on another CPU, it sends an IPI, and on return to guest context from that IPI the receiving CPU will deliver the event to the receiving guest.

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel