Skip to contentSkip to conversation

add callback irq in vmx_platform

PATCH New Xiaofeng Ling 1 participant 1 message Sep 5, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 3/6 add callback irq in vmx_platform

Add a callback irq member in domain->arch.vmx_platform. This irq is used to inject event to vmx guest.

xen/arch/x86/domain.c +1 -0
diff -r 287d36b46fa3 xen/arch/x86/domain.c
@@ -266,6 +266,7 @@
     v->arch.perdomain_ptes[FIRST_RESERVED_GDT_PAGE] =
         l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR);
 
+    v->domain->arch.vmx_platform.callback_irq = 0;
     v->arch.guest_vtable  = __linear_l2_table;
     v->arch.shadow_vtable = __shadow_linear_l2_table;
 
xen/include/public/xen.h +10 -0
diff -r 287d36b46fa3 xen/include/public/xen.h
@@ -59,6 +60,7 @@
 #define __HYPERVISOR_set_segment_base     25 /* x86/64 only */
 #define __HYPERVISOR_mmuext_op            26
 #define __HYPERVISOR_acm_op               27
+#define __HYPERVISOR_virtual_device_op    28	
 
 /*
  * VIRTUAL INTERRUPTS
@@ -233,6 +235,14 @@
 #define VMASST_TYPE_4gb_segments_notify  1
 #define VMASST_TYPE_writable_pagetables  2
 #define MAX_VMASST_TYPE 2
+
+/*
+ * Commands to HYPERVISOR_virtual_device_op().
+ */
+
+#define SET_CALLBACK_IRQ    1
+#define SET_SHARE_PARAM_MAP 2
+
 
 #ifndef __ASSEMBLY__
 
@@ -319,6 +329,7 @@
     u8 evtchn_upcall_pending;
     u8 evtchn_upcall_mask;
     u32 evtchn_pending_sel;
+    u16 callback_mask;
 #ifdef __ARCH_HAS_VCPU_INFO
     arch_vcpu_info_t arch;
 #endif
xen/include/asm-x86/vmx_platform.h +2 -0
diff -r 287d36b46fa3 xen/include/asm-x86/vmx_platform.h
@@ -83,6 +83,8 @@
     struct vmx_virpit_t    vmx_pit;
     struct vmx_handler_t   vmx_handler;
     struct mi_per_cpu_info mpci;            /* MMIO */
+    unsigned int callback_irq;              /* irq for para-driver*/
+
 };