]> xenbits.xensource.com Git - xen.git/commitdiff
x86: Do not #GP when guest writes unexpected values to CR4. Just
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Aug 2007 13:54:14 +0000 (14:54 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Aug 2007 13:54:14 +0000 (14:54 +0100)
ignore them.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/traps.c

index f89e16910859d5c3d3894bdf9f55d3adc0562d59..459077a822c7e0f244259fc9ce041a428b5abd85 100644 (file)
@@ -1673,12 +1673,11 @@ static int emulate_privileged_op(struct cpu_user_regs *regs)
                 goto fail;
             break;
 
-        case 4:
+        case 4: /* Write CR4 */
             if ( *reg != (read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE)) )
-            {
-                gdprintk(XENLOG_WARNING, "Attempt to change CR4 flags.\n");
-                goto fail;
-            }
+                gdprintk(XENLOG_WARNING,
+                         "Attempt to change CR4 flags %08lx -> %08lx\n",
+                         read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE), *reg);
             break;
 
         default: