#include <palacios/vmm_hypercall.h>
#include <palacios/vmm_dev_mgr.h>
+#ifdef CONFIG_SYMBIOTIC_SWAP
+#include <palacios/vmm_sym_swap.h>
+#endif
+
#include <devices/generic.h>
#include <devices/ide.h>
#include <devices/video.h>
+
+
#include <palacios/vmm_host_events.h>
-#define USE_GENERIC 1
#include <palacios/vmm_socket.h>
-#ifndef VIDEO
+#ifndef CONFIG_VIDEO
static int passthrough_mem_write(addr_t guest_addr, void * src, uint_t length, void * priv_data) {
return length;
v3_init_hypercall_map(info);
+#ifdef CONFIG_SYMBIOTIC_SWAP
+ v3_init_sym_swap(info);
+#endif
+
+
// Initialize the memory map
v3_init_shadow_map(info);
*/
static int setup_memory_map(struct guest_info * info, struct v3_vm_config * config_ptr) {
-#ifndef VIDEO
+#ifndef CONFIG_VIDEO
PrintDebug("Setting up memory map (memory size=%dMB)\n", (uint_t)(info->mem_size / (1024 * 1024)));
// VGA frame buffer
v3_create_device(info, "IOAPIC", "LAPIC");
v3_create_device(info, "VMNET", NULL);
- int use_generic = USE_GENERIC;
+
if (config_ptr->enable_pci == 1) {
struct ide_cfg ide_config = {"PCI", "PIIX3"};
- if (use_generic) {
+#ifdef CONFIG_GENERIC
configure_generic(info, config_ptr);
- }
+#endif
// This should go last because it requires information about the Harddrives
v3_create_device(info, "NVRAM", "IDE");
-
+#ifdef CONFIG_GENERIC
static int configure_generic(struct guest_info * info, struct v3_vm_config * config_ptr) {
PrintDebug("Creating Generic Device\n");
v3_create_device(info, "GENERIC", NULL);
#endif
-#ifndef VIDEO
+#ifndef CONFIG_VIDEO
// Monitor graphics card operations
return 0;
}
+#endif