From 020339c32ad092b4b7d688e448f01777519972b6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Thu, 17 May 2018 14:23:17 +0200 Subject: [PATCH] fix wrong initialization of EFER --- tools/uhyve-x86_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/uhyve-x86_64.c b/tools/uhyve-x86_64.c index 23895330c..57c2b705c 100644 --- a/tools/uhyve-x86_64.c +++ b/tools/uhyve-x86_64.c @@ -343,7 +343,8 @@ static void filter_cpuid(struct kvm_cpuid2 *kvm_cpuid) static void setup_system_64bit(struct kvm_sregs *sregs) { sregs->cr0 |= X86_CR0_PE; - sregs->efer |= EFER_LME; + sregs->cr4 |= X86_CR4_PAE; + sregs->efer |= EFER_LME|EFER_LMA; } static void setup_system_page_tables(struct kvm_sregs *sregs, uint8_t *mem)