|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Please check ia64 patch for core files to be affected
As part of a general cleanup/bug-fix patch, I've got
the following changes to core files included in the
next round of ia64 changes. Since these are VT-related
and may affect x86 VT, I wanted to post them for
general xen-devel review first.
Jun, Keir, others -- If you have any problems/concerns
with these please let me know and I will remove them
from the ia64 tree before asking for the next pull
from the ia64 tree.
Thanks,
Dan
============
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by Anthony Xu <anthony.xu@xxxxxxxxx>
diff -r 54b112b314fe -r a88955bbbc90 xen/Rules.mk
--- a/xen/Rules.mk Wed Oct 12 23:12:59 2005
+++ b/xen/Rules.mk Thu Oct 13 08:59:03 2005
@@ -47,6 +47,7 @@
include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
+CFLAGS += -D__HYPERVISOR__
ifneq ($(debug),y)
CFLAGS += -DNDEBUG
ifeq ($(verbose),y)
diff -r 54b112b314fe -r a88955bbbc90 xen/include/public/io/ioreq.h
--- a/xen/include/public/io/ioreq.h Wed Oct 12 23:12:59 2005
+++ b/xen/include/public/io/ioreq.h Thu Oct 13 08:59:03 2005
@@ -35,6 +35,13 @@
#define IOREQ_TYPE_OR 3
#define IOREQ_TYPE_XOR 4
+#ifdef __HYPERVISOR__
+#include <public/io/vmx_vlapic.h>
+#else
+#include <xen/io/vmx_vlapic.h>
+#endif
+
+
/*
* VMExit dispatcher should cooperate with instruction decoder to
* prepare this structure and notify service OS and DM by sending
@@ -55,10 +62,6 @@
u8 type; /* I/O type */
} ioreq_t;
-#define MAX_VECTOR 256
-#define BITS_PER_BYTE 8
-#define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
-
typedef struct {
u64 pic_intr[INTR_LEN];
u64 pic_mask[INTR_LEN];
@@ -67,10 +70,11 @@
typedef struct {
ioreq_t vp_ioreq;
- unsigned long vp_intr[INTR_LEN];
+ vl_apic_info apic_intr;
} vcpu_iodata_t;
typedef struct {
+ int vcpu_number;
global_iodata_t sp_global;
vcpu_iodata_t vcpu_iodata[1];
} shared_iopage_t;
diff -r 54b112b314fe -r a88955bbbc90 xen/include/public/io/vmx_vlapic.h
--- a/xen/include/public/io/vmx_vlapic.h Wed Oct 12 23:12:59 2005
+++ b/xen/include/public/io/vmx_vlapic.h Thu Oct 13 08:59:03 2005
@@ -1,57 +1,29 @@
#ifndef _VMX_VLAPIC_H
#define _VMX_VLAPIC_H
-/*
- We extended one bit for PIC type
- */
#define VLAPIC_DELIV_MODE_FIXED 0x0
#define VLAPIC_DELIV_MODE_LPRI 0x1
#define VLAPIC_DELIV_MODE_SMI 0x2
+#define VLAPIC_DELIV_MODE_PMI 0x2
#define VLAPIC_DELIV_MODE_NMI 0x4
#define VLAPIC_DELIV_MODE_INIT 0x5
#define VLAPIC_DELIV_MODE_STARTUP 0x6
#define VLAPIC_DELIV_MODE_EXT 0x7
#define VLAPIC_DELIV_MODE_MASK 0x8
-#define VLAPIC_MSG_LEVEL 4
-
-#define INTR_EXT 0
-#define INTR_APIC 1
-#define INTR_LAPIC 2
-
-#define VL_STATE_EOI 1
-#define VL_STATE_EXT_LOCK 2
-#define VL_STATE_MSG_LOCK 3
-#define VL_STATE_EOI_LOCK 3
-
-#define VLOCAL_APIC_MAX_INTS 256
-#define VLAPIC_INT_COUNT
(VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u64)))
-#define VLAPIC_INT_COUNT_32
(VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u32)))
-
-struct vapic_bus_message{
- u8 deliv_mode:4; /* deliver mode, including fixed, LPRI, etc */
- u8 level:1; /* level or edge */
- u8 trig_mod:1; /* assert or disassert */
- u8 reserved:2;
- u8 vector;
-};
+#define MAX_VECTOR 256
+#define BITS_PER_BYTE 8
+#define INTR_LEN (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
+#define INTR_LEN_32 (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u32)))
typedef struct {
- /* interrupt for PIC and ext type IOAPIC interrupt */
- u64 vl_ext_intr[VLAPIC_INT_COUNT];
- u64 vl_ext_intr_mask[VLAPIC_INT_COUNT];
- u64 vl_apic_intr[VLAPIC_INT_COUNT];
- u64 vl_apic_tmr[VLAPIC_INT_COUNT];
- u64 vl_eoi[VLAPIC_INT_COUNT];
u32 vl_lapic_id;
- u32 direct_intr;
u32 vl_apr;
u32 vl_logical_dest;
u32 vl_dest_format;
u32 vl_arb_id;
- u32 vl_state;
- u32 apic_msg_count;
- struct vapic_bus_message vl_apic_msg[24];
-} vlapic_info;
+ u64 irr[INTR_LEN];
+ u64 tmr[INTR_LEN];
+}vl_apic_info;
#endif /* _VMX_VLAPIC_H_ */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Please check ia64 patch for core files to be affected,
Magenheimer, Dan (HP Labs Fort Collins) <=
|
|
|
|
|