#include <palacios/vmm_debug.h>
#include <palacios/vmm_msr.h>
#include <palacios/vmm_decoder.h>
-#include <palacios/vmm_profiler.h>
+#include <palacios/vmm_telemetry.h>
#include <palacios/vmm_mem.h>
#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/ram_hd.h>
#include <devices/net_hd.h>
-#include <devices/video.h>
+#include <devices/telnet_cons.h>
+
+
#include <palacios/vmm_host_events.h>
-#define USE_GENERIC 1
#include <palacios/vmm_socket.h>
-#ifndef VIDEO
+#ifdef CONFIG_PASSTHROUGH_VIDEO
static int passthrough_mem_write(addr_t guest_addr, void * src, uint_t length, void * priv_data) {
return length;
// Amount of ram the Guest will have, rounded to a 4K page boundary
info->mem_size = config_ptr->mem_size & ~(addr_t)0xfff;
+ /*
+ * Initialize the subsystem data strutures
+ */
+#ifdef CONFIG_TELEMETRY
+ // This should go first, because other subsystems will depend on the guest_info flag
+ if (config_ptr->enable_telemetry) {
+ info->enable_telemetry = 1;
+ v3_init_telemetry(info);
+ } else {
+ info->enable_telemetry = 0;
+ }
+#endif
- // Initialize the subsystem data strutures
v3_init_time(info);
v3_init_io_map(info);
v3_init_msr_map(info);
v3_init_hypercall_map(info);
+#ifdef CONFIG_SYMBIOTIC_SWAP
+ v3_init_sym_swap(info);
+#endif
+
+
// Initialize the memory map
v3_init_shadow_map(info);
info->shdw_pg_mode = SHADOW_PAGING;
}
-#ifdef CONFIG_PROFILE_VMM
- if (config_ptr->enable_profiling) {
- info->enable_profiler = 1;
- v3_init_profiler(info);
- } else {
- info->enable_profiler = 0;
- }
-#endif
+
if (config_ptr->schedule_freq == 0) {
// set the schedule frequency to 100 HZ
*/
static int setup_memory_map(struct guest_info * info, struct v3_vm_config * config_ptr) {
-#ifndef VIDEO
+#ifdef CONFIG_PASSTHROUGH_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;
+
+ v3_create_device(info, "CGA_VIDEO", (void *)1);
+ {
+ struct telnet_cons_cfg cons_cfg = {"CGA_VIDEO", 19997};
+ v3_create_device(info, "TELNET_CONSOLE", &cons_cfg);
+ }
if (config_ptr->enable_pci == 1) {
struct ide_cfg ide_config = {"PCI", "PIIX3"};
v3_create_device(info, "LNX_VIRTIO_BALLOON", "PCI");
v3_create_device(info, "SYM_SWAP", "LNX_VIRTIO_BLK");
- v3_create_device(info, "VIDEO", "PCI");
-
v3_create_device(info, "IDE", &ide_config);
} else {
v3_create_device(info, "IDE", NULL);
- 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
+#ifdef CONFIG_PASTHROUGH_VIDEO
// Monitor graphics card operations
return 0;
}
+#endif