Skip to contentSkip to conversation

How to mask an event channel?

DISCUSSION 吴佳民 2 participants 2 messages Jun 24, 2008

lore
Share & tools
lore

吴佳民

author
#0 lore raw

In <Xen In seterface Manual>, chapter 5 Event Channels, they say that:"Event Notifications can be masked by setting a flag; this is equivalent to disabling interrupts and can be used to ensure atomicity of certain operation in the guest kernel".

My question is :
I know that we can use 'xc_evtchn_unmask(xcehandle, port)' to unmask an event channel , but I can not find the function used to mask an event channel. Can any body solve the problem?
Thanks a lot.
Danius Wu
===============================================

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

#1 lore raw
Quoted 10 lines

In <Xen In seterface Manual>, chapter 5 Event Channels, they say
that:"Event Notifications can be masked by setting a flag; this is equivalent to disabling interrupts and can be used to ensure atomicity of certain operation in the guest kernel".

My question is :
I know that we can use 'xc_evtchn_unmask(xcehandle, port)' to unmask an event channel , but I can not find the function used to mask an event channel.
Can any body solve the problem?

You are looking on the userspace tools if you found the xc_ unmask. I don't think there is the corresponding mask function there too, as there was no need for it in the limited use of event channels that the tools make.
You can find Linux mask/unmask functions in linux-2.6.18-xen.hg/drivers/xen/core/evtchn.c though. Depending on your needs you can add a new ioctl to evtchn_ioctl in linux-2.6.18-xen.hg/drivers/xen/evtchn/evtchn.c and export it to userspace that way.

Cheers
Gr(z)egor(z)