From 91e0c5f3dad47838cb2ecc1865ce789a0b7182b1 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Tue, 16 Oct 2007 11:51:30 -0700 Subject: xen: add batch completion callbacks This adds a mechanism to register a callback function to be called once a batch of hypercalls has been issued. This is typically used to unlock things which must remain locked until the hypercall has taken place. [ Stable folks: pre-req for 2.6.23 bugfix "xen: deal with stale cr3 values when unpinning pagetables" ] Signed-off-by: Jeremy Fitzhardinge Cc: Stable Kernel --- arch/x86/xen/multicalls.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/x86/xen/multicalls.h') diff --git a/arch/x86/xen/multicalls.h b/arch/x86/xen/multicalls.h index 5d96a5fa210c..8bae996d99a3 100644 --- a/arch/x86/xen/multicalls.h +++ b/arch/x86/xen/multicalls.h @@ -42,4 +42,7 @@ static inline void xen_mc_issue(unsigned mode) local_irq_restore(x86_read_percpu(xen_mc_irq_flags)); } +/* Set up a callback to be called when the current batch is flushed */ +void xen_mc_callback(void (*fn)(void *), void *data); + #endif /* _XEN_MULTICALLS_H */ -- cgit v1.2.2