Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


build fixes to merge the Palacios configuration parameters with Linux parameters.
Jack Lange [Mon, 2 May 2011 20:54:57 +0000 (15:54 -0500)]
Now all configuration macros are named V3_CONFIG* instead of CONFIG* to separate the Palacios namespace

81 files changed:
Makefile
linux_module/Makefile
linux_module/ld.cmd [moved from linux_module/link.cmd with 76% similarity]
palacios/include/palacios/vm_guest.h
palacios/include/palacios/vmm.h
palacios/include/palacios/vmm_dev_mgr.h
palacios/include/palacios/vmm_instrument.h [deleted file]
palacios/include/palacios/vmm_shadow_paging.h
palacios/include/palacios/vmm_symbiotic.h
palacios/include/palacios/vmm_telemetry.h
palacios/include/palacios/vmm_time.h
palacios/src/devices/8254.c
palacios/src/devices/8259a.c
palacios/src/devices/Makefile
palacios/src/devices/apic.c
palacios/src/devices/cga.c
palacios/src/devices/filedisk.c
palacios/src/devices/generic.c
palacios/src/devices/ide.c
palacios/src/devices/io_apic.c
palacios/src/devices/keyboard.c
palacios/src/devices/lnx_virtio_blk.c
palacios/src/devices/lnx_virtio_nic.c
palacios/src/devices/lnx_virtio_vnet.c
palacios/src/devices/mcheck.c
palacios/src/devices/ne2k.c
palacios/src/devices/netdisk.c
palacios/src/devices/nic_bridge.c
palacios/src/devices/nvram.c
palacios/src/devices/pci.c
palacios/src/devices/pci_front.c
palacios/src/devices/ramdisk.c
palacios/src/devices/rtl8139.c
palacios/src/devices/serial.c
palacios/src/devices/swapbypass_cache.c
palacios/src/devices/swapbypass_cache2.c
palacios/src/devices/vga.c
palacios/src/devices/vnet_nic.c
palacios/src/extensions/Makefile
palacios/src/interfaces/Makefile
palacios/src/palacios/Makefile
palacios/src/palacios/mmu/Makefile
palacios/src/palacios/mmu/vmm_shdw_pg_cache.c
palacios/src/palacios/mmu/vmm_shdw_pg_kvm.c
palacios/src/palacios/mmu/vmm_shdw_pg_kvm_32.h
palacios/src/palacios/mmu/vmm_shdw_pg_kvm_32pae.h
palacios/src/palacios/mmu/vmm_shdw_pg_kvm_64.h
palacios/src/palacios/mmu/vmm_shdw_pg_swapbypass.c
palacios/src/palacios/mmu/vmm_shdw_pg_swapbypass_32.h
palacios/src/palacios/mmu/vmm_shdw_pg_tlb.c
palacios/src/palacios/svm.c
palacios/src/palacios/svm_handler.c
palacios/src/palacios/svm_io.c
palacios/src/palacios/vm_guest.c
palacios/src/palacios/vmm.c
palacios/src/palacios/vmm_binaries.S
palacios/src/palacios/vmm_config.c
palacios/src/palacios/vmm_ctrl_regs.c
palacios/src/palacios/vmm_dev_mgr.c
palacios/src/palacios/vmm_direct_paging.c
palacios/src/palacios/vmm_emulator.c
palacios/src/palacios/vmm_halt.c
palacios/src/palacios/vmm_intr.c
palacios/src/palacios/vmm_io.c
palacios/src/palacios/vmm_mem.c
palacios/src/palacios/vmm_paging.c
palacios/src/palacios/vmm_shadow_paging.c
palacios/src/palacios/vmm_sprintf.c
palacios/src/palacios/vmm_string.c
palacios/src/palacios/vmm_symbiotic.c
palacios/src/palacios/vmm_telemetry.c
palacios/src/palacios/vmm_time.c
palacios/src/palacios/vmm_v3dec.c
palacios/src/palacios/vmm_vnet_core.c
palacios/src/palacios/vmm_xed.c
palacios/src/palacios/vmx.c
palacios/src/palacios/vmx_assist.c
palacios/src/palacios/vmx_ctrl_regs.c
palacios/src/palacios/vmx_handler.c
palacios/src/palacios/vmx_io.c
scripts/kconfig/confdata.c

index ed13298..695a64b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -467,7 +467,7 @@ palacios/include/autoconf.h: ;
 endif
 
 
-ifdef CONFIG_LINUX
+ifdef V3_CONFIG_LINUX
 DEFAULT_EXTRA_TARGETS=linux_module
 else
 DEFAULT_EXTRA_TARGETS=
@@ -480,24 +480,24 @@ endif
 all: palacios $(DEFAULT_EXTRA_TARGETS)
 
 
-ifdef CONFIG_LINUX
+ifdef V3_CONFIG_LINUX
 CFLAGS          += -mcmodel=kernel 
 else
 CFLAGS          += -fPIC
 endif
 
-ifdef CONFIG_FRAME_POINTER
+ifdef V3_CONFIG_FRAME_POINTER
 CFLAGS         += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
 else
 CFLAGS         += -fomit-frame-pointer
 endif
 
 
-ifdef CONFIG_UNWIND_INFO
+ifdef V3_CONFIG_UNWIND_INFO
 CFLAGS         += -fasynchronous-unwind-tables
 endif
 
-ifdef CONFIG_DEBUG_INFO
+ifdef V3_CONFIG_DEBUG_INFO
 CFLAGS         += -g
 else 
 CFLAGS          += -O
