From: Jeremy Fitzhardinge Date: Mon, 26 May 2008 22:31:04 +0000 (+0100) Subject: xen: allow some cr4 updates X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2956a3511c8c5dccb1d4739ead17c7c3c23a24b7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git xen: allow some cr4 updates The guest can legitimately change things like cr4.OSFXSR and OSXMMEXCPT, so let it. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 35ddaf50180a..f6876485ee7d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -648,8 +648,10 @@ static unsigned long xen_read_cr2_direct(void) static void xen_write_cr4(unsigned long cr4) { - /* Just ignore cr4 changes; Xen doesn't allow us to do - anything anyway. */ + cr4 &= ~X86_CR4_PGE; + cr4 &= ~X86_CR4_PSE; + + native_write_cr4(cr4); } static unsigned long xen_read_cr3(void)