ia64/xen-unstable

changeset 7339:ff7c5a791ed5

Backout incautious public/io header changes
author djm@kirby.fc.hp.com
date Fri Oct 21 13:58:39 2005 -0600 (2005-10-21)
parents 42cab8724273
children fdea4a967bc7
files xen/Rules.mk xen/arch/ia64/Rules.mk xen/include/public/io/ioreq.h xen/include/public/io/vmx_vlapic.h
line diff
     1.1 --- a/xen/Rules.mk	Fri Oct 14 21:09:43 2005 -0600
     1.2 +++ b/xen/Rules.mk	Fri Oct 21 13:58:39 2005 -0600
     1.3 @@ -47,7 +47,6 @@ test-gcc-flag = $(shell $(CC) -v --help 
     1.4  
     1.5  include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
     1.6  
     1.7 -CFLAGS += -D__HYPERVISOR__
     1.8  ifneq ($(debug),y)
     1.9  CFLAGS += -DNDEBUG
    1.10  ifeq ($(verbose),y)
     2.1 --- a/xen/arch/ia64/Rules.mk	Fri Oct 14 21:09:43 2005 -0600
     2.2 +++ b/xen/arch/ia64/Rules.mk	Fri Oct 21 13:58:39 2005 -0600
     2.3 @@ -24,7 +24,7 @@ CFLAGS  += -I$(BASEDIR)/include/asm-ia64
     2.4  	   -I$(BASEDIR)/include/asm-ia64/linux-null 			\
     2.5             -I$(BASEDIR)/arch/ia64/linux -I$(BASEDIR)/arch/ia64/linux-xen
     2.6  CFLAGS  += -Wno-pointer-arith -Wredundant-decls
     2.7 -CFLAGS  += -DIA64 -DXEN -DLINUX_2_6 -DV_IOSAPIC_READY
     2.8 +CFLAGS  += -DIA64 -DXEN -DLINUX_2_6
     2.9  CFLAGS	+= -ffixed-r13 -mfixed-range=f12-f15,f32-f127
    2.10  CFLAGS	+= -w -g
    2.11  ifeq ($(VALIDATE_VT),y)
     3.1 --- a/xen/include/public/io/ioreq.h	Fri Oct 14 21:09:43 2005 -0600
     3.2 +++ b/xen/include/public/io/ioreq.h	Fri Oct 21 13:58:39 2005 -0600
     3.3 @@ -29,18 +29,11 @@
     3.4  #define STATE_IORESP_READY      3
     3.5  #define STATE_IORESP_HOOK       4
     3.6  
     3.7 -#define IOREQ_TYPE_PIO		0	/* pio */
     3.8 -#define IOREQ_TYPE_COPY		1	/* mmio ops */
     3.9 -#define IOREQ_TYPE_AND		2
    3.10 -#define IOREQ_TYPE_OR		3
    3.11 -#define IOREQ_TYPE_XOR		4
    3.12 -
    3.13 -#ifdef __HYPERVISOR__
    3.14 -#include <public/io/vmx_vlapic.h>
    3.15 -#else
    3.16 -#include <xen/io/vmx_vlapic.h>
    3.17 -#endif
    3.18 -
    3.19 +#define IOREQ_TYPE_PIO  0 /* pio */
    3.20 +#define IOREQ_TYPE_COPY  1 /* mmio ops */
    3.21 +#define IOREQ_TYPE_AND  2
    3.22 +#define IOREQ_TYPE_OR  3
    3.23 +#define IOREQ_TYPE_XOR  4
    3.24  
    3.25  /*
    3.26   * VMExit dispatcher should cooperate with instruction decoder to
    3.27 @@ -48,35 +41,48 @@
    3.28   * virq 
    3.29   */
    3.30  typedef struct {
    3.31 -    u64     addr;               /*  physical address            */
    3.32 -    u64     size;               /*  size in bytes               */
    3.33 -    u64     count;		/*  for rep prefixes            */
    3.34 +    uint64_t addr;   /*  physical address            */
    3.35 +    uint64_t size;   /*  size in bytes               */
    3.36 +    uint64_t count;  /*  for rep prefixes            */
    3.37      union {
    3.38 -        u64     data;           /*  data                        */
    3.39 -        void    *pdata;         /*  pointer to data             */
    3.40 +        uint64_t data;           /*  data                        */
    3.41 +        void    *pdata;          /*  pointer to data             */
    3.42      } u;
    3.43 -    u8      state:4;
    3.44 -    u8      pdata_valid:1;	/* if 1, use pdata above        */
    3.45 -    u8      dir:1;		/*  1=read, 0=write             */
    3.46 -    u8      df:1;
    3.47 -    u8      type;		/* I/O type			*/
    3.48 +    uint8_t state:4;
    3.49 +    uint8_t pdata_valid:1; /* if 1, use pdata above  */
    3.50 +    uint8_t dir:1;   /*  1=read, 0=write             */
    3.51 +    uint8_t df:1;
    3.52 +    uint8_t type;    /* I/O type                     */
    3.53  } ioreq_t;
    3.54  
    3.55 +#define MAX_VECTOR    256
    3.56 +#define BITS_PER_BYTE   8
    3.57 +#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint64_t)))
    3.58 +
    3.59  typedef struct {
    3.60 -    u64   pic_intr[INTR_LEN];
    3.61 -    u64   pic_mask[INTR_LEN];
    3.62 -    int     eport; /* Event channel port */
    3.63 +    uint64_t pic_intr[INTR_LEN];
    3.64 +    uint64_t pic_mask[INTR_LEN];
    3.65 +    int      eport; /* Event channel port */
    3.66  } global_iodata_t;
    3.67  
    3.68  typedef struct {
    3.69 -    ioreq_t         vp_ioreq;
    3.70 -    vl_apic_info    apic_intr;
    3.71 +    ioreq_t       vp_ioreq;
    3.72 +    unsigned long vp_intr[INTR_LEN];
    3.73  } vcpu_iodata_t;
    3.74  
    3.75  typedef struct {
    3.76 -    int vcpu_number;
    3.77 -    global_iodata_t     sp_global;
    3.78 -    vcpu_iodata_t       vcpu_iodata[1];
    3.79 +    global_iodata_t sp_global;
    3.80 +    vcpu_iodata_t   vcpu_iodata[1];
    3.81  } shared_iopage_t;
    3.82  
    3.83  #endif /* _IOREQ_H_ */
    3.84 +
    3.85 +/*
    3.86 + * Local variables:
    3.87 + * mode: C
    3.88 + * c-set-style: "BSD"
    3.89 + * c-basic-offset: 4
    3.90 + * tab-width: 4
    3.91 + * indent-tabs-mode: nil
    3.92 + * End:
    3.93 + */
     4.1 --- a/xen/include/public/io/vmx_vlapic.h	Fri Oct 14 21:09:43 2005 -0600
     4.2 +++ b/xen/include/public/io/vmx_vlapic.h	Fri Oct 21 13:58:39 2005 -0600
     4.3 @@ -1,29 +1,67 @@
     4.4  #ifndef _VMX_VLAPIC_H
     4.5  #define _VMX_VLAPIC_H
     4.6  
     4.7 +/*
     4.8 +   We extended one bit for PIC type
     4.9 + */
    4.10  #define VLAPIC_DELIV_MODE_FIXED          0x0
    4.11  #define VLAPIC_DELIV_MODE_LPRI           0x1
    4.12  #define VLAPIC_DELIV_MODE_SMI            0x2
    4.13 -#define VLAPIC_DELIV_MODE_PMI            0x2
    4.14  #define VLAPIC_DELIV_MODE_NMI            0x4
    4.15  #define VLAPIC_DELIV_MODE_INIT           0x5
    4.16  #define VLAPIC_DELIV_MODE_STARTUP        0x6
    4.17  #define VLAPIC_DELIV_MODE_EXT            0x7
    4.18  #define VLAPIC_DELIV_MODE_MASK            0x8
    4.19  
    4.20 -#define MAX_VECTOR    256
    4.21 -#define BITS_PER_BYTE   8
    4.22 -#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
    4.23 -#define INTR_LEN_32        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u32)))
    4.24 +#define VLAPIC_MSG_LEVEL                4
    4.25 +
    4.26 +#define INTR_EXT   0
    4.27 +#define INTR_APIC   1
    4.28 +#define INTR_LAPIC  2
    4.29 +
    4.30 +#define VL_STATE_EOI    1
    4.31 +#define VL_STATE_EXT_LOCK   2
    4.32 +#define VL_STATE_MSG_LOCK   3
    4.33 +#define VL_STATE_EOI_LOCK   3
    4.34 +
    4.35 +#define VLOCAL_APIC_MAX_INTS             256
    4.36 +#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint64_t)))
    4.37 +#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint32_t)))
    4.38 +
    4.39 +struct vapic_bus_message{
    4.40 +   uint8_t   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
    4.41 +   uint8_t   level:1;        /* level or edge */
    4.42 +   uint8_t   trig_mod:1;    /* assert or disassert */
    4.43 +   uint8_t   reserved:2;
    4.44 +   uint8_t   vector;
    4.45 +};
    4.46  
    4.47  typedef struct {
    4.48 -    u32   vl_lapic_id;
    4.49 -    u32   vl_apr;
    4.50 -    u32   vl_logical_dest;
    4.51 -    u32   vl_dest_format;
    4.52 -    u32   vl_arb_id;
    4.53 -    u64   irr[INTR_LEN];
    4.54 -    u64   tmr[INTR_LEN];
    4.55 -}vl_apic_info;
    4.56 +    /* interrupt for PIC and ext type IOAPIC interrupt */
    4.57 +    uint64_t   vl_ext_intr[VLAPIC_INT_COUNT];
    4.58 +    uint64_t   vl_ext_intr_mask[VLAPIC_INT_COUNT];
    4.59 +    uint64_t   vl_apic_intr[VLAPIC_INT_COUNT];
    4.60 +    uint64_t   vl_apic_tmr[VLAPIC_INT_COUNT];
    4.61 +    uint64_t   vl_eoi[VLAPIC_INT_COUNT];
    4.62 +    uint32_t   vl_lapic_id;
    4.63 +    uint32_t   direct_intr;
    4.64 +    uint32_t   vl_apr;
    4.65 +    uint32_t   vl_logical_dest;
    4.66 +    uint32_t   vl_dest_format;
    4.67 +    uint32_t   vl_arb_id;
    4.68 +    uint32_t   vl_state;
    4.69 +    uint32_t   apic_msg_count;
    4.70 +    struct vapic_bus_message  vl_apic_msg[24];
    4.71 +} vlapic_info;
    4.72  
    4.73  #endif /* _VMX_VLAPIC_H_ */
    4.74 +
    4.75 +/*
    4.76 + * Local variables:
    4.77 + * mode: C
    4.78 + * c-set-style: "BSD"
    4.79 + * c-basic-offset: 4
    4.80 + * tab-width: 4
    4.81 + * indent-tabs-mode: nil
    4.82 + * End:
    4.83 + */