Things now compile and link.
[akaros.git] / kern / arch / x86 / paging_tmpl.h
index fd5e336..498f844 100644 (file)
@@ -51,7 +51,7 @@ static void FNAME(init_walker)(struct guest_walker *walker,
        hpa = safe_gpa_to_hpa(vcpu, vcpu->cr3 & PT64_BASE_ADDR_MASK);
        // well, it seems that stuff is always addressable in akaros. I hope.
        //walker->table = vmap_pmem(ppn2page(hpa >> PAGE_SHIFT), PAGE_SIZE);
-       walker->table = ppn2page(hpa);
+       walker->table = KADDR(hpa);
 
        ASSERT((!is_long_mode() && is_pae()) ||
               (vcpu->cr3 & ~(PAGE_MASK | CR3_FLAGS_MASK)) == 0);
@@ -123,7 +123,7 @@ static pt_element_t *FNAME(fetch_guest)(struct litevm_vcpu *vcpu,
                paddr = safe_gpa_to_hpa(vcpu, walker->table[index] & PT_BASE_ADDR_MASK);
                //kunmap_atomic(walker->table);
                //walker->table = vmap_pmem(ppn2page(paddr >> PAGE_SHIFT), PAGE_SIZE);
-               walker->table = ppn2page(paddr >> PAGE_SHIFT);
+               walker->table = KADDR(paddr >> PAGE_SHIFT);
                --walker->level;
        }
 }