aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hvm/vmx
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2013-04-18 11:34:49 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-18 11:34:49 +0200
commitd7dafa375bc13772e2e3274d975d544af4208939 (patch)
treecbcacbdd2d1e50965f5ce5cc729261fbe49ed3d8 /xen/include/asm-x86/hvm/vmx
parent1c0ac49b1d6c3d54fc1f75661742a988ca7cf255 (diff)
downloadxen-d7dafa375bc13772e2e3274d975d544af4208939.tar.gz
xen-d7dafa375bc13772e2e3274d975d544af4208939.tar.bz2
xen-d7dafa375bc13772e2e3274d975d544af4208939.zip
VMX: Add posted interrupt supporting
Add the supporting of using posted interrupt to deliver interrupt. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Reviewed-by: Jun Nakajima <jun.nakajima@intel.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (from a release perspective)
Diffstat (limited to 'xen/include/asm-x86/hvm/vmx')
-rw-r--r--xen/include/asm-x86/hvm/vmx/vmx.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index 7efe0f3c16..c33b9f9a7e 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -99,6 +99,31 @@ void vmx_update_exception_bitmap(struct vcpu *v);
void vmx_update_cpu_exec_control(struct vcpu *v);
void vmx_update_secondary_exec_control(struct vcpu *v);
+#define POSTED_INTR_ON 0
+static inline int pi_test_and_set_pir(int vector, struct pi_desc *pi_desc)
+{
+ return test_and_set_bit(vector, pi_desc->pir);
+}
+
+static inline int pi_test_and_set_on(struct pi_desc *pi_desc)
+{
+ return test_and_set_bit(POSTED_INTR_ON, &pi_desc->control);
+}
+
+static inline void pi_set_on(struct pi_desc *pi_desc)
+{
+ set_bit(POSTED_INTR_ON, &pi_desc->control);
+}
+
+static inline int pi_test_and_clear_on(struct pi_desc *pi_desc)
+{
+ return test_and_clear_bit(POSTED_INTR_ON, &pi_desc->control);
+}
+
+static inline unsigned long pi_get_pir(struct pi_desc *pi_desc, int group)
+{
+ return xchg(&pi_desc->pir[group], 0);
+}
/*
* Exit Reasons