ia64/xen-unstable
changeset 8135:37c09b20a896
Remove some vmx header files from Xen public interfaces.
They are not public.
Signed-off-by: Keir Fraser <keir@xensource.com>
They are not public.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Nov 30 12:51:24 2005 +0100 (2005-11-30) |
parents | 590915af8117 |
children | ff95b53bd39a |
files | xen/arch/x86/dm/i8259.c xen/arch/x86/dm/vmx_vioapic.c xen/arch/x86/vmx.c xen/arch/x86/vmx_intercept.c xen/arch/x86/vmx_io.c xen/include/asm-x86/vmx_platform.h xen/include/asm-x86/vmx_vpic.h xen/include/asm-x86/vmx_vpit.h |
line diff
1.1 --- a/xen/arch/x86/dm/i8259.c Wed Nov 30 12:32:16 2005 +0100 1.2 +++ b/xen/arch/x86/dm/i8259.c Wed Nov 30 12:51:24 2005 +0100 1.3 @@ -31,7 +31,7 @@ 1.4 #include <xen/sched.h> 1.5 #include <public/io/ioreq.h> 1.6 #include <asm/vmx.h> 1.7 -#include <public/io/vmx_vpic.h> 1.8 +#include <asm/vmx_vpic.h> 1.9 #include <asm/current.h> 1.10 #include <asm/vmx_vioapic.h> 1.11 #include <asm/vmx_vlapic.h>
2.1 --- a/xen/arch/x86/dm/vmx_vioapic.c Wed Nov 30 12:32:16 2005 +0100 2.2 +++ b/xen/arch/x86/dm/vmx_vioapic.c Wed Nov 30 12:51:24 2005 +0100 2.3 @@ -39,7 +39,7 @@ 2.4 #include <xen/sched.h> 2.5 #include <public/io/ioreq.h> 2.6 #include <asm/vmx.h> 2.7 -#include <public/io/vmx_vpic.h> 2.8 +#include <asm/vmx_vpic.h> 2.9 #include <asm/current.h> 2.10 2.11 static void ioapic_enable(vmx_vioapic_t *s, uint8_t enable)
3.1 --- a/xen/arch/x86/vmx.c Wed Nov 30 12:32:16 2005 +0100 3.2 +++ b/xen/arch/x86/vmx.c Wed Nov 30 12:51:24 2005 +0100 3.3 @@ -43,8 +43,8 @@ 3.4 #endif 3.5 #include <public/sched.h> 3.6 #include <public/io/ioreq.h> 3.7 -#include <public/io/vmx_vpic.h> 3.8 -#include <public/io/vmx_vlapic.h> 3.9 +#include <asm/vmx_vpic.h> 3.10 +#include <asm/vmx_vlapic.h> 3.11 3.12 int hvm_enabled; 3.13
4.1 --- a/xen/arch/x86/vmx_intercept.c Wed Nov 30 12:32:16 2005 +0100 4.2 +++ b/xen/arch/x86/vmx_intercept.c Wed Nov 30 12:51:24 2005 +0100 4.3 @@ -21,7 +21,7 @@ 4.4 #include <xen/types.h> 4.5 #include <asm/vmx.h> 4.6 #include <asm/vmx_platform.h> 4.7 -#include <asm/vmx_virpit.h> 4.8 +#include <asm/vmx_vpit.h> 4.9 #include <asm/vmx_intercept.h> 4.10 #include <asm/vmx_vlapic.h> 4.11 #include <public/io/ioreq.h>
5.1 --- a/xen/arch/x86/vmx_io.c Wed Nov 30 12:32:16 2005 +0100 5.2 +++ b/xen/arch/x86/vmx_io.c Wed Nov 30 12:51:24 2005 +0100 5.3 @@ -32,13 +32,12 @@ 5.4 #include <asm/vmx.h> 5.5 #include <asm/vmx_vmcs.h> 5.6 #include <asm/vmx_platform.h> 5.7 -#include <asm/vmx_virpit.h> 5.8 +#include <asm/vmx_vpit.h> 5.9 #include <asm/apic.h> 5.10 #include <asm/shadow.h> 5.11 - 5.12 +#include <asm/vmx_vpic.h> 5.13 #include <asm/vmx_vlapic.h> 5.14 #include <public/io/ioreq.h> 5.15 -#include <public/io/vmx_vpic.h> 5.16 5.17 #ifdef CONFIG_VMX 5.18 #if defined (__i386__)
6.1 --- a/xen/include/asm-x86/vmx_platform.h Wed Nov 30 12:32:16 2005 +0100 6.2 +++ b/xen/include/asm-x86/vmx_platform.h Wed Nov 30 12:51:24 2005 +0100 6.3 @@ -22,10 +22,10 @@ 6.4 6.5 #include <public/xen.h> 6.6 #include <asm/e820.h> 6.7 -#include <asm/vmx_virpit.h> 6.8 +#include <asm/vmx_vpit.h> 6.9 #include <asm/vmx_intercept.h> 6.10 #include <asm/vmx_vioapic.h> 6.11 -#include <public/io/vmx_vpic.h> 6.12 +#include <asm/vmx_vpic.h> 6.13 6.14 #define MAX_OPERAND_NUM 2 6.15
7.1 --- a/xen/include/asm-x86/vmx_virpit.h Wed Nov 30 12:32:16 2005 +0100 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,55 +0,0 @@ 7.4 -#ifndef _VMX_VIRPIT_H 7.5 -#define _VMX_VIRPIT_H 7.6 - 7.7 -#include <xen/config.h> 7.8 -#include <xen/init.h> 7.9 -#include <xen/lib.h> 7.10 -#include <xen/time.h> 7.11 -#include <xen/errno.h> 7.12 -#include <xen/ac_timer.h> 7.13 -#include <asm/vmx_vmcs.h> 7.14 -#include <public/io/vmx_vpic.h> 7.15 - 7.16 -#define PIT_FREQ 1193181 7.17 - 7.18 -#define LSByte 0 7.19 -#define MSByte 1 7.20 -#define LSByte_multiple 2 7.21 -#define MSByte_multiple 3 7.22 - 7.23 -struct vmx_virpit { 7.24 - /* for simulation of counter 0 in mode 2*/ 7.25 - u64 period_cycles; /* pit frequency in cpu cycles */ 7.26 - u64 inject_point; /* the time inject virt intr */ 7.27 - s_time_t scheduled; /* scheduled timer interrupt */ 7.28 - struct ac_timer pit_timer; /* periodic timer for mode 2*/ 7.29 - unsigned int channel; /* the pit channel, counter 0~2 */ 7.30 - unsigned int pending_intr_nr; /* the couner for pending timer interrupts */ 7.31 - u32 period; /* pit frequency in ns */ 7.32 - int first_injected; /* flag to prevent shadow window */ 7.33 - int ticking; /* indicating it is ticking */ 7.34 - 7.35 - /* virtual PIT state for handle related I/O */ 7.36 - int read_state; 7.37 - int count_LSB_latched; 7.38 - int count_MSB_latched; 7.39 - 7.40 - unsigned int count; /* the 16 bit channel count */ 7.41 - unsigned int init_val; /* the init value for the counter */ 7.42 -}; 7.43 - 7.44 -/* to hook the ioreq packet to get the PIT initializaiton info */ 7.45 -extern void vmx_hooks_assist(struct vcpu *v); 7.46 - 7.47 -static __inline__ s_time_t get_pit_scheduled( 7.48 - struct vcpu *v, 7.49 - struct vmx_virpit *vpit) 7.50 -{ 7.51 - if ( is_irq_enabled(v, 0) ) { 7.52 - return vpit->scheduled; 7.53 - } 7.54 - else 7.55 - return -1; 7.56 -} 7.57 - 7.58 -#endif /* _VMX_VIRPIT_H_ */
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/xen/include/asm-x86/vmx_vpic.h Wed Nov 30 12:51:24 2005 +0100 8.3 @@ -0,0 +1,85 @@ 8.4 +/* 8.5 + * QEMU System Emulator header 8.6 + * 8.7 + * Copyright (c) 2003 Fabrice Bellard 8.8 + * Copyright (c) 2005 Intel Corp 8.9 + * 8.10 + * Permission is hereby granted, free of charge, to any person obtaining a copy 8.11 + * of this software and associated documentation files (the "Software"), to deal 8.12 + * in the Software without restriction, including without limitation the rights 8.13 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8.14 + * copies of the Software, and to permit persons to whom the Software is 8.15 + * furnished to do so, subject to the following conditions: 8.16 + * 8.17 + * The above copyright notice and this permission notice shall be included in 8.18 + * all copies or substantial portions of the Software. 8.19 + * 8.20 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8.21 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8.22 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8.23 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8.24 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 8.25 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 8.26 + * THE SOFTWARE. 8.27 + */ 8.28 + 8.29 +#ifndef _VMX_VPIC_H 8.30 +#define _VMX_VPIC_H 8.31 + 8.32 +#define hw_error(x) do {} while (0); 8.33 + 8.34 + 8.35 +/* i8259.c */ 8.36 +typedef struct IOAPICState IOAPICState; 8.37 +typedef struct PicState { 8.38 + uint8_t last_irr; /* edge detection */ 8.39 + uint8_t irr; /* interrupt request register */ 8.40 + uint8_t imr; /* interrupt mask register */ 8.41 + uint8_t isr; /* interrupt service register */ 8.42 + uint8_t priority_add; /* highest irq priority */ 8.43 + uint8_t irq_base; 8.44 + uint8_t read_reg_select; 8.45 + uint8_t poll; 8.46 + uint8_t special_mask; 8.47 + uint8_t init_state; 8.48 + uint8_t auto_eoi; 8.49 + uint8_t rotate_on_auto_eoi; 8.50 + uint8_t special_fully_nested_mode; 8.51 + uint8_t init4; /* true if 4 byte init */ 8.52 + uint8_t elcr; /* PIIX edge/trigger selection*/ 8.53 + uint8_t elcr_mask; 8.54 + struct vmx_virpic *pics_state; 8.55 +} PicState; 8.56 + 8.57 +struct vmx_virpic { 8.58 + /* 0 is master pic, 1 is slave pic */ 8.59 + /* XXX: better separation between the two pics */ 8.60 + PicState pics[2]; 8.61 + void (*irq_request)(int *opaque, int level); 8.62 + void *irq_request_opaque; 8.63 + /* IOAPIC callback support */ 8.64 + void (*alt_irq_func)(void *opaque, int irq_num, int level); 8.65 + void *alt_irq_opaque; 8.66 +}; 8.67 + 8.68 + 8.69 +void pic_set_irq(struct vmx_virpic *s, int irq, int level); 8.70 +void pic_set_irq_new(void *opaque, int irq, int level); 8.71 +void pic_init(struct vmx_virpic *s, 8.72 + void (*irq_request)(), 8.73 + void *irq_request_opaque); 8.74 +void pic_set_alt_irq_func(struct vmx_virpic *s, 8.75 + void(*alt_irq_func)(), 8.76 + void *alt_irq_opaque); 8.77 +int pic_read_irq(struct vmx_virpic *s); 8.78 +void pic_update_irq(struct vmx_virpic *s); 8.79 +uint32_t pic_intack_read(struct vmx_virpic *s); 8.80 +void register_pic_io_hook (void); 8.81 +int cpu_get_pic_interrupt(struct vcpu *v, int *type); 8.82 +int is_pit_irq(struct vcpu *v, int irq, int type); 8.83 +int is_irq_enabled(struct vcpu *v, int irq); 8.84 +void do_pic_irqs (struct vmx_virpic *s, uint16_t irqs); 8.85 +void do_pic_irqs_clear (struct vmx_virpic *s, uint16_t irqs); 8.86 + 8.87 +/* APIC */ 8.88 +#endif /* _VMX_VPIC_H */
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/xen/include/asm-x86/vmx_vpit.h Wed Nov 30 12:51:24 2005 +0100 9.3 @@ -0,0 +1,55 @@ 9.4 +#ifndef _VMX_VIRPIT_H 9.5 +#define _VMX_VIRPIT_H 9.6 + 9.7 +#include <xen/config.h> 9.8 +#include <xen/init.h> 9.9 +#include <xen/lib.h> 9.10 +#include <xen/time.h> 9.11 +#include <xen/errno.h> 9.12 +#include <xen/ac_timer.h> 9.13 +#include <asm/vmx_vmcs.h> 9.14 +#include <asm/vmx_vpic.h> 9.15 + 9.16 +#define PIT_FREQ 1193181 9.17 + 9.18 +#define LSByte 0 9.19 +#define MSByte 1 9.20 +#define LSByte_multiple 2 9.21 +#define MSByte_multiple 3 9.22 + 9.23 +struct vmx_virpit { 9.24 + /* for simulation of counter 0 in mode 2*/ 9.25 + u64 period_cycles; /* pit frequency in cpu cycles */ 9.26 + u64 inject_point; /* the time inject virt intr */ 9.27 + s_time_t scheduled; /* scheduled timer interrupt */ 9.28 + struct ac_timer pit_timer; /* periodic timer for mode 2*/ 9.29 + unsigned int channel; /* the pit channel, counter 0~2 */ 9.30 + unsigned int pending_intr_nr; /* the couner for pending timer interrupts */ 9.31 + u32 period; /* pit frequency in ns */ 9.32 + int first_injected; /* flag to prevent shadow window */ 9.33 + int ticking; /* indicating it is ticking */ 9.34 + 9.35 + /* virtual PIT state for handle related I/O */ 9.36 + int read_state; 9.37 + int count_LSB_latched; 9.38 + int count_MSB_latched; 9.39 + 9.40 + unsigned int count; /* the 16 bit channel count */ 9.41 + unsigned int init_val; /* the init value for the counter */ 9.42 +}; 9.43 + 9.44 +/* to hook the ioreq packet to get the PIT initializaiton info */ 9.45 +extern void vmx_hooks_assist(struct vcpu *v); 9.46 + 9.47 +static __inline__ s_time_t get_pit_scheduled( 9.48 + struct vcpu *v, 9.49 + struct vmx_virpit *vpit) 9.50 +{ 9.51 + if ( is_irq_enabled(v, 0) ) { 9.52 + return vpit->scheduled; 9.53 + } 9.54 + else 9.55 + return -1; 9.56 +} 9.57 + 9.58 +#endif /* _VMX_VIRPIT_H_ */
10.1 --- a/xen/include/public/io/vmx_vlapic.h Wed Nov 30 12:32:16 2005 +0100 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,58 +0,0 @@ 10.4 -#ifndef _VMX_VLAPIC_H 10.5 -#define _VMX_VLAPIC_H 10.6 - 10.7 -/* 10.8 - We extended one bit for PIC type 10.9 - */ 10.10 -#define VLAPIC_DELIV_MODE_FIXED 0x0 10.11 -#define VLAPIC_DELIV_MODE_LPRI 0x1 10.12 -#define VLAPIC_DELIV_MODE_SMI 0x2 10.13 -#define VLAPIC_DELIV_MODE_NMI 0x4 10.14 -#define VLAPIC_DELIV_MODE_INIT 0x5 10.15 -#define VLAPIC_DELIV_MODE_STARTUP 0x6 10.16 -#define VLAPIC_DELIV_MODE_EXT 0x7 10.17 -#define VLAPIC_DELIV_MODE_MASK 0x8 10.18 - 10.19 -#define VLAPIC_MSG_LEVEL 4 10.20 - 10.21 -#define INTR_EXT 0 10.22 -#define INTR_APIC 1 10.23 -#define INTR_LAPIC 2 10.24 - 10.25 -#define VL_STATE_EOI 1 10.26 -#define VL_STATE_EXT_LOCK 2 10.27 -#define VL_STATE_MSG_LOCK 3 10.28 -#define VL_STATE_EOI_LOCK 3 10.29 - 10.30 -#define VLOCAL_APIC_MAX_INTS 256 10.31 -#define VLAPIC_INT_COUNT (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint64_t))) 10.32 -#define VLAPIC_INT_COUNT_32 (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint32_t))) 10.33 - 10.34 -typedef struct { 10.35 - /* interrupt for PIC and ext type IOAPIC interrupt */ 10.36 - uint64_t vl_ext_intr[VLAPIC_INT_COUNT]; 10.37 - uint64_t vl_ext_intr_mask[VLAPIC_INT_COUNT]; 10.38 - uint64_t vl_apic_intr[VLAPIC_INT_COUNT]; 10.39 - uint64_t vl_apic_tmr[VLAPIC_INT_COUNT]; 10.40 - uint64_t vl_eoi[VLAPIC_INT_COUNT]; 10.41 - uint32_t vl_lapic_id; 10.42 - uint32_t direct_intr; 10.43 - uint32_t vl_apr; 10.44 - uint32_t vl_logical_dest; 10.45 - uint32_t vl_dest_format; 10.46 - uint32_t vl_arb_id; 10.47 - uint32_t vl_state; 10.48 - uint32_t apic_msg_count; 10.49 -} vlapic_info; 10.50 - 10.51 -#endif /* _VMX_VLAPIC_H_ */ 10.52 - 10.53 -/* 10.54 - * Local variables: 10.55 - * mode: C 10.56 - * c-set-style: "BSD" 10.57 - * c-basic-offset: 4 10.58 - * tab-width: 4 10.59 - * indent-tabs-mode: nil 10.60 - * End: 10.61 - */
11.1 --- a/xen/include/public/io/vmx_vpic.h Wed Nov 30 12:32:16 2005 +0100 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,85 +0,0 @@ 11.4 -/* 11.5 - * QEMU System Emulator header 11.6 - * 11.7 - * Copyright (c) 2003 Fabrice Bellard 11.8 - * Copyright (c) 2005 Intel Corp 11.9 - * 11.10 - * Permission is hereby granted, free of charge, to any person obtaining a copy 11.11 - * of this software and associated documentation files (the "Software"), to deal 11.12 - * in the Software without restriction, including without limitation the rights 11.13 - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11.14 - * copies of the Software, and to permit persons to whom the Software is 11.15 - * furnished to do so, subject to the following conditions: 11.16 - * 11.17 - * The above copyright notice and this permission notice shall be included in 11.18 - * all copies or substantial portions of the Software. 11.19 - * 11.20 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 11.21 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 11.22 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 11.23 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 11.24 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 11.25 - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 11.26 - * THE SOFTWARE. 11.27 - */ 11.28 - 11.29 -#ifndef _VMX_VPIC_H 11.30 -#define _VMX_VPIC_H 11.31 - 11.32 -#define hw_error(x) do {} while (0); 11.33 - 11.34 - 11.35 -/* i8259.c */ 11.36 -typedef struct IOAPICState IOAPICState; 11.37 -typedef struct PicState { 11.38 - uint8_t last_irr; /* edge detection */ 11.39 - uint8_t irr; /* interrupt request register */ 11.40 - uint8_t imr; /* interrupt mask register */ 11.41 - uint8_t isr; /* interrupt service register */ 11.42 - uint8_t priority_add; /* highest irq priority */ 11.43 - uint8_t irq_base; 11.44 - uint8_t read_reg_select; 11.45 - uint8_t poll; 11.46 - uint8_t special_mask; 11.47 - uint8_t init_state; 11.48 - uint8_t auto_eoi; 11.49 - uint8_t rotate_on_auto_eoi; 11.50 - uint8_t special_fully_nested_mode; 11.51 - uint8_t init4; /* true if 4 byte init */ 11.52 - uint8_t elcr; /* PIIX edge/trigger selection*/ 11.53 - uint8_t elcr_mask; 11.54 - struct vmx_virpic *pics_state; 11.55 -} PicState; 11.56 - 11.57 -struct vmx_virpic { 11.58 - /* 0 is master pic, 1 is slave pic */ 11.59 - /* XXX: better separation between the two pics */ 11.60 - PicState pics[2]; 11.61 - void (*irq_request)(int *opaque, int level); 11.62 - void *irq_request_opaque; 11.63 - /* IOAPIC callback support */ 11.64 - void (*alt_irq_func)(void *opaque, int irq_num, int level); 11.65 - void *alt_irq_opaque; 11.66 -}; 11.67 - 11.68 - 11.69 -void pic_set_irq(struct vmx_virpic *s, int irq, int level); 11.70 -void pic_set_irq_new(void *opaque, int irq, int level); 11.71 -void pic_init(struct vmx_virpic *s, 11.72 - void (*irq_request)(), 11.73 - void *irq_request_opaque); 11.74 -void pic_set_alt_irq_func(struct vmx_virpic *s, 11.75 - void(*alt_irq_func)(), 11.76 - void *alt_irq_opaque); 11.77 -int pic_read_irq(struct vmx_virpic *s); 11.78 -void pic_update_irq(struct vmx_virpic *s); 11.79 -uint32_t pic_intack_read(struct vmx_virpic *s); 11.80 -void register_pic_io_hook (void); 11.81 -int cpu_get_pic_interrupt(struct vcpu *v, int *type); 11.82 -int is_pit_irq(struct vcpu *v, int irq, int type); 11.83 -int is_irq_enabled(struct vcpu *v, int irq); 11.84 -void do_pic_irqs (struct vmx_virpic *s, uint16_t irqs); 11.85 -void do_pic_irqs_clear (struct vmx_virpic *s, uint16_t irqs); 11.86 - 11.87 -/* APIC */ 11.88 -#endif /* _VMX_VPIC_H */