From: Jeremy Fitzhardinge Date: Mon, 26 May 2008 22:31:04 +0000 (+0100) Subject: xen: allow some cr4 updates X-Git-Tag: firefly_0821_release~19697^2~253^24~41 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2956a3511c8c5dccb1d4739ead17c7c3c23a24b7;p=firefly-linux-kernel-4.4.55.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)