Skip to contentSkip to conversation

Allow for arch specific VIRQs

PATCH In review Tian, Kevin 2 participants 2 messages Apr 27, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow for arch specific VIRQs

Allow for arch specific virq definition.

IA64 arch defines some more percpu events, like perfmon and MCA (Machine Check Abort), which can be categorized into VIRQ type since generated by xen just like virtual timer. Though I've not tidy up more types to be really added, this patch first gives chance.

Signed-off-by Kevin Tian <[email protected]>

Thanks,
Kevin

Allow for arch specific virq definition.

IA64 arch defines some more percpu events, like perfmon and MCA (Machine Check Abort), which can be categorized into VIRQ type since generated by xen just like virtual timer. Though I've not tidy up more types to be really added, this patch first gives chance.

Signed-off-by Kevin Tian <[email protected]>

xen/include/public/xen.h +2 -1
diff -r 0eba4c6f04ff xen/include/public/xen.h
@@ -80,7 +80,8 @@
 #define VIRQ_TBUF       4  /* G. (DOM0) Trace buffer has records available.  */
 #define VIRQ_DEBUGGER   6  /* G. (DOM0) A domain has paused for debugging.   */
 #define VIRQ_XENOPROF   7  /* V. XenOprofile interrupt: new sample available */
-#define NR_VIRQS        8
+#define NR_BASE_VIRQS   8  /* Common VIRQs */
+#define NR_VIRQS        NR_BASE_VIRQS + NR_ARCH_VIRQS
 
 /*
  * MMU-UPDATE REQUESTS
xen/include/public/arch-ia64.h +4 -0
diff -r 0eba4c6f04ff xen/include/public/arch-ia64.h
@@ -28,6 +28,10 @@
 DEFINE_GUEST_HANDLE(long);
 DEFINE_GUEST_HANDLE(void);
 #endif
+
+/* Arch specific VIRQs definition */
+#define VIRQ_ITC        NR_BASE_VIRQS /* V. Virtual itc timer */
+#define NR_ARCH_VIRQS   1
 
 /* Maximum number of virtual CPUs in multi-processor guests. */
 /* WARNING: before changing this, check that shared_info fits on a page */
xen/include/public/arch-x86_32.h +3 -0
diff -r 0eba4c6f04ff xen/include/public/arch-x86_32.h
@@ -30,6 +30,9 @@
 DEFINE_GUEST_HANDLE(long);
 DEFINE_GUEST_HANDLE(void);
 #endif
+
+/* Arch specific VIRQs definition */
+#define NR_ARCH_VIRQS   0
 
 /*
  * SEGMENT DESCRIPTOR TABLES
xen/include/public/arch-x86_64.h +3 -0
diff -r 0eba4c6f04ff xen/include/public/arch-x86_64.h
@@ -30,6 +30,9 @@
 DEFINE_GUEST_HANDLE(long);
 DEFINE_GUEST_HANDLE(void);
 #endif
+
+/* Arch specific VIRQs definition */
+#define NR_ARCH_VIRQS   0
 
 /*
  * SEGMENT DESCRIPTOR TABLES

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

#1 lore raw
Quoted 7 lines · Kevin

Allow for arch specific virq definition.

IA64 arch defines some more percpu events, like perfmon and MCA (Machine Check Abort), which can be categorized into VIRQ type since generated by xen just like virtual timer. Though I've not tidy up more types to be really added, this patch first gives chance.

The way you've defined it makes it hard to add more base virqs (as that would shift the arch-specific virq numbers, which is unacceptable as they are visible to guests). How about doing as for hypercalls and define VIRQ_ARCH_0...VIRQ_ARCH_7 as virqs 16-23, say?

-- Keir