@@ -621,7 +621,7 @@ palacios: libv3vee.a
 
 
 linux_module/v3vee.ko: linux_module/*.c linux_module/*.h libv3vee.a
-       cd linux_module/ && make CONFIG_LINUX_KERN=$(CONFIG_LINUX_KERN)
+       cd linux_module/ && make V3_CONFIG_LINUX_KERN=$(V3_CONFIG_LINUX_KERN)
        cp linux_module/v3vee.ko v3vee.ko
 
 
@@ -941,10 +941,10 @@ target-dir = $(dir $@)
 
 # Modules
 / %/: prepare scripts FORCE
-       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+       $(Q)$(MAKE) KBUILD_MODULES=$(if $(V3_CONFIG_MODULES),1) \
        $(build)=$(build-dir)
 %.ko: prepare scripts FORCE
-       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
+       $(Q)$(MAKE) KBUILD_MODULES=$(if $(V3_CONFIG_MODULES),1)   \
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
 
index 181df3c..04c6d7a 100644 (file)
@@ -1,5 +1,10 @@
+include $(PWD)/../.config
 
-LDFLAGS += --whole-archive  --script=$(PWD)/link.cmd
+LDFLAGS += --whole-archive  --script=$(PWD)/ld.cmd
+
+ifdef V3_CONFIG_SYMMOD
+LDFLAGS += --script=$(PWD)/ld.symmod.cmd
+endif
 
 EXTRA_CFLAGS  += -I$(PWD)/../palacios/include/ -DMODULE=1 -D__KERNEL__=1
 
@@ -17,13 +22,13 @@ v3vee-objs:=        palacios.o \
                palacios-debugfs.o
 
 
-ifdef CONFIG_PALACIOS_VNET
+ifdef V3_CONFIG_PALACIOS_VNET
                v3vee-objs += palacios-vnet.o           
 endif
-ifdef CONFIG_PALACIOS_PACKET
+ifdef V3_CONFIG_PALACIOS_PACKET
                v3vee-objs += palacios-packet.o
 endif
-ifdef CONFIG_PALACIOS_SOCKET
+ifdef V3_CONFIG_PALACIOS_SOCKET
                v3vee-objs += palacios-socket.o
 endif
 
@@ -36,10 +41,10 @@ obj-m := v3vee.o
 
 
 all:
-       $(MAKE) -C $(CONFIG_LINUX_KERN) M=$(PWD) modules
+       $(MAKE) -C $(V3_CONFIG_LINUX_KERN) M=$(PWD) modules
 
 
 
 clean:
-       $(MAKE) -C $(CONFIG_LINUX_KERN) M=$(PWD) clean
+       $(MAKE) -C $(V3_CONFIG_LINUX_KERN) M=$(PWD) clean
 
similarity index 76%
rename from linux_module/link.cmd
rename to linux_module/ld.cmd
index 6c014d8..7dd7747 100644 (file)
@@ -8,13 +8,6 @@ SECTIONS
 
        }
        
-/*     _v3_capsules :
-       {
-               __start__v3_capsules = .;
-               *(_v3_capsules);
-               __stop__v3_capsules = .;
-       }
-*/
        _v3_shdw_pg_impls :
        {
                __start__v3_shdw_pg_impls = .;
index c5dddfc..ee8e31c 100644 (file)
 
 
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
 #include <palacios/vmm_symbiotic.h>
 struct v3_sym_core_state;
 #endif
@@ -107,7 +107,7 @@ struct guest_info {
     
     uint64_t num_exits;
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     struct v3_core_telemetry core_telem;
 #endif
 
@@ -116,7 +116,7 @@ struct guest_info {
 
     void * decoder_state;
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     /* Symbiotic state */
     struct v3_sym_core_state sym_core_state;
 #endif
@@ -172,12 +172,12 @@ struct v3_vm_info {
 
     struct v3_extensions extensions;
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     /* Symbiotic state */
     struct v3_sym_vm_state sym_vm_state;
 #endif
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     uint_t enable_telemetry;
     struct v3_telemetry_state telemetry;
 #endif
index 8d3d262..71c9936 100644 (file)
@@ -182,7 +182,7 @@ struct guest_info;
         })
 
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
 
 #define V3_CREATE_THREAD(fn, arg, name)                                        \
     do {                                                               \
@@ -252,7 +252,7 @@ void v3_yield_cond(struct guest_info * info);
 void v3_print_cond(const char * fmt, ...);
 
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
 void v3_interrupt_cpu(struct v3_vm_info * vm, int logical_cpu, int vector);
 #endif
 
index c9999bd..87f62fc 100644 (file)
@@ -102,14 +102,14 @@ int V3_init_devices();
 int V3_deinit_devices();
 
 
-#ifdef CONFIG_KEYED_STREAMS
+#ifdef V3_CONFIG_KEYED_STREAMS
 #include <interfaces/vmm_keyed_stream.h>
 #endif 
 
 struct v3_device_ops {
     int (*free)(void * private_data);
 
-#ifdef CONFIG_KEYED_STREAMS
+#ifdef V3_CONFIG_KEYED_STREAMS
     int (*checkpoint)(struct vm_device *dev, v3_keyed_stream_t stream);
     int (*restore)(struct vm_device *dev, v3_keyed_stream_t stream);
 #endif
diff --git a/palacios/include/palacios/vmm_instrument.h b/palacios/include/palacios/vmm_instrument.h
deleted file mode 100644 (file)
index 63b2be2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * This file is part of the Palacios Virtual Machine Monitor developed
- * by the V3VEE Project with funding from the United States National 
- * Science Foundation and the Department of Energy.  
- *
- * The V3VEE Project is a joint project between Northwestern University
- * and the University of New Mexico.  You can find out more at 
- * http://www.v3vee.org
- *
- * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> 
- * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
- * All rights reserved.
- *
- * Author: Chang Bae <c.s.bae@u.northwestern.edu>
- *
- * This is free software.  You are permitted to use,
- * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
- */
-
-#ifndef __VMM_INSTRUMENT_H__
-#define __VMM_INSTRUMENT_H__
-
-#ifdef __V3VEE__
-
-#ifdef CONFIG_INSTRUMENT_VMM 
-
-#include <palacios/vmm_types.h>
-#include <palacios/vmm_ringbuffer.h>
-
-
-void v3_init_instrumentation() __attribute__((__no_instrument_function__));
-
-#endif // INSTRUMENT_VMM
-
-#endif // __V3VEE__
-
-#endif // 
-
-
index b619a04..22b0651 100644 (file)
@@ -63,7 +63,7 @@ struct v3_shdw_pg_state {
 
     void * local_impl_data;
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
     uint_t guest_faults;
 #endif
 
index 0c581fd..676f901 100644 (file)
 
 #include <palacios/vmm_symspy.h>
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
 #include <palacios/vmm_symcall.h>
 #endif
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
 #include <palacios/vmm_symmod.h>
 #endif
 
@@ -40,7 +40,7 @@
 struct v3_sym_vm_state {
     struct v3_symspy_global_state symspy_state;
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     struct v3_symmod_state symmod_state;
 #endif
 };
@@ -49,7 +49,7 @@ struct v3_sym_vm_state {
 struct v3_sym_core_state {
     struct v3_symspy_local_state symspy_state;
     
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     struct v3_symcall_state symcall_state;
 #endif
 
index 8fab683..0677e2d 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifdef __V3VEE__
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
 
 #include <palacios/vmm_rbtree.h>
 #include <palacios/vmm_list.h>
index c9248b8..329fce6 100644 (file)
@@ -92,7 +92,7 @@ static inline uint64_t v3_get_host_time(struct vm_time *t) {
 
 // Returns *monotonic* guest time.
 static inline uint64_t v3_get_guest_time(struct vm_time *t) {
-#ifdef CONFIG_TIME_HIDE_VM_COST
+#ifdef V3_CONFIG_TIME_HIDE_VM_COST
     V3_ASSERT(t->exit_time);
     return t->exit_time + t->guest_host_offset;
 #else
index b945d2b..e01eeda 100644 (file)
@@ -27,7 +27,7 @@
 #include <palacios/vmm_io.h>
 
 
-#ifndef CONFIG_DEBUG_PIT
+#ifndef V3_CONFIG_DEBUG_PIT
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -660,7 +660,7 @@ static int pit_free(void * private_data) {
     return 0;
 }
 
-#ifdef CONFIG_KEYED_STREAMS
+#ifdef V3_CONFIG_KEYED_STREAMS
 static int pit_checkpoint(struct vm_device *dev, v3_keyed_stream_t stream)
 {
     struct pit *p = (struct pit *) (dev->private_data);
@@ -716,7 +716,7 @@ static int pit_restore(struct vm_device *dev, v3_keyed_stream_t stream)
 
 static struct v3_device_ops dev_ops = {
     .free = (int (*)(void *))pit_free,
-#ifdef CONFIG_KEYED_STREAMS
+#ifdef V3_CONFIG_KEYED_STREAMS
     .checkpoint = pit_checkpoint,
     .restore = pit_restore,
 #endif
@@ -763,7 +763,7 @@ static int pit_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        return -1;
     }
 
-#ifdef CONFIG_DEBUG_PIT
+#ifdef V3_CONFIG_DEBUG_PIT
     PrintDebug("8254 PIT: OSC_HZ=%d, reload_val=", OSC_HZ);
     //PrintTrace(reload_val);
     PrintDebug("\n");
@@ -789,7 +789,7 @@ static int pit_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     init_channel(&(pit_state->ch_1));
     init_channel(&(pit_state->ch_2));
 
-#ifdef CONFIG_DEBUG_PIT
+#ifdef V3_CONFIG_DEBUG_PIT
     PrintDebug("8254 PIT: CPU MHZ=%d -- pit count=", cpu_khz / 1000);
     //PrintTraceLL(pit_state->pit_counter);
     PrintDebug("\n");
index 0d5e5ff..c24402d 100644 (file)
@@ -25,7 +25,7 @@
 #include <palacios/vmm_dev_mgr.h>
 #include <palacios/vm_guest.h>
 
-#ifndef CONFIG_DEBUG_PIC
+#ifndef V3_CONFIG_DEBUG_PIC
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -216,7 +216,7 @@ static int pic_raise_intr(struct v3_vm_info * vm, void * private_data, int irq)
        return -1;
     }
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
     v3_interrupt_cpu(vm, 0, 0);
 #endif
 
index 51b43e9..3eb4a87 100644 (file)
@@ -1,49 +1,49 @@
-obj-$(CONFIG_APIC) += apic.o
-obj-$(CONFIG_IO_APIC) += io_apic.o
-obj-$(CONFIG_PIT) += 8254.o
-obj-$(CONFIG_PIC) += 8259a.o
-obj-$(CONFIG_BOCHS_DEBUG) += bochs_debug.o
-obj-$(CONFIG_GENERIC) += generic.o
-obj-$(CONFIG_I440FX) += i440fx.o
-obj-$(CONFIG_IDE) += ide.o
-obj-$(CONFIG_SERIAL_UART) += serial.o
-
-obj-$(CONFIG_KEYBOARD) += keyboard.o
-obj-$(CONFIG_LINUX_VIRTIO_BALLOON) += lnx_virtio_balloon.o
-obj-$(CONFIG_LINUX_VIRTIO_BLOCK) += lnx_virtio_blk.o
-obj-$(CONFIG_LINUX_VIRTIO_SYM) += lnx_virtio_sym.o
-obj-$(CONFIG_LINUX_VIRTIO_NET) += lnx_virtio_nic.o
-obj-$(CONFIG_LINUX_VIRTIO_VNET) += lnx_virtio_vnet.o
-obj-$(CONFIG_VNET_NIC) += vnet_nic.o
-obj-$(CONFIG_NVRAM) += nvram.o
-obj-$(CONFIG_OS_DEBUG) += os_debug.o
-obj-$(CONFIG_PCI) += pci.o
-obj-$(CONFIG_PIIX3) += piix3.o
-obj-$(CONFIG_SWAPBYPASS_DISK_CACHE) += swapbypass_cache.o
-obj-$(CONFIG_SWAPBYPASS_DISK_CACHE2) += swapbypass_cache2.o
-obj-$(CONFIG_DISK_MODEL) += disk_model.o
-obj-$(CONFIG_NIC_BRIDGE) += nic_bridge.o
-
-obj-$(CONFIG_NE2K) += ne2k.o
-obj-$(CONFIG_RTL8139) += rtl8139.o
-
-obj-$(CONFIG_TMPDISK) += tmpdisk.o
-obj-$(CONFIG_RAMDISK) += ramdisk.o 
-obj-$(CONFIG_NETDISK) += netdisk.o 
-obj-$(CONFIG_FILEDISK) += filedisk.o
-
-obj-$(CONFIG_CGA) += cga.o
-obj-$(CONFIG_TELNET_CONSOLE) += telnet_cons.o
-obj-$(CONFIG_CURSES_CONSOLE) += curses_cons.o
-
-obj-$(CONFIG_PASSTHROUGH_PCI) += pci_passthrough.o
-
-obj-$(CONFIG_SYMMOD) += lnx_virtio_symmod.o
-obj-$(CONFIG_CHAR_STREAM) += char_stream.o
-
-obj-$(CONFIG_MCHECK) += mcheck.o
-
-obj-$(CONFIG_VGA) += vga.o
-
-obj-$(CONFIG_PCI_FRONT) += pci_front.o
+obj-$(V3_CONFIG_APIC) += apic.o
+obj-$(V3_CONFIG_IO_APIC) += io_apic.o
+obj-$(V3_CONFIG_PIT) += 8254.o
+obj-$(V3_CONFIG_PIC) += 8259a.o
+obj-$(V3_CONFIG_BOCHS_DEBUG) += bochs_debug.o
+obj-$(V3_CONFIG_GENERIC) += generic.o
+obj-$(V3_CONFIG_I440FX) += i440fx.o
+obj-$(V3_CONFIG_IDE) += ide.o
+obj-$(V3_CONFIG_SERIAL_UART) += serial.o
+
+obj-$(V3_CONFIG_KEYBOARD) += keyboard.o
+obj-$(V3_CONFIG_LINUX_VIRTIO_BALLOON) += lnx_virtio_balloon.o
+obj-$(V3_CONFIG_LINUX_VIRTIO_BLOCK) += lnx_virtio_blk.o
+obj-$(V3_CONFIG_LINUX_VIRTIO_SYM) += lnx_virtio_sym.o
+obj-$(V3_CONFIG_LINUX_VIRTIO_NET) += lnx_virtio_nic.o
+obj-$(V3_CONFIG_LINUX_VIRTIO_VNET) += lnx_virtio_vnet.o
+obj-$(V3_CONFIG_VNET_NIC) += vnet_nic.o
+obj-$(V3_CONFIG_NVRAM) += nvram.o
+obj-$(V3_CONFIG_OS_DEBUG) += os_debug.o
+obj-$(V3_CONFIG_PCI) += pci.o
+obj-$(V3_CONFIG_PIIX3) += piix3.o
+obj-$(V3_CONFIG_SWAPBYPASS_DISK_CACHE) += swapbypass_cache.o
+obj-$(V3_CONFIG_SWAPBYPASS_DISK_CACHE2) += swapbypass_cache2.o
+obj-$(V3_CONFIG_DISK_MODEL) += disk_model.o
+obj-$(V3_CONFIG_NIC_BRIDGE) += nic_bridge.o
+
+obj-$(V3_CONFIG_NE2K) += ne2k.o
+obj-$(V3_CONFIG_RTL8139) += rtl8139.o
+
+obj-$(V3_CONFIG_TMPDISK) += tmpdisk.o
+obj-$(V3_CONFIG_RAMDISK) += ramdisk.o 
+obj-$(V3_CONFIG_NETDISK) += netdisk.o 
+obj-$(V3_CONFIG_FILEDISK) += filedisk.o
+
+obj-$(V3_CONFIG_CGA) += cga.o
+obj-$(V3_CONFIG_TELNET_CONSOLE) += telnet_cons.o
+obj-$(V3_CONFIG_CURSES_CONSOLE) += curses_cons.o
+
+obj-$(V3_CONFIG_PASSTHROUGH_PCI) += pci_passthrough.o
+
+obj-$(V3_CONFIG_SYMMOD) += lnx_virtio_symmod.o
+obj-$(V3_CONFIG_CHAR_STREAM) += char_stream.o
+
+obj-$(V3_CONFIG_MCHECK) += mcheck.o
+
+obj-$(V3_CONFIG_VGA) += vga.o
+
+obj-$(V3_CONFIG_PCI_FRONT) += pci_front.o
 
index e038bb2..7f2eb45 100644 (file)
@@ -30,7 +30,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_APIC
+#ifndef V3_CONFIG_DEBUG_APIC
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #else
@@ -455,7 +455,7 @@ static int apic_do_eoi(struct apic_state * apic) {
        
        *svc_location &= ~flag;
 
-#ifdef CONFIG_CRAY_XT
+#ifdef V3_CONFIG_CRAY_XT
        
        if ((isr_irq == 238) || 
            (isr_irq == 239)) {
@@ -639,7 +639,7 @@ static int deliver_ipi(struct apic_state * src_apic,
                //     host maitains logical proc->phsysical proc
                PrintDebug(" non-local core with new interrupt, forcing it to exit now\n"); 
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
                v3_interrupt_cpu(dst_core->vm_info, dst_core->cpu_id, 0);
 #else
                V3_ASSERT(0);
@@ -1451,7 +1451,7 @@ int v3_apic_raise_intr(struct v3_vm_info * vm, uint32_t irq, uint32_t dst, void
     }
     
     if (do_xcall > 0 && (V3_Get_CPU() != dst)) {
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
        v3_interrupt_cpu(vm, dst, 0);
 #else
        V3_ASSERT(0);
@@ -1678,7 +1678,7 @@ static int apic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        PrintDebug("apic %u: (setup device): done, my id is %u\n", i, apic->lapic_id.val);
     }
 
-#ifdef CONFIG_DEBUG_APIC
+#ifdef V3_CONFIG_DEBUG_APIC
     for (i = 0; i < vm->num_cores; i++) {
        struct apic_state * apic = &(apic_dev->apics[i]);
        PrintDebug("apic: sanity check: apic %u (at %p) has id %u and msr value %llx and core at %p\n",
index b720c6b..e9556c8 100644 (file)
 #include <devices/console.h>
 
 
-#if CONFIG_DEBUG_CGA >= 2
+#if V3_CONFIG_DEBUG_CGA >= 2
 #define PrintVerbose PrintDebug
 #else
 #define PrintVerbose(fmt, args...)
 #endif
-#if CONFIG_DEBUG_CGA == 0
+#if V3_CONFIG_DEBUG_CGA == 0
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -443,7 +443,7 @@ static void passthrough_out(uint16_t port, const void * src, uint_t length) {
     }
 }
 
-#if CONFIG_DEBUG_CGA >= 2
+#if V3_CONFIG_DEBUG_CGA >= 2
 static unsigned long get_value(const void *ptr, int len) {
   unsigned long value = 0;
 
index 629b4ed..f7fe7ec 100644 (file)
@@ -23,7 +23,7 @@
 #include <interfaces/vmm_file.h>
 #include <palacios/vm_guest.h>
 
-#ifndef CONFIG_DEBUG_FILEDISK
+#ifndef V3_CONFIG_DEBUG_FILEDISK
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 73b778a..8fd525c 100644 (file)
 #include <palacios/vmm_dev_mgr.h>
 #include <palacios/vm_guest_mem.h>
 
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
 #include <interfaces/vmm_host_dev.h>
 #endif
 
-#ifndef CONFIG_DEBUG_GENERIC
+#ifndef V3_CONFIG_DEBUG_GENERIC
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -45,7 +45,7 @@ typedef enum {GENERIC_IGNORE,
 
 struct generic_internal {
     enum {GENERIC_PHYSICAL, GENERIC_HOST} forward_type;
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
     v3_host_dev_t                         host_dev;
 #endif
     struct vm_device                      *dev; // me
@@ -88,7 +88,7 @@ static int generic_write_port_passthrough(struct guest_info * core,
            }
            return length;
            break;
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
        case GENERIC_HOST:
            if (state->host_dev) { 
                return v3_host_dev_write_io(state->host_dev,port,src,length);
@@ -109,7 +109,7 @@ static int generic_write_port_print_and_passthrough(struct guest_info * core, ui
     uint_t i;
     int rc;
 
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct generic_internal *state = (struct generic_internal *) priv_data;
 #endif
 
@@ -162,7 +162,7 @@ static int generic_read_port_passthrough(struct guest_info * core,
            }
            return length;
            break;
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
        case GENERIC_HOST:
            if (state->host_dev) { 
                return v3_host_dev_read_io(state->host_dev,port,dst,length);
@@ -183,7 +183,7 @@ static int generic_read_port_print_and_passthrough(struct guest_info * core, uin
     uint_t i;
     int rc;
 
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct generic_internal *state = (struct generic_internal *) priv_data;
 #endif
 
@@ -217,7 +217,7 @@ static int generic_read_port_ignore(struct guest_info * core, uint16_t port, voi
 static int generic_read_port_print_and_ignore(struct guest_info * core, uint16_t port, void * src, 
                                              uint_t length, void * priv_data) {
    
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct generic_internal *state = (struct generic_internal *) priv_data;
 #endif
 
@@ -242,7 +242,7 @@ static int generic_write_port_print_and_ignore(struct guest_info * core, uint16_
                                              uint_t length, void * priv_data) {
     int i;
 
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct generic_internal *state = (struct generic_internal *) priv_data;
 #endif
 
@@ -278,7 +278,7 @@ static int generic_write_mem_passthrough(struct guest_info * core,
            memcpy(V3_VAddr((void*)gpa),src,len);
            return len;
            break;
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
        case GENERIC_HOST:
            if (state->host_dev) { 
                return v3_host_dev_write_mem(state->host_dev,gpa,src,len);
@@ -300,7 +300,7 @@ static int generic_write_mem_print_and_passthrough(struct guest_info * core,
                                                   uint_t              len,
                                                   void              * priv)
 {
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct vm_device *dev = (struct vm_device *) priv;
     struct generic_internal *state = (struct generic_internal *) dev->private_data;
 #endif
@@ -332,7 +332,7 @@ static int generic_write_mem_print_and_ignore(struct guest_info * core,
                                              uint_t              len,
                                              void              * priv)
 {
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct vm_device *dev = (struct vm_device *) priv;
     struct generic_internal *state = (struct generic_internal *) dev->private_data;
 #endif
@@ -359,7 +359,7 @@ static int generic_read_mem_passthrough(struct guest_info * core,
            memcpy(dst,V3_VAddr((void*)gpa),len);
            return len;
            break;
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
        case GENERIC_HOST:
            if (state->host_dev) { 
                return v3_host_dev_read_mem(state->host_dev,gpa,dst,len);
@@ -382,7 +382,7 @@ static int generic_read_mem_print_and_passthrough(struct guest_info * core,
                                                  uint_t              len,
                                                  void              * priv)
 {
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct vm_device *dev = (struct vm_device *) priv;
     struct generic_internal *state = (struct generic_internal *) dev->private_data;
 #endif
@@ -405,7 +405,7 @@ static int generic_read_mem_ignore(struct guest_info * core,
                                   uint_t              len,
                                   void              * priv)
 {
-#ifdef CONFIG_DEBUG_GENERIC
+#ifdef V3_CONFIG_DEBUG_GENERIC
     struct vm_device *dev = (struct vm_device *) priv;
     struct generic_internal *state = (struct generic_internal *) dev->private_data;
 #endif
@@ -439,7 +439,7 @@ static int generic_free(struct generic_internal * state) {
     
     PrintDebug("generic (%s): deinit_device\n", state->name);
     
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
     if (state->host_dev) { 
        v3_host_dev_close(state->host_dev);
        state->host_dev=0;
@@ -622,7 +622,7 @@ static int generic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     struct generic_internal * state = NULL;
     char * dev_id = v3_cfg_val(cfg, "ID");
     char * forward = v3_cfg_val(cfg, "forward");
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
     char * host_dev = v3_cfg_val(cfg, "hostdev");
 #endif
     v3_cfg_tree_t * port_cfg = v3_cfg_subtree(cfg, "ports");
@@ -645,7 +645,7 @@ static int generic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        if (!strcasecmp(forward,"physical_device")) { 
            state->forward_type=GENERIC_PHYSICAL;
        } else if (!strcasecmp(forward,"host_device")) { 
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
            state->forward_type=GENERIC_HOST;
 #else
            PrintError("generic (%s): cannot configure host device since host device support is not built in\n", state->name);
@@ -670,7 +670,7 @@ static int generic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     state->dev=dev;
 
 
-#ifdef CONFIG_HOST_DEVICE
+#ifdef V3_CONFIG_HOST_DEVICE
     if (state->forward_type==GENERIC_HOST) { 
        if (!host_dev) { 
            PrintError("generic (%s): host forwarding requested, but no host device given\n", state->name);
index ef42d61..3ef7d4d 100644 (file)
@@ -26,7 +26,7 @@
 #include "ide-types.h"
 #include "atapi-types.h"
 
-#ifndef CONFIG_DEBUG_IDE
+#ifndef V3_CONFIG_DEBUG_IDE
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -356,7 +356,7 @@ static int dma_write(struct guest_info * core, struct ide_internal * ide, struct
 #include "ata.h"
 
 
-#ifdef CONFIG_DEBUG_IDE
+#ifdef V3_CONFIG_DEBUG_IDE
 static void print_prd_table(struct ide_internal * ide, struct ide_channel * channel) {
     struct ide_dma_prd prd_entry;
     int index = 0;
@@ -400,7 +400,7 @@ static int dma_read(struct guest_info * core, struct ide_internal * ide, struct
     // Read in the data buffer....
     // Read a sector/block at a time until the prd entry is full.
 
-#ifdef CONFIG_DEBUG_IDE
+#ifdef V3_CONFIG_DEBUG_IDE
     print_prd_table(ide, channel);
 #endif
 
index b9375a8..3579fde 100644 (file)
@@ -23,7 +23,7 @@
 #include <devices/apic.h>
 #include <palacios/vm_guest.h>
 
-#ifndef CONFIG_DEBUG_IO_APIC
+#ifndef V3_CONFIG_DEBUG_IO_APIC
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 5eb7d6b..e974503 100644 (file)
@@ -28,7 +28,7 @@
 #include <palacios/vm_guest.h>
 
 
-#ifndef CONFIG_DEBUG_KEYBOARD
+#ifndef V3_CONFIG_DEBUG_KEYBOARD
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -335,7 +335,7 @@ static int pull_from_output_queue(struct keyboard_internal * state, uint8_t * va
 
 
 #include <palacios/vmm_telemetry.h>
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
 #include <palacios/vmm_symmod.h>
 #endif
 
@@ -353,7 +353,7 @@ static int key_event_handler(struct v3_vm_info * vm,
        }
        //      PrintGuestPageTables(info, info->shdw_pg_state.guest_cr3);
     } 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     else if (evt->scan_code == 0x43) { // F9 Sym test
        struct guest_info * core = &(vm->cores[0]);
        PrintDebug("Testing sym call\n");
@@ -385,13 +385,13 @@ static int key_event_handler(struct v3_vm_info * vm,
        v3_dbg_enable ^= 1;
 
     } 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
 
     else if (evt->scan_code == 0x41) { // F7 telemetry dump
        v3_print_telemetry(vm);
     } 
 #endif
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     else if (evt->scan_code == 0x40) { // F6 Test symmod load
        v3_load_sym_capsule(vm, "lnx_test");
     }
index 7e26b30..d47243a 100644 (file)
@@ -26,7 +26,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_VIRTIO_BLK
+#ifndef V3_CONFIG_DEBUG_VIRTIO_BLK
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index baf3369..fca709d 100644 (file)
@@ -33,7 +33,7 @@
 #include <palacios/vmm_time.h>
 
 
-#ifndef CONFIG_DEBUG_VIRTIO_NET
+#ifndef V3_CONFIG_DEBUG_VIRTIO_NET
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 87f158d..85535e8 100644 (file)
@@ -28,7 +28,7 @@
 #include <devices/pci.h>
 
 
-#ifndef CONFIG_DEBUG_LINUX_VIRTIO_VNET
+#ifndef V3_CONFIG_DEBUG_LINUX_VIRTIO_VNET
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 78ddaa2..ec93d7f 100644 (file)
@@ -34,7 +34,7 @@
 #include <palacios/vmm_string.h>
 #include <palacios/vmm_cpuid.h>
 
-#ifndef CONFIG_DEBUG_MCHECK
+#ifndef V3_CONFIG_DEBUG_MCHECK
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 939bd28..ad0bda8 100644 (file)
@@ -28,7 +28,7 @@
 #include <palacios/vm_guest.h>
 #include <palacios/vmm_sprintf.h>
 
-#ifndef CONFIG_DEBUG_NE2K
+#ifndef V3_CONFIG_DEBUG_NE2K
 #undef PrintDebug
 #define PrintDebug(fmts, args...)
 #endif
@@ -347,7 +347,7 @@ static int ne2k_update_irq(struct ne2k_state * nic_state) {
 
 static int tx_one_pkt(struct ne2k_state * nic_state, uchar_t *pkt, uint32_t length) {
        
-#ifdef CONFIG_DEBUG_NE2K
+#ifdef V3_CONFIG_DEBUG_NE2K
     PrintDebug("NE2000: Send Packet:\n");
     v3_hexdump(pkt, length, NULL, 0);
 #endif    
@@ -484,7 +484,7 @@ static int rx_one_pkt(struct ne2k_state * nic_state, const uchar_t * pkt,  uint3
 static int ne2k_rx(uint8_t * buf, uint32_t size, void * private_data){
     struct ne2k_state * nic_state = (struct ne2k_state *)private_data;
   
-#ifdef CONFIG_DEBUG_NE2K
+#ifdef V3_CONFIG_DEBUG_NE2K
     PrintDebug("\nNe2k: Packet Received:\n");
     v3_hexdump(buf, size, NULL, 0);
 #endif    
index 9a1509a..a4c4fc8 100644 (file)
@@ -21,7 +21,7 @@
 #include <palacios/vmm_dev_mgr.h>
 #include <interfaces/vmm_socket.h>
 
-#ifndef CONFIG_DEBUG_IDE
+#ifndef V3_CONFIG_DEBUG_IDE
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 5eec5e6..518fa75 100644 (file)
@@ -25,7 +25,7 @@
 #include <palacios/vmm_sprintf.h>
 #include <interfaces/vmm_packet.h>
 
-#ifndef CONFIG_DEBUG_NIC_BRIDGE
+#ifndef V3_CONFIG_DEBUG_NIC_BRIDGE
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -39,7 +39,7 @@ static int bridge_send(uint8_t * buf, uint32_t len,
                       int synchronize,
                       void * private_data) {
 
-#ifdef CONFIG_DEBUG_NIC_BRIDGE
+#ifdef V3_CONFIG_DEBUG_NIC_BRIDGE
     {
        PrintDebug("NIC Bridge: send pkt size: %d\n", len);
        v3_hexdump(buf, len, NULL, 0);
@@ -54,7 +54,7 @@ static int packet_input(struct v3_vm_info * vm,
                        void * private_data) {
     struct nic_bridge_state * bridge = (struct nic_bridge_state *)private_data;
  
-#ifdef CONFIG_DEBUG_NIC_BRIDGE
+#ifdef V3_CONFIG_DEBUG_NIC_BRIDGE
     {
        PrintDebug("NIC Bridge: recv pkt size: %d\n", evt->size);
        v3_hexdump(evt->pkt, evt->size, NULL, 0);
index 785d38b..1264fad 100644 (file)
@@ -30,7 +30,7 @@
 #include <palacios/vm_guest.h>
 
 
-#ifndef CONFIG_DEBUG_NVRAM
+#ifndef V3_CONFIG_DEBUG_NVRAM
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 1f4976b..0400751 100644 (file)
@@ -37,7 +37,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_PCI
+#ifndef V3_CONFIG_DEBUG_PCI
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -104,7 +104,7 @@ struct pci_internal {
 
 
 
-#ifdef CONFIG_DEBUG_PCI
+#ifdef V3_CONFIG_DEBUG_PCI
 
 static void pci_dump_state(struct pci_internal * pci_state) {
     struct rb_node * node = v3_rb_first(&(pci_state->bus_list[0].devices));
@@ -922,7 +922,7 @@ struct pci_device * v3_pci_register_device(struct vm_device * pci,
     // add the device
     add_device_to_bus(bus, pci_dev);
 
-#ifdef CONFIG_DEBUG_PCI
+#ifdef V3_CONFIG_DEBUG_PCI
     pci_dump_state(pci_state);
 #endif
 
@@ -990,7 +990,7 @@ struct pci_device * v3_pci_register_passthrough_device(struct vm_device * pci,
     // add the device
     add_device_to_bus(bus, pci_dev);
 
-#ifdef CONFIG_DEBUG_PCI
+#ifdef V3_CONFIG_DEBUG_PCI
     pci_dump_state(pci_state);
 #endif
 
index 487ab5c..70dc980 100644 (file)
@@ -57,7 +57,7 @@
 #include <interfaces/vmm_host_dev.h>
 
 
-#ifndef CONFIG_DEBUG_PCI_FRONT
+#ifndef V3_CONFIG_DEBUG_PCI_FRONT
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 4598707..05e9bda 100644 (file)
@@ -21,7 +21,7 @@
 #include <palacios/vmm_dev_mgr.h>
 
 
-#ifndef CONFIG_DEBUG_RAMDISK
+#ifndef V3_CONFIG_DEBUG_RAMDISK
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 199d0d7..4ef93df 100644 (file)
@@ -28,7 +28,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_RTL8139
+#ifndef V3_CONFIG_DEBUG_RTL8139
 #undef PrintDebug
 #define PrintDebug(fmts, args...)
 #endif
@@ -1174,7 +1174,7 @@ static int tx_one_packet(struct rtl8139_state * nic_state, int descriptor){
     v3_gpa_to_hva(&(nic_state->vm->cores[0]), (addr_t)pkt_gpa, &hostva);
     pkt = (uchar_t *)hostva;
 
-#ifdef CONFIG_DEBUG_RTL8139
+#ifdef V3_CONFIG_DEBUG_RTL8139
     v3_hexdump(pkt, txsize, NULL, 0);
 #endif
 
index 0efb5cc..f0d405d 100644 (file)
@@ -31,7 +31,7 @@
 #include <devices/serial.h>
 
 
-#ifndef CONFIG_DEBUG_SERIAL
+#ifndef V3_CONFIG_DEBUG_SERIAL
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 951590e..ec2bba8 100644 (file)
@@ -23,7 +23,7 @@
 #include <palacios/vm_guest.h>
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -60,7 +60,7 @@ struct swap_state {
 
     union swap_header * hdr;
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     uint32_t pages_in;
     uint32_t pages_out;
 #endif
@@ -164,7 +164,7 @@ static int swap_read(uint8_t * buf, uint64_t lba, uint64_t num_bytes, void * pri
        int i = 0;
        // Notify the shadow paging layer
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_in += length / 4096;
 #endif
 
@@ -219,7 +219,7 @@ static int swap_write(uint8_t * buf,  uint64_t lba, uint64_t num_bytes, void * p
     if ((swap->active == 1) && (offset != 0)) {
        int i = 0;
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_out += length / 4096;
 #endif
 
@@ -253,7 +253,7 @@ static struct v3_device_ops dev_ops = {
 };
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     struct vm_device * dev = (struct vm_device *)private_data;
     struct swap_state * swap = (struct swap_state *)(dev->private_data);
@@ -314,7 +314,7 @@ static int swap_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        return -1;
     }
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     if (vm->enable_telemetry == 1) {
        v3_add_telemetry_cb(vm, telemetry_cb, dev);
     }
index bc83762..dfd51ba 100644 (file)
@@ -24,7 +24,7 @@
 #include <palacios/vmm_hashtable.h>
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -83,7 +83,7 @@ struct swap_state {
     struct v3_dev_blk_ops * ops;
     void * private_data;
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     uint32_t pages_in;
     uint32_t pages_out;
 #endif
@@ -235,7 +235,7 @@ static int buf_read(uint8_t * buf, uint64_t lba, uint64_t num_bytes, void * priv
        swap->unswapped_pages += (length / 4096);
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_in += length / 4096;
 #endif
 
@@ -384,7 +384,7 @@ static int buf_write(uint8_t * buf,  uint64_t lba, uint64_t num_bytes, void * pr
 
        swap->swapped_pages += written_pages;
        
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap->pages_out += length / 4096;
 #endif
 
@@ -506,7 +506,7 @@ static struct v3_device_ops dev_ops = {
 };
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     struct swap_state * swap = (struct swap_state *)private_data;
 
@@ -583,7 +583,7 @@ static int connect_fn(struct v3_vm_info * vm,
     }
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 
     if (vm->enable_telemetry == 1) {
        v3_add_telemetry_cb(vm, telemetry_cb, swap);
index ce28940..29b7378 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "vga_regs.h"
 
-#ifndef CONFIG_DEBUG_VGA
+#ifndef V3_CONFIG_DEBUG_VGA
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 05117e5..80b8fea 100644 (file)
@@ -28,7 +28,7 @@
 #include <palacios/vmm_sprintf.h>
 #include <palacios/vmm_ethernet.h>
 
-#ifndef CONFIG_DEBUG_VNET_NIC
+#ifndef V3_CONFIG_DEBUG_VNET_NIC
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index ac19202..ab31a13 100644 (file)
@@ -1,5 +1,5 @@
 obj-y += null.o
-obj-$(CONFIG_EXT_MTRRS) += ext_mtrr.o
-obj-$(CONFIG_EXT_VTSC) += ext_vtsc.o
-obj-$(CONFIG_EXT_VTIME) += ext_vtime.o
-obj-$(CONFIG_EXT_INSPECTOR) += ext_inspector.o
+obj-$(V3_CONFIG_EXT_MTRRS) += ext_mtrr.o
+obj-$(V3_CONFIG_EXT_VTSC) += ext_vtsc.o
+obj-$(V3_CONFIG_EXT_VTIME) += ext_vtime.o
+obj-$(V3_CONFIG_EXT_INSPECTOR) += ext_inspector.o
index df4e3dd..15ba807 100644 (file)
@@ -1,10 +1,10 @@
-obj-$(CONFIG_SOCKET) +=  vmm_socket.o
-obj-$(CONFIG_PACKET) +=  vmm_packet.o
-obj-$(CONFIG_FILE) += vmm_file.o
-obj-$(CONFIG_CONSOLE) += vmm_console.o
-obj-$(CONFIG_STREAM) += vmm_stream.o
-obj-$(CONFIG_GRAPHICS_CONSOLE) += vmm_graphics_console.o
-obj-$(CONFIG_KEYED_STREAMS) += vmm_keyed_stream.o
-obj-$(CONFIG_HOST_DEVICE) += vmm_host_dev.o
+obj-$(V3_CONFIG_SOCKET) +=  vmm_socket.o
+obj-$(V3_CONFIG_PACKET) +=  vmm_packet.o
+obj-$(V3_CONFIG_FILE) += vmm_file.o
+obj-$(V3_CONFIG_CONSOLE) += vmm_console.o
+obj-$(V3_CONFIG_STREAM) += vmm_stream.o
+obj-$(V3_CONFIG_GRAPHICS_CONSOLE) += vmm_graphics_console.o
+obj-$(V3_CONFIG_KEYED_STREAMS) += vmm_keyed_stream.o
+obj-$(V3_CONFIG_HOST_DEVICE) += vmm_host_dev.o
 
 
index 6d5f767..8d6b4d1 100644 (file)
@@ -40,41 +40,41 @@ obj-y := \
 
 
 
-obj-$(CONFIG_XED) +=   vmm_xed.o
-obj-$(CONFIG_V3_DECODER) += vmm_v3dec.o
+obj-$(V3_CONFIG_XED) +=        vmm_xed.o
+obj-$(V3_CONFIG_V3_DECODER) += vmm_v3dec.o
 
-obj-$(CONFIG_SVM) +=    svm.o \
-                       svm_io.o \
-                       svm_lowlevel.o \
-                       svm_msr.o \
-                       svm_pause.o \
-                       svm_wbinvd.o \
-                       svm_handler.o \
-                       vmcb.o
+obj-$(V3_CONFIG_SVM) +=    svm.o \
+                          svm_io.o \
+                          svm_lowlevel.o \
+                          svm_msr.o \
+                          svm_pause.o \
+                          svm_wbinvd.o \
+                          svm_handler.o \
+                          vmcb.o
 
-obj-$(CONFIG_VMX) +=   vmx.o \
-                       vmx_handler.o \
-                       vmx_io.o \
-                       vmx_lowlevel.o \
-                       vmx_msr.o \
-                       vmx_hw_info.o \
-                       vmcs.o \
-                       vmx_ctrl_regs.o \
-                       vmx_assist.o \
-                       vmx_ept.o 
+obj-$(V3_CONFIG_VMX) +=        vmx.o \
+                               vmx_handler.o \
+                               vmx_io.o \
+                               vmx_lowlevel.o \
+                               vmx_msr.o \
+                               vmx_hw_info.o \
+                               vmcs.o \
+                               vmx_ctrl_regs.o \
+                               vmx_assist.o \
+                               vmx_ept.o 
 
 
 
 
-obj-$(CONFIG_INSTRUMENT_VMM) += vmm_instrument.o
-obj-$(CONFIG_TELEMETRY) += vmm_telemetry.o 
+obj-$(V3_CONFIG_INSTRUMENT_VMM) += vmm_instrument.o
+obj-$(V3_CONFIG_TELEMETRY) += vmm_telemetry.o 
 
-obj-$(CONFIG_VNET) += vmm_vnet_core.o
+obj-$(V3_CONFIG_VNET) += vmm_vnet_core.o
 
 
-obj-$(CONFIG_SYMBIOTIC) += vmm_symbiotic.o vmm_symspy.o
-obj-$(CONFIG_SYMCALL) += vmm_symcall.o
-obj-$(CONFIG_SYMMOD) += vmm_symmod.o
+obj-$(V3_CONFIG_SYMBIOTIC) += vmm_symbiotic.o vmm_symspy.o
+obj-$(V3_CONFIG_SYMCALL) += vmm_symcall.o
+obj-$(V3_CONFIG_SYMMOD) += vmm_symmod.o
 
 
 obj-y += mmu/
index 0089d17..7b3a3ef 100644 (file)
@@ -1,3 +1,3 @@
-obj-$(CONFIG_SHADOW_PAGING_VTLB) += vmm_shdw_pg_tlb.o
-obj-$(CONFIG_SWAPBYPASS) += vmm_shdw_pg_swapbypass.o
-obj-$(CONFIG_SHADOW_PAGING_CACHE1) += vmm_shdw_pg_cache.o
+obj-$(V3_CONFIG_SHADOW_PAGING_VTLB) += vmm_shdw_pg_tlb.o
+obj-$(V3_CONFIG_SWAPBYPASS) += vmm_shdw_pg_swapbypass.o
+obj-$(V3_CONFIG_SHADOW_PAGING_CACHE1) += vmm_shdw_pg_cache.o
index 5ca6a0b..32e9d24 100644 (file)
@@ -31,7 +31,7 @@
 
 #define V3_CACHED_PG 0x1
 
-#ifndef CONFIG_DEBUG_SHDW_PG_CACHE
+#ifndef V3_CONFIG_DEBUG_SHDW_PG_CACHE
 #undef PrintDebug
 #define PrintDebug(fmt, ...)
 #endif
index 250cbba..c955790 100644 (file)
 #include <palacios/vmm_paging.h>
 
 
-#ifndef CONFIG_DEBUG_SHDW_CACHE
+#ifndef V3_CONFIG_DEBUG_SHDW_CACHE
 #undef PrintDebug
 #define PrintDebug(fmt, ...)
 #endif
 
-#ifdef CONFIG_SHADOW_CACHE
+#ifdef V3_CONFIG_SHADOW_CACHE
 
 struct pde_chain {
     addr_t shadow_pdes[NR_PTE_CHAIN_ENTRIES];
index 7334cfa..91a77c6 100644 (file)
@@ -1,6 +1,6 @@
 
 
-#ifdef CONFIG_SHADOW_CACHE
+#ifdef V3_CONFIG_SHADOW_CACHE
 
 static inline int activate_shadow_pt_32(struct guest_info * core) {
     struct cr3_32 * shadow_cr3 = (struct cr3_32 *)&(core->ctrl_regs.cr3);
index 4afe7ea..473414b 100644 (file)
@@ -1,6 +1,6 @@
 
 
-#ifdef CONFIG_SHADOW_CACHE
+#ifdef V3_CONFIG_SHADOW_CACHE
 
 static inline int activate_shadow_pt_32pae(struct guest_info * info) {
     PrintError("Activating 32 bit PAE page tables not implemented\n");
index c1d92f4..6ada76b 100644 (file)
@@ -1,6 +1,6 @@
 
 
-#ifdef CONFIG_SHADOW_CACHE
+#ifdef V3_CONFIG_SHADOW_CACHE
 
 #define PT64_NX_MASK (1ULL << 63)
 //#define SHOW_ALL 
index e8c7209..0b0a776 100644 (file)
@@ -27,7 +27,7 @@
 #include <palacios/vmm_hashtable.h>
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -86,7 +86,7 @@ struct v3_swap_dev {
 struct swapbypass_vm_state {
     struct v3_swap_dev devs[256];
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     uint32_t read_faults;
     uint32_t write_faults;
     uint32_t flushes;
@@ -135,7 +135,7 @@ static struct shadow_page_data * create_new_shadow_pt(struct guest_info * core);
 
 
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
 static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     struct swapbypass_vm_state * swap_state = (struct swapbypass_vm_state *)(vm->shdw_impl.impl_data);
 
@@ -206,7 +206,7 @@ static addr_t map_swp_page(struct v3_vm_info * vm, pte32_t * shadow_pte, pte32_t
 
     if (shdw_ptr_list == NULL) {
        shdw_ptr_list = (struct list_head *)V3_Malloc(sizeof(struct list_head));
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        swap_state->list_size++;
 #endif
        INIT_LIST_HEAD(shdw_ptr_list);
@@ -217,7 +217,7 @@ static addr_t map_swp_page(struct v3_vm_info * vm, pte32_t * shadow_pte, pte32_t
 
     if (shdw_ptr == NULL) {
        PrintError("MEMORY LEAK\n");
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
        telemetry_cb(vm, NULL, "");
 #endif
        return 0;
@@ -343,7 +343,7 @@ int v3_swap_flush(struct v3_vm_info * vm) {
 
     //    PrintDebug("Flushing Symbiotic Swap table\n");
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     swap_state->flushes++;
 #endif
 
@@ -393,7 +393,7 @@ static int sb_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     memset(sb_state, 0, sizeof(struct swapbypass_vm_state));
     sb_state->shdw_ptr_ht = v3_create_htable(0, swap_hash_fn, swap_eq_fn);
 
-#ifdef CONFIG_SWAPBYPASS_TELEMETRY
+#ifdef V3_CONFIG_SWAPBYPASS_TELEMETRY
     if (vm->enable_telemetry) {
        v3_add_telemetry_cb(vm, telemetry_cb, NULL);
     }
index 1aee15a..bb5de94 100644 (file)
@@ -241,7 +241,7 @@ static int handle_pte_shadow_pagefault_32(struct guest_info * info, addr_t fault
 
 
 
-#ifdef CONFIG_SYMBIOTIC_SWAP_TELEMETRY
+#ifdef V3_CONFIG_SYMBIOTIC_SWAP_TELEMETRY
            if (error_code.write == 0) {
                info->vm_info->swap_state.read_faults++;
            } else {
@@ -301,7 +301,7 @@ static int handle_pte_shadow_pagefault_32(struct guest_info * info, addr_t fault
                        
                        shadow_pte->page_base_addr = swp_pg_pa;
                        
-#ifdef CONFIG_SYMBIOTIC_SWAP_TELEMETRY
+#ifdef V3_CONFIG_SYMBIOTIC_SWAP_TELEMETRY
                        info->vm_info->swap_state.mapped_pages++;
 #endif
                        //              PrintError("Swap fault handled\n");
index f38f6ba..60b2d21 100644 (file)
@@ -24,7 +24,7 @@
 #include <palacios/vm_guest_mem.h>
 
 
-#ifndef CONFIG_DEBUG_SHDW_PG_VTLB
+#ifndef V3_CONFIG_DEBUG_SHDW_PG_VTLB
 #undef PrintDebug
 #define PrintDebug(fmt, ...)
 #endif
index bb65a6f..bb5b525 100644 (file)
@@ -44,7 +44,7 @@
 #include <palacios/vmm_sprintf.h>
 
 
-#ifndef CONFIG_DEBUG_SVM
+#ifndef V3_CONFIG_DEBUG_SVM
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -53,7 +53,7 @@
 uint32_t v3_last_exit;
 
 // This is a global pointer to the host's VMCB
-static addr_t host_vmcbs[CONFIG_MAX_CPUS] = { [0 ... CONFIG_MAX_CPUS - 1] = 0};
+static addr_t host_vmcbs[V3_CONFIG_MAX_CPUS] = { [0 ... V3_CONFIG_MAX_CPUS - 1] = 0};
 
 
 
@@ -105,7 +105,7 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info * core) {
 
     ctrl_area->instrs.HLT = 1;
 
-#ifdef CONFIG_TIME_VIRTUALIZE_TSC
+#ifdef V3_CONFIG_TIME_VIRTUALIZE_TSC
     ctrl_area->instrs.RDTSC = 1;
     ctrl_area->svm_instrs.RDTSCP = 1;
 #endif
@@ -326,7 +326,7 @@ static int update_irq_exit_state(struct guest_info * info) {
 
     if ((info->intr_core_state.irq_pending == 1) && (guest_ctrl->guest_ctrl.V_IRQ == 0)) {
        
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("INTAK cycle completed for irq %d\n", info->intr_core_state.irq_vector);
 #endif
 
@@ -337,7 +337,7 @@ static int update_irq_exit_state(struct guest_info * info) {
     }
 
     if ((info->intr_core_state.irq_started == 1) && (guest_ctrl->exit_int_info.valid == 0)) {
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("Interrupt %d taken by guest\n", info->intr_core_state.irq_vector);
 #endif
 
@@ -345,7 +345,7 @@ static int update_irq_exit_state(struct guest_info * info) {
        info->intr_core_state.irq_started = 0;
 
     } else if ((info->intr_core_state.irq_started == 1) && (guest_ctrl->exit_int_info.valid == 1)) {
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("EXIT INT INFO is set (vec=%d)\n", guest_ctrl->exit_int_info.vector);
 #endif
     }
@@ -371,7 +371,7 @@ static int update_irq_entry_state(struct guest_info * info) {
        if (info->excp_state.excp_error_code_valid) {
            guest_ctrl->EVENTINJ.error_code = info->excp_state.excp_error_code;
            guest_ctrl->EVENTINJ.ev = 1;
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
            PrintDebug("Injecting exception %d with error code %x\n", excp, guest_ctrl->EVENTINJ.error_code);
 #endif
        }
@@ -380,7 +380,7 @@ static int update_irq_entry_state(struct guest_info * info) {
        
        guest_ctrl->EVENTINJ.valid = 1;
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("<%d> Injecting Exception %d (CR2=%p) (EIP=%p)\n", 
                   (int)info->num_exits, 
                   guest_ctrl->EVENTINJ.vector, 
@@ -390,7 +390,7 @@ static int update_irq_entry_state(struct guest_info * info) {
 
        v3_injecting_excp(info, excp);
     } else if (info->intr_core_state.irq_started == 1) {
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        PrintDebug("IRQ pending from previous injection\n");
 #endif
        guest_ctrl->guest_ctrl.V_IRQ = 1;
@@ -408,7 +408,7 @@ static int update_irq_entry_state(struct guest_info * info) {
                guest_ctrl->guest_ctrl.V_IGN_TPR = 1;
                guest_ctrl->guest_ctrl.V_INTR_PRIO = 0xf;
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
                PrintDebug("Injecting Interrupt %d (EIP=%p)\n", 
                           guest_ctrl->guest_ctrl.V_INTR_VECTOR, 
                           (void *)(addr_t)info->rip);
@@ -484,7 +484,7 @@ int v3_svm_enter(struct guest_info * info) {
     guest_state->rip = info->rip;
     guest_state->rsp = info->vm_regs.rsp;
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_entry_state(info);
     }
@@ -501,7 +501,7 @@ int v3_svm_enter(struct guest_info * info) {
       (void *)(addr_t)info->rip);
     */
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (info->sym_core_state.symcall_state.sym_call_active == 1) {
        if (guest_ctrl->guest_ctrl.V_IRQ == 1) {
            V3_Print("!!! Injecting Interrupt during Sym call !!!\n");
@@ -554,7 +554,7 @@ int v3_svm_enter(struct guest_info * info) {
     exit_info2 = guest_ctrl->exit_info2;
 
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_exit_state(info);
     }
index 7016197..5749eac 100644 (file)
 #include <palacios/vmm_cpuid.h>
 #include <palacios/vmm_direct_paging.h>
 
-#ifndef CONFIG_DEBUG_SVM
+#ifndef V3_CONFIG_DEBUG_SVM
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -47,7 +47,7 @@
 
 int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_info1, addr_t exit_info2) {
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     if (info->vm_info->enable_telemetry) {
        v3_telemetry_start_exit(info);
     }
@@ -114,7 +114,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
 
            break;
        case VMEXIT_CR0_WRITE: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR0 Write\n");
 #endif
            if (v3_handle_cr0_write(info) == -1) {
@@ -122,7 +122,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
        case VMEXIT_CR0_READ: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR0 Read\n");
 #endif
            if (v3_handle_cr0_read(info) == -1) {
@@ -130,7 +130,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
        case VMEXIT_CR3_WRITE: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR3 Write\n");
 #endif
            if (v3_handle_cr3_write(info) == -1) {
@@ -139,7 +139,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
 
            break;
        case  VMEXIT_CR3_READ: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR3 Read\n");
 #endif
            if (v3_handle_cr3_read(info) == -1) {
@@ -147,7 +147,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
        case VMEXIT_CR4_WRITE: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR4 Write\n");
 #endif
            if (v3_handle_cr4_write(info) == -1) {
@@ -155,7 +155,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }    
            break;
        case  VMEXIT_CR4_READ: 
-#ifdef CONFIG_DEBUG_CTRL_REGS
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR4 Read\n");
 #endif
            if (v3_handle_cr4_read(info) == -1) {
@@ -165,7 +165,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
        case VMEXIT_EXCP14: {
            addr_t fault_addr = exit_info2;
            pf_error_t * error_code = (pf_error_t *)&(exit_info1);
-#ifdef CONFIG_DEBUG_SHADOW_PAGING
+#ifdef V3_CONFIG_DEBUG_SHADOW_PAGING
            PrintDebug("PageFault at %p (error=%d)\n", 
                       (void *)fault_addr, *(uint_t *)error_code);
 #endif
@@ -195,7 +195,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
        case VMEXIT_INVLPG: 
            if (info->shdw_pg_mode == SHADOW_PAGING) {
-#ifdef CONFIG_DEBUG_SHADOW_PAGING
+#ifdef V3_CONFIG_DEBUG_SHADOW_PAGING
                PrintDebug("Invlpg\n");
 #endif
                if (v3_handle_shadow_invlpg(info) == -1) {
@@ -225,7 +225,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            //   handle_svm_smi(info); // ignored for now
            break;
        case VMEXIT_HLT:
-#ifdef CONFIG_DEBUG_HALT
+#ifdef V3_CONFIG_DEBUG_HALT
            PrintDebug("Guest halted\n");
 #endif
            if (v3_handle_halt(info) == -1) {
@@ -239,7 +239,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
        case VMEXIT_WBINVD:   
-#ifdef CONFIG_DEBUG_EMULATOR
+#ifdef V3_CONFIG_DEBUG_EMULATOR
            PrintDebug("WBINVD\n");
 #endif
            if (v3_handle_svm_wbinvd(info) == -1) { 
@@ -247,7 +247,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
         case VMEXIT_RDTSC:
-#ifdef CONFIG_DEBUG_TIME
+#ifdef V3_CONFIG_DEBUG_TIME
            PrintDebug("RDTSC/RDTSCP\n");
 #endif 
            if (v3_handle_rdtsc(info) == -1) {
@@ -256,7 +256,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            }
            break;
         case VMEXIT_RDTSCP:
-#ifdef CONFIG_DEBUG_TIME
+#ifdef V3_CONFIG_DEBUG_TIME
            PrintDebug("RDTSCP\n");
 #endif 
            if (v3_handle_rdtscp(info) == -1) {
@@ -309,7 +309,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
     }
     // END OF SWITCH (EXIT_CODE)
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     if (info->vm_info->enable_telemetry) {
        v3_telemetry_end_exit(info, exit_code);
     }
index 1aa76ae..405acc2 100644 (file)
@@ -24,7 +24,7 @@
 #include <palacios/vmm_decoder.h>
 #include <palacios/vm_guest_mem.h>
 
-#ifndef CONFIG_DEBUG_IO
+#ifndef V3_CONFIG_DEBUG_IO
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index e54a6bc..62d2a94 100644 (file)
@@ -487,13 +487,13 @@ static int info_hcall(struct guest_info * core, uint_t hcall_id, void * priv_dat
     v3_print_guest_state(core);
     
     // init SVM/VMX
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
     if ((cpu_type == V3_SVM_CPU) || (cpu_type == V3_SVM_REV3_CPU)) {
        cpu_valid = 1;
        PrintDebugVMCB((vmcb_t *)(core->vmm_data));
     }
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
     if ((cpu_type == V3_VMX_CPU) || (cpu_type == V3_VMX_EPT_CPU) || (cpu_type == V3_VMX_EPT_UG_CPU)) {
        cpu_valid = 1;
        v3_print_vmcs();
@@ -509,13 +509,13 @@ static int info_hcall(struct guest_info * core, uint_t hcall_id, void * priv_dat
 }
 
 
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
 #include <palacios/svm.h>
 #include <palacios/svm_io.h>
 #include <palacios/svm_msr.h>
 #endif
 
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
 #include <palacios/vmx.h>
 #include <palacios/vmx_io.h>
 #include <palacios/vmx_msr.h>
@@ -527,7 +527,7 @@ int v3_init_vm(struct v3_vm_info * vm) {
 
 
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     v3_init_telemetry(vm);
 #endif
 
@@ -556,7 +556,7 @@ int v3_init_vm(struct v3_vm_info * vm) {
     v3_init_time_vm(vm);
 
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     v3_init_symbiotic_vm(vm);
 #endif
 
@@ -565,14 +565,14 @@ int v3_init_vm(struct v3_vm_info * vm) {
 
     // init SVM/VMX
     switch (cpu_type) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            v3_init_svm_io_map(vm);
            v3_init_svm_msr_map(vm);
            break;
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
@@ -600,20 +600,20 @@ int v3_free_vm_internal(struct v3_vm_info * vm) {
 
 
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     v3_deinit_symbiotic_vm(vm);
 #endif
 
     // init SVM/VMX
     switch (cpu_type) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            v3_deinit_svm_io_map(vm);
            v3_deinit_svm_msr_map(vm);
            break;
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
@@ -642,7 +642,7 @@ int v3_free_vm_internal(struct v3_vm_info * vm) {
     v3_deinit_io_map(vm);
     v3_deinit_hypercall_map(vm);
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     v3_deinit_telemetry(vm);
 #endif
 
@@ -661,7 +661,7 @@ int v3_init_core(struct guest_info * core) {
     /*
      * Initialize the subsystem data strutures
      */
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     v3_init_core_telemetry(core);
 #endif
 
@@ -676,7 +676,7 @@ int v3_init_core(struct guest_info * core) {
     v3_init_decoder(core);
 
 
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     v3_init_symbiotic_core(core);
 #endif
 
@@ -684,7 +684,7 @@ int v3_init_core(struct guest_info * core) {
 
 
     switch (cpu_type) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            if (v3_init_svm_vmcb(core, vm->vm_class) == -1) {
@@ -693,7 +693,7 @@ int v3_init_core(struct guest_info * core) {
            }
            break;
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
@@ -717,7 +717,7 @@ int v3_free_core(struct guest_info * core) {
     v3_cpu_arch_t cpu_type = v3_get_cpu_type(V3_Get_CPU());
 
     
-#ifdef CONFIG_SYMBIOTIC
+#ifdef V3_CONFIG_SYMBIOTIC
     v3_deinit_symbiotic_core(core);
 #endif
 
@@ -732,12 +732,12 @@ int v3_free_core(struct guest_info * core) {
 
     v3_free_passthrough_pts(core);
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     v3_deinit_core_telemetry(core);
 #endif
 
     switch (cpu_type) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            if (v3_deinit_svm_vmcb(core) == -1) {
@@ -746,7 +746,7 @@ int v3_free_core(struct guest_info * core) {
            }
            break;
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
index ab26a6f..ebcdfb8 100644 (file)
 #include <palacios/vmm_sprintf.h>
 #include <palacios/vmm_extensions.h>
 
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
 #include <palacios/svm.h>
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
 #include <palacios/vmx.h>
 #endif
 
-#ifdef CONFIG_VNET
+#ifdef V3_CONFIG_VNET
 #include <palacios/vmm_vnet.h>
 #endif
 
 
-v3_cpu_arch_t v3_cpu_types[CONFIG_MAX_CPUS];
+v3_cpu_arch_t v3_cpu_types[V3_CONFIG_MAX_CPUS];
 struct v3_os_hooks * os_hooks = NULL;
 int v3_dbg_enable = 0;
 
@@ -47,14 +47,14 @@ int v3_dbg_enable = 0;
 static void init_cpu(void * arg) {
     uint32_t cpu_id = (uint32_t)(addr_t)arg;
 
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
     if (v3_is_svm_capable()) {
         PrintDebug("Machine is SVM Capable\n");
         v3_init_svm_cpu(cpu_id);
        
     } else 
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
     if (v3_is_vmx_capable()) {
        PrintDebug("Machine is VMX Capable\n");
        v3_init_vmx_cpu(cpu_id);
@@ -72,14 +72,14 @@ static void deinit_cpu(void * arg) {
 
 
     switch (v3_cpu_types[cpu_id]) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            PrintDebug("Deinitializing SVM CPU %d\n", cpu_id);
            v3_deinit_svm_cpu(cpu_id);
            break;
 #endif
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
@@ -104,7 +104,7 @@ void Init_V3(struct v3_os_hooks * hooks, int num_cpus) {
     // Set global variables. 
     os_hooks = hooks;
 
-    for (i = 0; i < CONFIG_MAX_CPUS; i++) {
+    for (i = 0; i < V3_CONFIG_MAX_CPUS; i++) {
        v3_cpu_types[i] = V3_INVALID_CPU;
     }
 
@@ -118,17 +118,17 @@ void Init_V3(struct v3_os_hooks * hooks, int num_cpus) {
     V3_init_extensions();
 
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     V3_init_symmod();
 #endif
 
 
-#ifdef CONFIG_VNET
+#ifdef V3_CONFIG_VNET
     v3_init_vnet();
 #endif
 
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
     if ((hooks) && (hooks->call_on_cpu)) {
 
        for (i = 0; i < num_cpus; i++) {
@@ -152,18 +152,18 @@ void Shutdown_V3() {
 
     V3_deinit_extensions();
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     V3_deinit_symmod();
 #endif
 
 
-#ifdef CONFIG_VNET
+#ifdef V3_CONFIG_VNET
     v3_deinit_vnet();
 #endif
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
     if ((os_hooks) && (os_hooks->call_on_cpu)) {
-       for (i = 0; i < CONFIG_MAX_CPUS; i++) {
+       for (i = 0; i < V3_CONFIG_MAX_CPUS; i++) {
            if (v3_cpu_types[i] != V3_INVALID_CPU) {
                deinit_cpu((void *)(addr_t)i);
            }
@@ -213,13 +213,13 @@ static int start_core(void * p)
               core->cpu_id, (void *)(addr_t)core->rip);
 
     switch (v3_cpu_types[0]) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            return v3_start_svm_guest(core);
            break;
 #endif
-#if CONFIG_VMX
+#if V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
@@ -236,7 +236,7 @@ static int start_core(void * p)
 
 
 // For the moment very ugly. Eventually we will shift the cpu_mask to an arbitrary sized type...
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
 #define MAX_CORES 32
 #else
 #define MAX_CORES 1
@@ -272,7 +272,7 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) {
        return -1;
     }
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
     // spawn off new threads, for other cores
     for (i = 0, vcore_id = 1; (i < MAX_CORES) && (vcore_id < vm->num_cores); i++) {
        int major = 0;
@@ -492,7 +492,7 @@ void v3_print_cond(const char * fmt, ...) {
 }
 
 
-#ifdef CONFIG_MULTITHREAD_OS
+#ifdef V3_CONFIG_MULTITHREAD_OS
 
 void v3_interrupt_cpu(struct v3_vm_info * vm, int logical_cpu, int vector) {
     extern struct v3_os_hooks * os_hooks;
@@ -507,13 +507,13 @@ void v3_interrupt_cpu(struct v3_vm_info * vm, int logical_cpu, int vector) {
 
 int v3_vm_enter(struct guest_info * info) {
     switch (v3_cpu_types[0]) {
-#ifdef CONFIG_SVM
+#ifdef V3_CONFIG_SVM
        case V3_SVM_CPU:
        case V3_SVM_REV3_CPU:
            return v3_svm_enter(info);
            break;
 #endif
-#if CONFIG_VMX
+#if V3_CONFIG_VMX
        case V3_VMX_CPU:
        case V3_VMX_EPT_CPU:
        case V3_VMX_EPT_UG_CPU:
index 9be1933..b834952 100644 (file)
 
 .data
 
-#ifdef CONFIG_VMX
+#ifdef V3_CONFIG_VMX
 .globl v3_vmxassist_start
 v3_vmxassist_start:
-.incbin CONFIG_VMXASSIST_PATH
+.incbin V3_CONFIG_VMXASSIST_PATH
 .globl v3_vmxassist_end
 v3_vmxassist_end:
 #endif
@@ -32,21 +32,21 @@ v3_vmxassist_end:
 
 .globl v3_vgabios_start
 v3_vgabios_start:
-.incbin CONFIG_VGABIOS_PATH
+.incbin V3_CONFIG_VGABIOS_PATH
 .global v3_vgabios_end
 v3_vgabios_end:
 
 .globl v3_rombios_start
 v3_rombios_start:
-.incbin CONFIG_ROMBIOS_PATH
+.incbin V3_CONFIG_ROMBIOS_PATH
 .globl v3_rombios_end
 v3_rombios_end:
 
 
-#ifdef CONFIG_USE_PXE_BIOS
+#ifdef V3_CONFIG_USE_PXE_BIOS
 .globl pxebios_start
 pxebios_start:
-.incbin CONFIG_PXEBIOS_PATH
+.incbin V3_CONFIG_PXEBIOS_PATH
 .globl pxebios_end
 pxebios_end:
 #endif
index 640144e..b000939 100644 (file)
@@ -202,7 +202,7 @@ static inline uint32_t get_alignment(char * align_str) {
        }
     }
     
-#ifndef CONFIG_ALIGNED_PG_ALLOC
+#ifndef V3_CONFIG_ALIGNED_PG_ALLOC
     if (alignment != PAGE_SIZE_4KB) {
        PrintError("Aligned page allocations are not supported in this host (requested alignment=%d)\n", alignment);
        PrintError("Ignoring alignment request\n");
@@ -247,7 +247,7 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
        return -1;
     }
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     {
        char * telemetry = v3_cfg_val(vm_cfg, "telemetry");
 
index b27df4b..d5a8650 100644 (file)
@@ -26,7 +26,7 @@
 #include <palacios/vmm_direct_paging.h>
 #include <palacios/svm.h>
 
-#ifndef CONFIG_DEBUG_CTRL_REGS
+#ifndef V3_CONFIG_DEBUG_CTRL_REGS
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 5abb57b..a6f71e5 100644 (file)
@@ -23,7 +23,7 @@
 #include <palacios/vmm_decoder.h>
 
 
-#ifndef CONFIG_DEBUG_DEV_MGR
+#ifndef V3_CONFIG_DEBUG_DEV_MGR
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -50,7 +50,7 @@ int V3_init_devices() {
     struct v3_device_info * tmp_dev =  __start__v3_devices;
     int i = 0;
 
-#ifdef CONFIG_DEBUG_DEV_MGR
+#ifdef V3_CONFIG_DEBUG_DEV_MGR
     {
        int num_devices = (__stop__v3_devices - __start__v3_devices) / sizeof(struct v3_device_info);
        PrintDebug("%d Virtual devices registered with Palacios\n", num_devices);
index ca5b38a..b044b1f 100644 (file)
@@ -25,7 +25,7 @@
 #include <palacios/vm_guest.h>
 
 
-#ifndef CONFIG_DEBUG_NESTED_PAGING
+#ifndef V3_CONFIG_DEBUG_NESTED_PAGING
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index c05e09d..20c6ecb 100644 (file)
@@ -24,7 +24,7 @@
 #include <palacios/vmm_instr_emulator.h>
 #include <palacios/vmm_ctrl_regs.h>
 
-#ifndef CONFIG_DEBUG_EMULATOR
+#ifndef V3_CONFIG_DEBUG_EMULATOR
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 7970a40..fc6d3d5 100644 (file)
@@ -22,7 +22,7 @@
 #include <palacios/vmm_intr.h>
 
 
-#ifndef CONFIG_DEBUG_HALT
+#ifndef V3_CONFIG_DEBUG_HALT
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index c9c1800..8c4e1c2 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <palacios/vmm_lock.h>
 
-#ifndef CONFIG_DEBUG_INTERRUPTS
+#ifndef V3_CONFIG_DEBUG_INTERRUPTS
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -389,7 +389,7 @@ intr_type_t v3_get_intr_type(struct guest_info * info) {
        }
     }
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
     if (type == V3_INVALID_INTR) {
        PrintError("[get_intr_type] Invalid_Intr\n");
     }
index 0e099e5..3642c3a 100644 (file)
@@ -24,7 +24,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_IO
+#ifndef V3_CONFIG_DEBUG_IO
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 6fb164b..cb5993a 100644 (file)
@@ -66,7 +66,7 @@ int v3_init_mem_map(struct v3_vm_info * vm) {
     map->base_region.guest_start = 0;
     map->base_region.guest_end = mem_pages * PAGE_SIZE_4KB;
 
-#ifdef CONFIG_ALIGNED_PG_ALLOC
+#ifdef V3_CONFIG_ALIGNED_PG_ALLOC
     map->base_region.host_addr = (addr_t)V3_AllocAlignedPages(mem_pages, vm->mem_align);
 #else
     map->base_region.host_addr = (addr_t)V3_AllocPages(mem_pages);
index ec91056..972c800 100644 (file)
@@ -46,7 +46,7 @@ static pt_entry_type_t pte64_lookup(pte64_t * pt, addr_t addr, addr_t * entry);
 
 
 
-#ifndef CONFIG_DEBUG_SHADOW_PAGING
+#ifndef V3_CONFIG_DEBUG_SHADOW_PAGING
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index b46469c..9743073 100644 (file)
 
 
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
-#ifdef CONFIG_SYMBIOTIC_SWAP
+#ifdef V3_CONFIG_SYMBIOTIC_SWAP
 #include <palacios/vmm_sym_swap.h>
 #endif
 
-#ifndef CONFIG_DEBUG_SHADOW_PAGING
+#ifndef V3_CONFIG_DEBUG_SHADOW_PAGING
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -107,7 +107,7 @@ int V3_deinit_shdw_paging() {
  ***/
 
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
 static void telemetry_cb(struct v3_vm_info * vm, void * private_data, char * hdr) {
     int i = 0;
     for (i = 0; i < vm->num_cores; i++) {
@@ -136,7 +136,7 @@ int v3_init_shdw_pg_state(struct guest_info * core) {
     }
 
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
     v3_add_telemetry_cb(core->vm_info, telemetry_cb, NULL);
 #endif
   
@@ -152,7 +152,7 @@ int v3_deinit_shdw_pg_state(struct guest_info * core) {
        return -1;
     }
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
     v3_remove_telemetry_cb(core->vm_info, telemetry_cb, NULL);
 #endif
 
@@ -302,7 +302,7 @@ int v3_handle_shadow_invlpg(struct guest_info * core) {
 int v3_inject_guest_pf(struct guest_info * core, addr_t fault_addr, pf_error_t error_code) {
     core->ctrl_regs.cr2 = fault_addr;
 
-#ifdef CONFIG_SHADOW_PAGING_TELEMETRY
+#ifdef V3_CONFIG_SHADOW_PAGING_TELEMETRY
     core->shdw_pg_state.guest_faults++;
 #endif
 
index b80f3fa..6403007 100644 (file)
@@ -87,18 +87,18 @@ struct snprintf_arg {
 
 
 
-#if defined(CONFIG_BUILT_IN_STDIO) &&                \
-    ( defined(CONFIG_BUILT_IN_SPRINTF) ||            \
-      defined(CONFIG_BUILT_IN_SNPRINTF) ||           \
-      defined(CONFIG_BUILT_IN_VSPRINTF) ||           \
-      defined(CONFIG_BUILT_IN_VSNRPRINTF ))
+#if defined(V3_CONFIG_BUILT_IN_STDIO) &&                     \
+    ( defined(V3_CONFIG_BUILT_IN_SPRINTF) ||         \
+      defined(V3_CONFIG_BUILT_IN_SNPRINTF) ||        \
+      defined(V3_CONFIG_BUILT_IN_VSPRINTF) ||        \
+      defined(V3_CONFIG_BUILT_IN_VSNRPRINTF ))
 
 static char * ksprintn(char * nbuf, uint64_t num, int base, int *len, int upper);
 static void snprintf_func(int ch, void * arg);
 static int kvprintf(char const * fmt, void (*func)(int, void *), void * arg, int radix, va_list ap);
 
 
-#ifdef CONFIG_BUILT_IN_SPRINTF
+#ifdef V3_CONFIG_BUILT_IN_SPRINTF
 /*
  * Scaled down version of sprintf(3).
  */
@@ -115,7 +115,7 @@ int sprintf(char * buf, const char * cfmt, ...) {
 #endif 
 
 
-#ifdef CONFIG_BUILT_IN_VSPRINTF
+#ifdef V3_CONFIG_BUILT_IN_VSPRINTF
 /*
  * Scaled down version of vsprintf(3).
  */
@@ -129,7 +129,7 @@ int vsprintf(char * buf, const char * cfmt, va_list ap) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_SNPRINTF
+#ifdef V3_CONFIG_BUILT_IN_SNPRINTF
 /*
  * Scaled down version of snprintf(3).
  */
@@ -164,7 +164,7 @@ int vsnprintf(char * str, size_t size, const char * format, va_list ap) {
 
 
 
-#ifdef CONFIG_BUILT_IN_VSNRPRINTF
+#ifdef V3_CONFIG_BUILT_IN_VSNRPRINTF
 /*
  * Kernel version which takes radix argument vsnprintf(3).
  */
@@ -552,7 +552,7 @@ number:
 }
 
 
-#endif // CONFIG_BUILT_IN_STDIO
+#endif // V3_CONFIG_BUILT_IN_STDIO
 
 
 
index effaf32..725fa17 100644 (file)
@@ -41,7 +41,7 @@
 #include <palacios/vmm.h>
 
 
-#ifdef CONFIG_BUILT_IN_MEMSET
+#ifdef V3_CONFIG_BUILT_IN_MEMSET
 void * memset(void * s, int c, size_t n) {
     uchar_t * p = (uchar_t *) s;
 
@@ -54,7 +54,7 @@ void * memset(void * s, int c, size_t n) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_MEMCPY
+#ifdef V3_CONFIG_BUILT_IN_MEMCPY
 void * memcpy(void * dst, const void * src, size_t n) {
     uchar_t * d = (uchar_t *) dst;
     const uchar_t * s = (const uchar_t *)src;
@@ -68,7 +68,7 @@ void * memcpy(void * dst, const void * src, size_t n) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_MEMMOVE
+#ifdef V3_CONFIG_BUILT_IN_MEMMOVE
 void * memmove(void * dst, const void * src, size_t n) {
     uint8_t * tmp = (uint8_t *)V3_Malloc(n);
     
@@ -81,7 +81,7 @@ void * memmove(void * dst, const void * src, size_t n) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_MEMCMP
+#ifdef V3_CONFIG_BUILT_IN_MEMCMP
 int memcmp(const void * s1_, const void * s2_, size_t n) {
     const char * s1 = s1_;
     const char * s2 = s2_;
@@ -102,7 +102,7 @@ int memcmp(const void * s1_, const void * s2_, size_t n) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRLEN
+#ifdef V3_CONFIG_BUILT_IN_STRLEN
 size_t strlen(const char * s) {
     size_t len = 0;
 
@@ -116,7 +116,7 @@ size_t strlen(const char * s) {
 
 
 
-#ifdef CONFIG_BUILT_IN_STRNLEN
+#ifdef V3_CONFIG_BUILT_IN_STRNLEN
 /*
  * This it a GNU extension.
  * It is like strlen(), but it will check at most maxlen
@@ -137,7 +137,7 @@ size_t strnlen(const char * s, size_t maxlen) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRCMP
+#ifdef V3_CONFIG_BUILT_IN_STRCMP
 int strcmp(const char * s1, const char * s2) {
     while (1) {
        int cmp = (*s1 - *s2);
@@ -152,7 +152,7 @@ int strcmp(const char * s1, const char * s2) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_STRCASECMP
+#ifdef V3_CONFIG_BUILT_IN_STRCASECMP
 int strcasecmp(const char * s1, const char * s2) {
     while (1) {
        int cmp = (tolower(*s1) - tolower(*s2));
@@ -169,7 +169,7 @@ int strcasecmp(const char * s1, const char * s2) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRNCMP
+#ifdef V3_CONFIG_BUILT_IN_STRNCMP
 int strncmp(const char * s1, const char * s2, size_t limit) {
     size_t i = 0;
 
@@ -190,7 +190,7 @@ int strncmp(const char * s1, const char * s2, size_t limit) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_STRNCASECMP
+#ifdef V3_CONFIG_BUILT_IN_STRNCASECMP
 int strncasecmp(const char * s1, const char * s2, size_t limit) {
     size_t i = 0;
 
@@ -211,7 +211,7 @@ int strncasecmp(const char * s1, const char * s2, size_t limit) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRCAT
+#ifdef V3_CONFIG_BUILT_IN_STRCAT
 char * strcat(char * s1, const char * s2) {
     char * t1 = s1;
 
@@ -225,7 +225,7 @@ char * strcat(char * s1, const char * s2) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRNCAT
+#ifdef V3_CONFIG_BUILT_IN_STRNCAT
 char * strncat(char * s1, const char * s2, size_t limit) {
     size_t i = 0;
     char * t1;
@@ -247,7 +247,7 @@ char * strncat(char * s1, const char * s2, size_t limit) {
 
 
 
-#ifdef CONFIG_BUILT_IN_STRCPY
+#ifdef V3_CONFIG_BUILT_IN_STRCPY
 char * strcpy(char * dest, const char * src)
 {
     char *ret = dest;
@@ -262,7 +262,7 @@ char * strcpy(char * dest, const char * src)
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRNCPY
+#ifdef V3_CONFIG_BUILT_IN_STRNCPY
 char * strncpy(char * dest, const char * src, size_t limit) {
     char * ret = dest;
 
@@ -280,7 +280,7 @@ char * strncpy(char * dest, const char * src, size_t limit) {
 
 
 
-#ifdef  CONFIG_BUILT_IN_STRDUP
+#ifdef  V3_CONFIG_BUILT_IN_STRDUP
 char * strdup(const char * s1) {
     char *ret;
 
@@ -294,7 +294,7 @@ char * strdup(const char * s1) {
 
 
 
-#ifdef CONFIG_BUILT_IN_ATOI
+#ifdef V3_CONFIG_BUILT_IN_ATOI
 int atoi(const char * buf) {
     int ret = 0;
 
@@ -379,7 +379,7 @@ uint64_t strtox(const char * nptr, char ** endptr) {
 
 
 
-#ifdef CONFIG_BUILT_IN_STRCHR
+#ifdef V3_CONFIG_BUILT_IN_STRCHR
 char * strchr(const char * s, int c) {
     while (*s != '\0') {
        if (*s == c)
@@ -391,7 +391,7 @@ char * strchr(const char * s, int c) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRRCHR
+#ifdef V3_CONFIG_BUILT_IN_STRRCHR
 char * strrchr(const char * s, int c) {
     size_t len = strlen(s);
     const char * p = s + len;
@@ -407,7 +407,7 @@ char * strrchr(const char * s, int c) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_STRPBRK
+#ifdef V3_CONFIG_BUILT_IN_STRPBRK
 char * strpbrk(const char * s, const char * accept) {
     size_t setLen = strlen(accept);
 
@@ -425,7 +425,7 @@ char * strpbrk(const char * s, const char * accept) {
 }
 #endif
 
-#ifdef CONFIG_BUILT_IN_STRSPN
+#ifdef V3_CONFIG_BUILT_IN_STRSPN
 size_t strspn(const char * s, const char * accept) {
     int match = 1;
     int cnt = 0;
@@ -449,7 +449,7 @@ size_t strspn(const char * s, const char * accept) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRCSPN
+#ifdef V3_CONFIG_BUILT_IN_STRCSPN
 size_t strcspn(const char * s, const char * reject) {
     int match = 0;
     int cnt = 0;
@@ -471,7 +471,7 @@ size_t strcspn(const char * s, const char * reject) {
 #endif
 
 
-#ifdef CONFIG_BUILT_IN_STRSTR
+#ifdef V3_CONFIG_BUILT_IN_STRSTR
 char *strstr(const char *haystack, const char *needle)
 {
         int l1, l2;
index 32ef348..8fda86e 100644 (file)
@@ -56,14 +56,14 @@ int v3_init_symbiotic_vm(struct v3_vm_info * vm) {
        return -1;
     }
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (v3_init_symcall_vm(vm) == -1) {
        PrintError("Error intializing global SymCall state\n");
        return -1;
     }
 #endif
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     if (v3_init_symmod_vm(vm, vm->cfg_data->cfg) == -1) {
        PrintError("Error initializing global SymMod state\n");
        return -1;
@@ -77,7 +77,7 @@ int v3_init_symbiotic_vm(struct v3_vm_info * vm) {
 
 int v3_deinit_symbiotic_vm(struct v3_vm_info * vm) {
 
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
     if (v3_deinit_symmod_vm(vm) == -1) {
        PrintError("Error deinitializing global SymMod state\n");
        return -1;
index 2fdca40..09e74b8 100644 (file)
@@ -24,8 +24,8 @@
 #include <palacios/vmm_sprintf.h>
 
 
-#ifdef CONFIG_TELEMETRY_GRANULARITY
-#define DEFAULT_GRANULARITY CONFIG_TELEMETRY_GRANULARITY
+#ifdef V3_CONFIG_TELEMETRY_GRANULARITY
+#define DEFAULT_GRANULARITY V3_CONFIG_TELEMETRY_GRANULARITY
 #else 
 #define DEFAULT_GRANULARITY 50000
 #endif
index 357bae4..a0047af 100644 (file)
@@ -22,7 +22,7 @@
 #include <palacios/vmm_time.h>
 #include <palacios/vm_guest.h>
 
-#ifndef CONFIG_DEBUG_TIME
+#ifndef V3_CONFIG_DEBUG_TIME
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 54e11ad..6b9758c 100644 (file)
@@ -20,7 +20,7 @@
 #include <palacios/vmm_decoder.h>
 #include <palacios/vmm_instr_decoder.h>
 
-#ifndef CONFIG_DEBUG_DECODER
+#ifndef V3_CONFIG_DEBUG_DECODER
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -121,7 +121,7 @@ int v3_decode(struct guest_info * core, addr_t instr_ptr, struct x86_instr * ins
 
     instr->instr_length += length;
 
-#ifdef CONFIG_DEBUG_DECODER
+#ifdef V3_CONFIG_DEBUG_DECODER
     v3_print_instr(instr);
 #endif
 
index 92f8467..c3d9603 100644 (file)
@@ -26,7 +26,7 @@
 #include <palacios/vmm_sprintf.h>
 #include <palacios/vmm_ethernet.h>
 
-#ifndef CONFIG_DEBUG_VNET
+#ifndef V3_CONFIG_DEBUG_VNET
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -116,7 +116,7 @@ static struct {
 } vnet_state;
        
 
-#ifdef CONFIG_DEBUG_VNET
+#ifdef V3_CONFIG_DEBUG_VNET
 static inline void mac_to_string(uint8_t * mac, char * buf) {
     snprintf(buf, 100, "%2x:%2x:%2x:%2x:%2x:%2x", 
             mac[0], mac[1], mac[2],
@@ -250,7 +250,7 @@ int v3_vnet_add_route(struct v3_vnet_route route) {
     new_route = (struct vnet_route_info *)V3_Malloc(sizeof(struct vnet_route_info));
     memset(new_route, 0, sizeof(struct vnet_route_info));
 
-#ifdef CONFIG_DEBUG_VNET
+#ifdef V3_CONFIG_DEBUG_VNET
     PrintDebug("VNET/P Core: add_route_entry:\n");
     print_route(&route);
 #endif
@@ -281,7 +281,7 @@ int v3_vnet_add_route(struct v3_vnet_route route) {
     v3_unlock_irqrestore(vnet_state.lock, flags);
    
 
-#ifdef CONFIG_DEBUG_VNET
+#ifdef V3_CONFIG_DEBUG_VNET
     dump_routes();
 #endif
 
@@ -324,7 +324,7 @@ static struct route_list * match_route(const struct v3_vnet_pkt * pkt) {
     //    uint8_t src_type = pkt->src_type;
     //  uint32_t src_link = pkt->src_id;
 
-#ifdef CONFIG_DEBUG_VNET
+#ifdef V3_CONFIG_DEBUG_VNET
     {
        char dst_str[100];
        char src_str[100];
index a53a8b4..1a80d18 100644 (file)
@@ -35,7 +35,7 @@
 
 
 
-#ifndef CONFIG_DEBUG_DECODER
+#ifndef V3_CONFIG_DEBUG_DECODER
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -342,7 +342,7 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins
 
     xed_iform_enum_t iform = xed_decoded_inst_get_iform_enum(&xed_instr);
 
-#ifdef CONFIG_DEBUG_DECODER
+#ifdef V3_CONFIG_DEBUG_DECODER
     xed_iclass_enum_t iclass = xed_decoded_inst_get_iclass(&xed_instr);
 
     PrintDebug("iform=%s, iclass=%s\n", xed_iform_enum_t2str(iform), xed_iclass_enum_t2str(iclass));
index be2c77c..4a7a6e9 100644 (file)
@@ -36,7 +36,7 @@
 #include <palacios/vmx_assist.h>
 #include <palacios/vmx_hw_info.h>
 
-#ifndef CONFIG_DEBUG_VMX
+#ifndef V3_CONFIG_DEBUG_VMX
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -47,8 +47,8 @@ static struct vmx_hw_info hw_info;
 
 extern v3_cpu_arch_t v3_cpu_types[];
 
-static addr_t active_vmcs_ptrs[CONFIG_MAX_CPUS] = { [0 ... CONFIG_MAX_CPUS - 1] = 0};
-static addr_t host_vmcs_ptrs[CONFIG_MAX_CPUS] = { [0 ... CONFIG_MAX_CPUS - 1] = 0};
+static addr_t active_vmcs_ptrs[V3_CONFIG_MAX_CPUS] = { [0 ... V3_CONFIG_MAX_CPUS - 1] = 0};
+static addr_t host_vmcs_ptrs[V3_CONFIG_MAX_CPUS] = { [0 ... V3_CONFIG_MAX_CPUS - 1] = 0};
 
 extern int v3_vmx_launch(struct v3_gprs * vm_regs, struct guest_info * info, struct v3_ctrl_regs * ctrl_regs);
 extern int v3_vmx_resume(struct v3_gprs * vm_regs, struct guest_info * info, struct v3_ctrl_regs * ctrl_regs);
@@ -193,7 +193,7 @@ static int init_vmcs_bios(struct guest_info * core, struct vmx_data * vmx_state)
 
     vmx_state->pri_proc_ctrls.pause_exit = 0;
     vmx_state->pri_proc_ctrls.tsc_offset = 1;
-#ifdef CONFIG_TIME_VIRTUALIZE_TSC
+#ifdef V3_CONFIG_TIME_VIRTUALIZE_TSC
     vmx_state->pri_proc_ctrls.rdtsc_exit = 1;
 #endif
 
@@ -560,7 +560,7 @@ static int update_irq_exit_state(struct guest_info * info) {
     check_vmcs_read(VMCS_IDT_VECTOR_INFO, &(idt_vec_info.value));
 
     if ((info->intr_core_state.irq_started == 1) && (idt_vec_info.valid == 0)) {
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
         V3_Print("Calling v3_injecting_intr\n");
 #endif
         info->intr_core_state.irq_started = 0;
@@ -592,14 +592,14 @@ static int update_irq_entry_state(struct guest_info * info) {
             check_vmcs_write(VMCS_ENTRY_EXCP_ERR, info->excp_state.excp_error_code);
             int_info.error_code = 1;
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
             V3_Print("Injecting exception %d with error code %x\n", 
                     int_info.vector, info->excp_state.excp_error_code);
 #endif
         }
 
         int_info.valid = 1;
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
         V3_Print("Injecting exception %d (EIP=%p)\n", int_info.vector, (void *)(addr_t)info->rip);
 #endif
         check_vmcs_write(VMCS_ENTRY_INT_INFO, int_info.value);
@@ -611,7 +611,7 @@ static int update_irq_entry_state(struct guest_info * info) {
        
         if ((info->intr_core_state.irq_started == 1) && (idt_vec_info.valid == 1)) {
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
             V3_Print("IRQ pending from previous injection\n");
 #endif
 
@@ -638,7 +638,7 @@ static int update_irq_entry_state(struct guest_info * info) {
                     ent_int.error_code = 0;
                     ent_int.valid = 1;
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
                     V3_Print("Injecting Interrupt %d at exit %u(EIP=%p)\n", 
                               info->intr_core_state.irq_vector, 
                               (uint32_t)info->num_exits, 
@@ -683,7 +683,7 @@ static int update_irq_entry_state(struct guest_info * info) {
 
         check_vmcs_read(VMCS_EXIT_INSTR_LEN, &instr_len);
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
         V3_Print("Enabling Interrupt-Window exiting: %d\n", instr_len);
 #endif
 
@@ -761,7 +761,7 @@ int v3_vmx_enter(struct guest_info * info) {
     v3_vmx_restore_vmcs(info);
 
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_entry_state(info);
     }
@@ -843,7 +843,7 @@ int v3_vmx_enter(struct guest_info * info) {
     exit_log[info->num_exits % 10] = exit_info;
 
 
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
     if (info->sym_core_state.symcall_state.sym_call_active == 0) {
        update_irq_exit_state(info);
     }
@@ -857,7 +857,7 @@ int v3_vmx_enter(struct guest_info * info) {
         vmx_info->pri_proc_ctrls.int_wndw_exit = 0;
         vmcs_write(VMCS_PROC_CTRLS, vmx_info->pri_proc_ctrls.value);
 
-#ifdef CONFIG_DEBUG_INTERRUPTS
+#ifdef V3_CONFIG_DEBUG_INTERRUPTS
        V3_Print("Interrupts available again! (RIP=%llx)\n", info->rip);
 #endif
     }
index cfea9bb..cd2c2b9 100644 (file)
@@ -23,7 +23,7 @@
 #include <palacios/vmx.h>
 #include <palacios/vmm_ctrl_regs.h>
 
-#ifndef CONFIG_DEBUG_VMX
+#ifndef V3_CONFIG_DEBUG_VMX
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 7aa7361..6bbde36 100644 (file)
 #include <palacios/vmm_direct_paging.h>
 #include <palacios/vmm_ctrl_regs.h>
 
-#if 0
-#ifndef CONFIG_DEBUG_VMX
+#ifndef V3_CONFIG_DEBUG_VMX
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
-#endif
 
 static v3_reg_t * get_reg_ptr(struct guest_info * info, struct vmx_exit_cr_qual * cr_qual);
 static int handle_mov_to_cr0(struct guest_info * info, v3_reg_t * new_val, struct vmx_exit_info * exit_info);
index 44d3282..71c1eab 100644 (file)
 #include <palacios/vmm_halt.h>
 #include <palacios/vmx_ept.h>
 
-#ifndef CONFIG_DEBUG_VMX
+#ifndef V3_CONFIG_DEBUG_VMX
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
 #include <palacios/vmm_telemetry.h>
 #endif
 
@@ -75,7 +75,7 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf
     }
 
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     if (info->vm_info->enable_telemetry) {
        v3_telemetry_start_exit(info);
     }
@@ -88,7 +88,7 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf
 
             // JRL: Change "0x0e" to a macro value
             if ((uint8_t)exit_info->int_info == 14) {
-#ifdef CONFIG_DEBUG_SHADOW_PAGING
+#ifdef V3_CONFIG_DEBUG_SHADOW_PAGING
                 PrintDebug("Page Fault at %p error_code=%x\n", (void *)exit_info->exit_qual, *(uint32_t *)&error_code);
 #endif
 
@@ -131,7 +131,7 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf
             break;
 
         case VMEXIT_RDTSC:
-#ifdef CONFIG_DEBUG_TIME
+#ifdef V3_CONFIG_DEBUG_TIME
            PrintDebug("RDTSC\n");
 #endif 
            if (v3_handle_rdtsc(info) == -1) {
@@ -268,7 +268,7 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf
     }
 
 
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
     if (info->vm_info->enable_telemetry) {
         v3_telemetry_end_exit(info, exit_info->exit_reason);
     }
index 411eb1a..d69787a 100644 (file)
@@ -25,7 +25,7 @@
 #include <palacios/vm_guest_mem.h>
 #include <palacios/vmm_decoder.h>
 
-#ifndef CONFIG_DEBUG_IO
+#ifndef V3_CONFIG_DEBUG_IO
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
index 5b559c9..ef211c8 100644 (file)
@@ -136,17 +136,17 @@ int conf_read_simple(const char *name)
                sym = NULL;
                switch (line[0]) {
                case '#':
-                       if (memcmp(line + 2, "CONFIG_", 7))
+                       if (memcmp(line + 2, "V3_CONFIG_", 10))
                                continue;
-                       p = strchr(line + 9, ' ');
+                       p = strchr(line + 12, ' ');
                        if (!p)
                                continue;
                        *p++ = 0;
                        if (strncmp(p, "is not set", 10))
                                continue;
-                       sym = sym_find(line + 9);
+                       sym = sym_find(line + 12);
                        if (!sym) {
-                               conf_warning("trying to assign nonexistent symbol %s", line + 9);
+                               conf_warning("trying to assign nonexistent symbol %s", line + 12);
                                break;
                        } else if (!(sym->flags & SYMBOL_NEW)) {
                                conf_warning("trying to reassign symbol %s", sym->name);
@@ -162,21 +162,21 @@ int conf_read_simple(const char *name)
                                ;
                        }
                        break;
-               case 'C':
-                       if (memcmp(line, "CONFIG_", 7)) {
-                               conf_warning("unexpected data");
+               case 'V':
+                       if (memcmp(line, "V3_CONFIG_", 10)) {
+                               conf_warning("unexpected data (1)");
                                continue;
                        }
-                       p = strchr(line + 7, '=');
+                       p = strchr(line + 10, '=');
                        if (!p)
                                continue;
                        *p++ = 0;
                        p2 = strchr(p, '\n');
                        if (p2)
                                *p2 = 0;
-                       sym = sym_find(line + 7);
+                       sym = sym_find(line + 10);
                        if (!sym) {
-                               conf_warning("trying to assign nonexistent symbol %s", line + 7);
+                               conf_warning("trying to assign nonexistent symbol %s", line + 10);
                                break;
                        } else if (!(sym->flags & SYMBOL_NEW)) {
                                conf_warning("trying to reassign symbol %s", sym->name);
@@ -233,7 +233,7 @@ int conf_read_simple(const char *name)
                case '\n':
                        break;
                default:
-                       conf_warning("unexpected data");
+                       conf_warning("unexpected data (2)");
                        continue;
                }
                if (sym && sym_is_choice_value(sym)) {
@@ -434,28 +434,28 @@ int conf_write(const char *name)
                        case S_TRISTATE:
                                switch (sym_get_tristate_value(sym)) {
                                case no:
-                                       fprintf(out, "# CONFIG_%s is not set\n", sym->name);
+                                       fprintf(out, "# V3_CONFIG_%s is not set\n", sym->name);
                                        if (out_h)
-                                               fprintf(out_h, "#undef CONFIG_%s\n", sym->name);
+                                               fprintf(out_h, "#undef V3_CONFIG_%s\n", sym->name);
                                        break;
                                case mod:
-                                       fprintf(out, "CONFIG_%s=m\n", sym->name);
+                                       fprintf(out, "V3_CONFIG_%s=m\n", sym->name);
                                        if (out_h)
-                                               fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
+                                               fprintf(out_h, "#define V3_CONFIG_%s_MODULE 1\n", sym->name);
                                        break;
                                case yes:
-                                       fprintf(out, "CONFIG_%s=y\n", sym->name);
+                                       fprintf(out, "V3_CONFIG_%s=y\n", sym->name);
                                        if (out_h)
-                                               fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
+                                               fprintf(out_h, "#define V3_CONFIG_%s 1\n", sym->name);
                                        break;
                                }
                                break;
                        case S_STRING:
                                // fix me
                                str = sym_get_string_value(sym);
-                               fprintf(out, "CONFIG_%s=\"", sym->name);
+                               fprintf(out, "V3_CONFIG_%s=\"", sym->name);
                                if (out_h)
-                                       fprintf(out_h, "#define CONFIG_%s \"", sym->name);
+                                       fprintf(out_h, "#define V3_CONFIG_%s \"", sym->name);
                                do {
                                        l = strcspn(str, "\"\\");
                                        if (l) {
@@ -478,16 +478,16 @@ int conf_write(const char *name)
                        case S_HEX:
                                str = sym_get_string_value(sym);
                                if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
-                                       fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+                                       fprintf(out, "V3_CONFIG_%s=%s\n", sym->name, str);
                                        if (out_h)
-                                               fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
+                                               fprintf(out_h, "#define V3_CONFIG_%s 0x%s\n", sym->name, str);
                                        break;
                                }
                        case S_INT:
                                str = sym_get_string_value(sym);
-                               fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+                               fprintf(out, "V3_CONFIG_%s=%s\n", sym->name, str);
                                if (out_h)
-                                       fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
+                                       fprintf(out_h, "#define V3_CONFIG_%s %s\n", sym->name, str);
                                break;
                        }
                }