ia64/xen-unstable

changeset 15792:747b71c8c4a8

x86: Do not #GP when guest writes unexpected values to CR4. Just
ignore them.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Aug 29 14:54:14 2007 +0100 (2007-08-29)
parents 79053138b35c
children 828e1df114d4
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Wed Aug 29 14:40:00 2007 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Wed Aug 29 14:54:14 2007 +0100
     1.3 @@ -1673,12 +1673,11 @@ static int emulate_privileged_op(struct 
     1.4                  goto fail;
     1.5              break;
     1.6  
     1.7 -        case 4:
     1.8 +        case 4: /* Write CR4 */
     1.9              if ( *reg != (read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE)) )
    1.10 -            {
    1.11 -                gdprintk(XENLOG_WARNING, "Attempt to change CR4 flags.\n");
    1.12 -                goto fail;
    1.13 -            }
    1.14 +                gdprintk(XENLOG_WARNING,
    1.15 +                         "Attempt to change CR4 flags %08lx -> %08lx\n",
    1.16 +                         read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE), *reg);
    1.17              break;
    1.18  
    1.19          default: