PCI device locking and synchronization
[akaros.git] / kern / arch / x86 / vmx_mmu.c
index 73b34cd..b65fc12 100644 (file)
@@ -320,6 +320,7 @@ static int nonpaging_map(struct litevm_vcpu *vcpu, gva_t v, hpa_t p)
        int level = PT32E_ROOT_LEVEL;
        hpa_t table_addr = vcpu->mmu.root_hpa;
 printk("nonpaging_map: v %016lx, p %016lx\n", v, p);
+hexdump(KADDR(p), 32);
 
        for (;; level--) {
                uint32_t index = PT64_INDEX(v, level);
@@ -338,8 +339,7 @@ printk("nonpaging_map: v %016lx, p %016lx\n", v, p);
                }
 
                if (table[index] == 0) {
-                       hpa_t new_table = litevm_mmu_alloc_page(vcpu,
-                                                                                                       &table[index]);
+                       hpa_t new_table = litevm_mmu_alloc_page(vcpu, &table[index]);
 
                        if (!VALID_PAGE(new_table)) {
                                pgprintk("nonpaging_map: ENOMEM\n");
@@ -536,7 +536,7 @@ static void inject_page_fault(struct litevm_vcpu *vcpu,
                vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
                                         DF_VECTOR |
                                         INTR_TYPE_EXCEPTION |
-                                        INTR_INFO_DELIEVER_CODE_MASK | INTR_INFO_VALID_MASK);
+                                        INTR_INFO_DELIVER_CODE_MASK | INTR_INFO_VALID_MASK);
                print_func_exit();
                return;
        }
@@ -545,7 +545,7 @@ static void inject_page_fault(struct litevm_vcpu *vcpu,
        vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
                                 PF_VECTOR |
                                 INTR_TYPE_EXCEPTION |
-                                INTR_INFO_DELIEVER_CODE_MASK | INTR_INFO_VALID_MASK);
+                                INTR_INFO_DELIVER_CODE_MASK | INTR_INFO_VALID_MASK);
 
        print_func_exit();
 }