#include <palacios/vmm_direct_paging.h>
#include <palacios/vmm_ctrl_regs.h>
+#include <palacios/vmm_config.h>
extern void v3_stgi();
if (vm_info->shdw_pg_mode == SHADOW_PAGING) {
PrintDebug("Creating initial shadow page table\n");
+ /* JRL: This is a performance killer, and a simplistic solution */
+ /* We need to fix this */
+ ctrl_area->TLB_CONTROL = 1;
ctrl_area->guest_ASID = 1;
ctrl_area->exceptions.pf = 1;
- /* JRL: This is a performance killer, and a simplistic solution */
- /* We need to fix this */
- ctrl_area->TLB_CONTROL = 1;
+
guest_state->g_pat = 0x7040600070406ULL;
}
-static int init_svm_guest(struct guest_info *info) {
+static int init_svm_guest(struct guest_info *info, struct v3_vm_config * config_ptr) {
+ v3_config_guest(info, config_ptr);
+
PrintDebug("Allocating VMCB\n");
info->vmm_data = (void*)Allocate_VMCB();
+ v3_config_devices(info, config_ptr);
+
PrintDebug("Initializing VMCB (addr=%p)\n", (void *)info->vmm_data);
Init_VMCB_BIOS((vmcb_t*)(info->vmm_data), info);
+
info->run_state = VM_STOPPED;
// info->rip = 0;