From: Jack Lange Date: Thu, 2 Oct 2008 22:05:59 +0000 (-0500) Subject: Merge branch 'ramdisk' into devel X-Git-Tag: 1.0~3^2~17 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=7617d3cee4bd93b90558206b1bb1681c07f0396a;hp=6eecf583b522147ef13faabb634562f6f23bb712;p=palacios.git Merge branch 'ramdisk' into devel Conflicts: palacios/include/devices/generic.h palacios/include/geekos/timer.h palacios/include/palacios/vmcs.h palacios/include/palacios/vmcs_gen.h palacios/src/devices/generic.c palacios/src/palacios/vmm_config.c --- diff --git a/palacios/include/devices/generic.h b/palacios/include/devices/generic.h index e2b4396..7a43e81 100644 --- a/palacios/include/devices/generic.h +++ b/palacios/include/devices/generic.h @@ -5,6 +5,7 @@ #ifndef __GENERIC_H__ #define __GENERIC_H__ + #include // diff --git a/palacios/include/geekos/timer.h b/palacios/include/geekos/timer.h index b9f4eb4..f6add16 100644 --- a/palacios/include/geekos/timer.h +++ b/palacios/include/geekos/timer.h @@ -36,6 +36,7 @@ int Start_Timer_Secs(int seconds, timerCallback cb, void * arg); int Start_Timer_MSecs(int msecs, timerCallback cb, void * arg); int Start_Timer(int ticks, timerCallback, void * arg); + double Get_Remaining_Timer_Secs(int id); int Get_Remaining_Timer_MSecs(int id); int Get_Remaining_Timer_Ticks(int id); diff --git a/palacios/include/palacios/svm.h b/palacios/include/palacios/svm.h index 22cb157..6a7f230 100644 --- a/palacios/include/palacios/svm.h +++ b/palacios/include/palacios/svm.h @@ -6,11 +6,13 @@ #define __SVM_H -#include #ifdef __V3VEE__ +#include + + #include #include @@ -62,12 +64,12 @@ #define SVM_HANDLER_ERROR 0x1 #define SVM_HANDLER_HALT 0x2 -#endif void Init_SVM(struct vmm_ctrl_ops * vmm_ops); int is_svm_capable(); +#endif diff --git a/palacios/include/palacios/vm_dev.h b/palacios/include/palacios/vm_dev.h index cae6f1f..795a3d1 100644 --- a/palacios/include/palacios/vm_dev.h +++ b/palacios/include/palacios/vm_dev.h @@ -4,6 +4,8 @@ #ifndef __VM_DEV_H #define __VM_DEV_H +#ifdef __V3VEE__ + #include #include #include @@ -83,4 +85,7 @@ int dev_hook_irq(struct vm_device * dev, int dev_unhook_irq(struct vm_device * dev, uint_t irq); + +#endif // ! __V3VEE__ + #endif diff --git a/palacios/include/palacios/vm_guest.h b/palacios/include/palacios/vm_guest.h index 5b37d8f..8bdf0c0 100644 --- a/palacios/include/palacios/vm_guest.h +++ b/palacios/include/palacios/vm_guest.h @@ -157,7 +157,7 @@ void PrintV3Segments(struct guest_info * info); void PrintV3CtrlRegs(struct guest_info * info); void PrintV3GPRs(struct guest_info * info); -#endif +#endif // ! __V3VEE__ diff --git a/palacios/include/palacios/vm_guest_mem.h b/palacios/include/palacios/vm_guest_mem.h index 4f17c5b..bc1a288 100644 --- a/palacios/include/palacios/vm_guest_mem.h +++ b/palacios/include/palacios/vm_guest_mem.h @@ -4,6 +4,9 @@ #ifndef __VM_GUEST_MEM_H #define __VM_GUEST_MEM_H + +#ifdef __V3VEE__ + #include #include @@ -92,7 +95,7 @@ int write_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int c // TODO int write_guest_va_memory(struct guest_info * guest_info, addr_t guest_va, int count, char * src); - +#endif // ! __V3VEE__ #endif diff --git a/palacios/include/palacios/vmcs.h b/palacios/include/palacios/vmcs.h index 01d6ba2..8851bae 100644 --- a/palacios/include/palacios/vmcs.h +++ b/palacios/include/palacios/vmcs.h @@ -2,8 +2,12 @@ /* (c) 2008, Jack Lange */ /* (c) 2008, The V3VEE Project */ -#ifndef __VMCS_H -#define __VMCS_H + +#ifndef __VMCS_H__ +#define __VMCS_H__ + +#ifdef __V3VEE__ + #include @@ -582,4 +586,7 @@ extern uint_t VMCS_READ(); #include +#endif // ! __V3VEE__ + + #endif diff --git a/palacios/include/palacios/vmcs_gen.h b/palacios/include/palacios/vmcs_gen.h index 467ae78..fa941b4 100644 --- a/palacios/include/palacios/vmcs_gen.h +++ b/palacios/include/palacios/vmcs_gen.h @@ -1,8 +1,10 @@ /* (c) 2008, The V3VEE Project */ +#ifndef __VMCS_GEN__ +#define __VMCS_GEN__ + +#ifdef __V3VEE__ -#ifndef vmcs_gen -#define vmcs_gen #include #include @@ -780,4 +782,11 @@ uint_t Get_HOST_RIP(); void PrintTrace_HOST_RIP(); void PrintTrace_VMCS_ALL(); + + +#endif // !__V3VEE + #endif + + + diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 4d725d1..c648692 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -174,10 +174,10 @@ struct vmm_intr_state { // This is the value given when the interrupt is hooked. // This will never be NULL - void *opaque; + void * opaque; }; -void deliver_interrupt_to_vmm(struct vmm_intr_state *state); +void deliver_interrupt_to_vmm(struct vmm_intr_state * state); /* This will contain function pointers that provide OS services */ diff --git a/palacios/include/palacios/vmm_config.h b/palacios/include/palacios/vmm_config.h index 1b41387..5072ef9 100644 --- a/palacios/include/palacios/vmm_config.h +++ b/palacios/include/palacios/vmm_config.h @@ -7,6 +7,7 @@ #ifdef __V3VEE__ + #include diff --git a/palacios/include/palacios/vmm_ctrl_regs.h b/palacios/include/palacios/vmm_ctrl_regs.h index 96d5d16..1c61613 100644 --- a/palacios/include/palacios/vmm_ctrl_regs.h +++ b/palacios/include/palacios/vmm_ctrl_regs.h @@ -4,6 +4,8 @@ #ifndef __VMM_CTRL_REGS_H #define __VMM_CTRL_REGS_H +#ifdef __V3VEE__ + #include @@ -189,9 +191,7 @@ int handle_cr3_write(struct guest_info * info); int handle_cr3_read(struct guest_info * info); -#define CR3_32_SAME_BASE(source1,source2) ((source1)->pdt_base_addr == (source2)->pdt_base_addr) -#define CR3_32_COPY_FLAGS(source,dest) do { (dest)->rsvd1=(source)->rsvd1; (dest)->pwt=(source)->pwt; (dest)->pcd=(source)->pcd; } while (0) -#define CR3_32_COPY_BASE(source,dest) do { (dest)->pdt_base_addr = (source)->pdt_base_addr; } while (0) +#endif // ! __V3VEE__ #endif diff --git a/palacios/include/palacios/vmm_debug.h b/palacios/include/palacios/vmm_debug.h index 5424ab7..9718f74 100644 --- a/palacios/include/palacios/vmm_debug.h +++ b/palacios/include/palacios/vmm_debug.h @@ -6,6 +6,7 @@ #ifdef __V3VEE__ + #include struct dbg_bp32 { diff --git a/palacios/include/palacios/vmm_list.h b/palacios/include/palacios/vmm_list.h index 9bcf7f8..9fc2e5c 100644 --- a/palacios/include/palacios/vmm_list.h +++ b/palacios/include/palacios/vmm_list.h @@ -6,8 +6,8 @@ #ifndef _VMM_LIST_H #define _VMM_LIST_H -// JRL FIXME -// #ifdef __V3VEE__ + +#ifdef __V3VEE__ #include @@ -533,7 +533,7 @@ static inline void hlist_add_after(struct hlist_node *n, pos = n) -// JRL FIXME -//#endif // ! __V3VEE__ + +#endif // ! __V3VEE__ #endif diff --git a/palacios/include/palacios/vmm_paging.h b/palacios/include/palacios/vmm_paging.h index e11a452..7b6836b 100644 --- a/palacios/include/palacios/vmm_paging.h +++ b/palacios/include/palacios/vmm_paging.h @@ -5,6 +5,8 @@ #define __VMM_PAGING_H +#ifdef __V3VEE__ + #include #include @@ -71,7 +73,7 @@ the host state in the vmcs before entering the guest. */ -#ifdef __V3VEE__ + #define MAX_PTE32_ENTRIES 1024 #define MAX_PDE32_ENTRIES 1024 diff --git a/palacios/include/palacios/vmm_time.h b/palacios/include/palacios/vmm_time.h index ccc7775..3cbd2ed 100644 --- a/palacios/include/palacios/vmm_time.h +++ b/palacios/include/palacios/vmm_time.h @@ -4,6 +4,7 @@ #ifndef __VMM_TIME_H #define __VMM_TIME_H +#ifdef __V3VEE__ #include #include @@ -28,7 +29,7 @@ struct vm_time { }; -#ifdef __V3VEE__ + struct vm_timer_ops { void (*update_time)(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data); diff --git a/palacios/include/palacios/vmm_types.h b/palacios/include/palacios/vmm_types.h index 6f1aade..504b520 100644 --- a/palacios/include/palacios/vmm_types.h +++ b/palacios/include/palacios/vmm_types.h @@ -46,6 +46,8 @@ typedef char sint8_t; typedef ulong_t addr_t; +#endif // ! __V3VEE__ + #endif #endif diff --git a/palacios/include/palacios/vmx.h b/palacios/include/palacios/vmx.h index 3b40784..91f13a8 100644 --- a/palacios/include/palacios/vmx.h +++ b/palacios/include/palacios/vmx.h @@ -5,6 +5,8 @@ #ifndef __VMX_H #define __VMX_H +#ifdef __V3VEE__ + #include #include @@ -112,6 +114,6 @@ int VMLaunch(struct VMDescriptor *vm); int Do_VMM(struct VMXRegs regs); - +#endif // ! __V3VEE__ #endif diff --git a/palacios/src/devices/generic.c b/palacios/src/devices/generic.c index 905a9a7..dc018ab 100644 --- a/palacios/src/devices/generic.c +++ b/palacios/src/devices/generic.c @@ -2,6 +2,8 @@ /* (c) 2008, The V3VEE Project */ + + #include #include #include @@ -99,7 +101,10 @@ int generic_write_port_passthrough(ushort_t port, switch (length) { case 1: +<<<<<<< HEAD:palacios/src/devices/generic.c +======= +>>>>>>> ramdisk:palacios/src/devices/generic.c v3_outb(port,((uchar_t*)src)[0]); break; case 2: @@ -107,7 +112,10 @@ int generic_write_port_passthrough(ushort_t port, break; case 4: v3_outdw(port,((uint_t*)src)[0]); +<<<<<<< HEAD:palacios/src/devices/generic.c +======= +>>>>>>> ramdisk:palacios/src/devices/generic.c break; default: for (i = 0; i < length; i++) {