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] [xen-3.4-testing] x86 hvm viridian: Provide dummy suppor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86 hvm viridian: Provide dummy support for APIC assist page to satisfy Win7.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Jun 2009 22:10:28 -0700
Delivery-date: Thu, 11 Jun 2009 08:04:57 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1243863723 -3600
# Node ID f81c80a77620809777d6858831e24349768d4ce5
# Parent  4e9b06feed7e150959753f111c484f9fb38ffb7c
x86 hvm viridian: Provide dummy support for APIC assist page to satisfy Win7.

From: Tim Deegan <tim.deegan@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   19644:ad59f1c032ec
xen-unstable date:        Tue May 26 10:13:43 2009 +0100
---
 xen/arch/x86/hvm/viridian.c |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff -r 4e9b06feed7e -r f81c80a77620 xen/arch/x86/hvm/viridian.c
--- a/xen/arch/x86/hvm/viridian.c       Mon Jun 01 14:41:36 2009 +0100
+++ b/xen/arch/x86/hvm/viridian.c       Mon Jun 01 14:42:03 2009 +0100
@@ -22,6 +22,7 @@
 #define VIRIDIAN_MSR_EOI         0x40000070
 #define VIRIDIAN_MSR_ICR         0x40000071
 #define VIRIDIAN_MSR_TPR         0x40000072
+#define VIRIDIAN_MSR_APIC_ASSIST 0x40000073
 
 /* Viridian Hypercall Status Codes. */
 #define HV_STATUS_SUCCESS                       0x0000
@@ -49,14 +50,14 @@ int cpuid_viridian_leaves(unsigned int l
         return 0;
 
     leaf -= 0x40000000;
-    if ( leaf > 5 )
+    if ( leaf > 6 )
         return 0;
 
     *eax = *ebx = *ecx = *edx = 0;
     switch ( leaf )
     {
     case 0:
-        *eax = 0x40000005; /* Maximum leaf */
+        *eax = 0x40000006; /* Maximum leaf */
         *ebx = 0x7263694d; /* Magic numbers  */
         *ecx = 0x666F736F;
         *edx = 0x76482074;
@@ -192,6 +193,30 @@ int wrmsr_viridian_regs(uint32_t idx, ui
         vlapic_set_reg(vcpu_vlapic(current), APIC_TASKPRI, eax & 0xff);
         break;
 
+    case VIRIDIAN_MSR_APIC_ASSIST:
+        /*
+         * We don't support the APIC assist page, and that fact is reflected in
+         * our CPUID flags. However, Windows 7 build 7000 has a bug which means
+         * that it doesn't recognise that, and tries to use the page anyway. We
+         * therefore have to fake up just enough to keep win7 happy.
+         * Fortunately, that's really easy: just setting the first four bytes
+         * in the page to zero effectively disables the page again, so that's
+         * what we do. Semantically, the first four bytes are supposed to be a
+         * flag saying whether the guest really needs to issue an EOI. Setting
+         * that flag to zero means that it must always issue one, which is what
+         * we want. Once a page has been repurposed as an APIC assist page the
+         * guest isn't allowed to set anything in it, so the flag remains zero
+         * and all is fine. The guest is allowed to clear flags in the page,
+         * but that doesn't cause us any problems.
+         */
+        if ( val & 1 ) /* APIC assist page enabled? */
+        {
+            uint32_t word = 0;
+            paddr_t page_start = val & ~1ul;
+            hvm_copy_to_guest_phys(page_start, &word, sizeof(word));
+        }
+        break;
+
     default:
         return 0;
     }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] x86 hvm viridian: Provide dummy support for APIC assist page to satisfy Win7., Xen patchbot-3.4-testing <=