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-devel

RE: [Xen-devel] Re: mapcache broken?

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] Re: mapcache broken?
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Wed, 11 Jan 2006 09:54:30 +0800
Cc: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 11 Jan 2006 02:00:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYWC3Y0bTeMuH1LTkOOTE7rNMiJjAARV7LQ
Thread-topic: [Xen-devel] Re: mapcache broken?
Hi Keir,

The vmx domain still blocks in my environment. HV complains it can not
find E820 table and HVM INFO page. After fixing them with the following
patch, HV does not complain any thing. But the vmx domain  just silently
blocks. Would you please take a look? Thanks 

Best Regards
Ke 

--- a/xen/arch/x86/vmx_vmcs.c   Tue Jan 10 18:53:44 2006 +0100
+++ b/xen/arch/x86/vmx_vmcs.c   Wed Jan 11 09:42:26 2006 +0800
@@ -160,7 +160,7 @@
         domain_crash_synchronous();
     }

-    p = map_domain_page(mpfn);
+    p = map_domain_page_global(mpfn);
     if (p == NULL) {
         printk("Can not map E820 memory map page for VMX domain.\n");
         domain_crash_synchronous();
@@ -181,10 +181,10 @@
     if ( gpfn == 0 ) {
         printk("Can not get io request shared page"
                " from E820 memory map for VMX domain.\n");
-        unmap_domain_page(p);
-        domain_crash_synchronous();
-    }
-    unmap_domain_page(p);
+        unmap_domain_page_global(p);
+        domain_crash_synchronous();
+    }
+    unmap_domain_page_global(p);

     /* Initialise shared page */
     mpfn = get_mfn_from_pfn(gpfn);
@@ -239,7 +239,7 @@
         domain_crash_synchronous();
     }

-    p = map_domain_page(mpfn);
+    p = map_domain_page_global(mpfn);
     if ( p == NULL ) {
         printk("Can not map hvm info page for VMX domain.\n");
         domain_crash_synchronous();
@@ -256,7 +256,7 @@
         d->arch.vmx_platform.apic_enabled = 0;
     }

-    unmap_domain_page(p);
+    unmap_domain_page_global(p);
 }

 static void vmx_setup_platform(struct domain* d)

Keir Fraser wrote:
> On 10 Jan 2006, at 10:06, Keir Fraser wrote:
> 
>>> The map_io_shared_page determines that there are 0 entries in the
>>> e820 map. The map itself doesn't appear to fail which probably
>>> means that a page full with 0's is mapped and this would indicate
>>> at a problem with the mapcache (this is just a conjecture, I
>>> haven't actually added to code to test this, I only had 10min to
>>> look at this). 
>> 
>> Yeah, I realised this might be a problem for VMX last night. Problem
>> is that certain pagetables get map_domain_page()'ed for the lifetime
>> of the guest, and are expected to then be mapped in all address
>> spaces. Now the mapcache is per domain, this 'trick' won't work.
>> 
>> A new shadow mode should not do such long-term mappings. I'll see if
>> I can come up with a temporary solution for current shadow mode
>> (maybe reintroduce ioremap()...).
> 
> Hopefully fixed now (changeset 8542 "Add new map_domain_page_global()
> interface..."). May take a couple of hours to appear in the public
> tree.
> 
>   -- Keir
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


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

<Prev in Thread] Current Thread [Next in Thread>