WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Emulate guest reads of CR4, masking features that Xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Emulate guest reads of CR4, masking features that Xen
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Oct 2005 16:02:11 +0000
Delivery-date: Wed, 05 Oct 2005 15:59:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 89b1b67fc2c4111d6eece1adab8dbcfae6dd069f
# Parent  438f1b53682b8b796be5374e5f148f0617829a28
Emulate guest reads of CR4, masking features that Xen
does not export to guests.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 438f1b53682b -r 89b1b67fc2c4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Wed Oct  5 15:32:07 2005
+++ b/xen/arch/x86/traps.c      Wed Oct  5 15:54:09 2005
@@ -895,6 +895,14 @@
             *reg = pagetable_get_paddr(v->arch.guest_table);
             break;
 
+        case 4: /* Read CR4 */
+            /*
+             * Guests can read CR4 to see what features Xen has enabled. We
+             * therefore lie about PGE & PSE as they are unavailable to guests.
+             */
+            *reg = read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE);
+            break;
+
         default:
             goto fail;
         }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Emulate guest reads of CR4, masking features that Xen, Xen patchbot -unstable <=