It is pointless to make the leaf user-accessible if the intermediate page tables are not. In a real OS, what would matter is that the page tables themselves are only accessible through a supervisor mapping. The SMAP testcase will rely on the user bit, so fix it now. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- lib/x86/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x86/vm.c b/lib/x86/vm.c index 3e7ca97..b820c7d 100644 --- a/lib/x86/vm.c +++ b/lib/x86/vm.c @@ -73,7 +73,7 @@ unsigned long *install_pte(unsigned long *cr3, else pt_page = 0; memset(new_pt, 0, PAGE_SIZE); - pt[offset] = virt_to_phys(new_pt) | PTE_PRESENT | PTE_WRITE; + pt[offset] = virt_to_phys(new_pt) | PTE_PRESENT | PTE_WRITE | PTE_USER; } pt = phys_to_virt(pt[offset] & 0xffffffffff000ull); } -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html