From: Jack Lange Date: Sat, 1 Mar 2008 23:48:00 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: working-cdboot-physical-but-not-qemu~62 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=7cb3bd8e4ed31b20163a79f2dd413ef45583dee7 *** empty log message *** --- diff --git a/palacios/include/geekos/svm.h b/palacios/include/geekos/svm.h index 32d79c6..ed2aae0 100644 --- a/palacios/include/geekos/svm.h +++ b/palacios/include/geekos/svm.h @@ -211,7 +211,7 @@ -void Init_SVM(); +void Init_SVM(struct vmm_ctrl_ops * vmm_ops); int is_svm_capable(); diff --git a/palacios/include/geekos/vmm_sizes.h b/palacios/include/geekos/vmm_sizes.h index bdf1052..fbaa8d9 100644 --- a/palacios/include/geekos/vmm_sizes.h +++ b/palacios/include/geekos/vmm_sizes.h @@ -2,7 +2,7 @@ #define __vmm_sizes #define KERNEL_LOAD_ADDRESS 0x2fe9d000 #define KERNEL_START (KERNEL_LOAD_ADDRESS) -#define KERNEL_CORE_LENGTH ( 195 *512) +#define KERNEL_CORE_LENGTH ( 204 *512) #define KERNEL_END (KERNEL_LOAD_ADDRESS+KERNEL_CORE_LENGTH-1) #define VM_KERNEL_LENGTH ( 97 *512) #define VM_KERNEL_START (KERNEL_LOAD_ADDRESS + KERNEL_CORE_LENGTH) diff --git a/palacios/src/geekos/svm.c b/palacios/src/geekos/svm.c index 5e8eb77..28ef40e 100644 --- a/palacios/src/geekos/svm.c +++ b/palacios/src/geekos/svm.c @@ -19,7 +19,6 @@ int is_svm_capable() { uint_t vm_cr_low = 0, vm_cr_high = 0; - return 1; if ((ret & CPUID_FEATURE_IDS_ecx_svm_avail) == 0) { PrintDebug("SVM Not Available\n"); return 0; @@ -44,7 +43,7 @@ int is_svm_capable() { -void Init_SVM() { +void Init_SVM(struct vmm_ctrl_ops * vmm_ops) { reg_ex_t msr; void * host_state; @@ -68,6 +67,12 @@ void Init_SVM() { Set_MSR(SVM_VM_HSAVE_PA_MSR, msr.e_reg.high, msr.e_reg.low); + + // Setup the SVM specific vmm operations + vmm_ops->init_guest = &init_svm_guest; + vmm_ops->start_guest = &start_svm_guest; + + return; } diff --git a/palacios/src/geekos/vmm.c b/palacios/src/geekos/vmm.c index e081816..9350cf0 100644 --- a/palacios/src/geekos/vmm.c +++ b/palacios/src/geekos/vmm.c @@ -25,10 +25,7 @@ void Init_VMM(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) { vmm_cpu_type = VMM_SVM_CPU; PrintDebug("Machine is SVM Capable\n"); - Init_SVM(); - - vmm_ops->init_guest = &init_svm_guest; - vmm_ops->start_guest = &start_svm_guest; + Init_SVM(vmm_ops); } else if (is_vmx_capable()) { vmm_cpu_type = VMM_VMX_CPU;