Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx> --- lib/x86/vm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/x86/vm.c b/lib/x86/vm.c index 4d0a955..1ca8a05 100644 --- a/lib/x86/vm.c +++ b/lib/x86/vm.c @@ -9,6 +9,7 @@ #endif #define X86_CR0_PE 0x00000001 +#define X86_CR0_WP 0x00010000 #define X86_CR0_PG 0x80000000 #define X86_CR4_PSE 0x00000010 static void *free = 0; @@ -176,7 +177,7 @@ static void setup_mmu(unsigned long len) #ifndef __x86_64__ write_cr4(X86_CR4_PSE); #endif - write_cr0(X86_CR0_PG |X86_CR0_PE); + write_cr0(X86_CR0_PG |X86_CR0_PE | X86_CR0_WP); printf("paging enabled\n"); printf("cr0 = %x\n", read_cr0()); -- 1.7.2.3 -- 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