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/
Home Products Support Community News


Re: [Xen-devel] Re: [PATCH 4 of 4] Nested p2m: rework locking around nes

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 4 of 4] Nested p2m: rework locking around nested-p2m flushes and updates
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Fri, 24 Jun 2011 13:08:54 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 24 Jun 2011 04:09:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110624104515.GZ17634@xxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1308759026@xxxxxxxxxxxxxxxxxxxxxxx> <a168af9b6d2f604c8414.1308759030@xxxxxxxxxxxxxxxxxxxxxxx> <4E03570B.5000106@xxxxxxx> <20110624104515.GZ17634@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv: Gecko/20110523 Lightning/1.0b3pre Thunderbird/3.1.10
On 06/24/11 12:45, Tim Deegan wrote:
At 17:08 +0200 on 23 Jun (1308848939), Christoph Egger wrote:
+    /* If this p2m table has been flushed or recycled under our feet,
+     * leave it alone.  We'll pick up the right one as we try to
+     * vmenter the guest. */
+    if ( p2m->cr3 == nhvm_vcpu_hostcr3(v) )
+         rv = set_p2m_entry(p2m, L2_gpa>>   PAGE_SHIFT,
+                            page_to_mfn(maddr_to_page(L0_gpa)),
+                            0 /*4K*/, p2mt, p2ma);

The introduction of this check leads to this crash when the L2 guest
initializes its third vcpu:


diff -r b40d4bcca0d7 xen/arch/x86/mm/hap/nested_hap.c
--- a/xen/arch/x86/mm/hap/nested_hap.c  Fri Jun 24 11:16:53 2011 +0100
+++ b/xen/arch/x86/mm/hap/nested_hap.c  Fri Jun 24 11:43:30 2011 +0100
@@ -100,7 +100,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct
                    paddr_t L2_gpa, paddr_t L0_gpa,
                    p2m_type_t p2mt, p2m_access_t p2ma)
-    int rv = 0;
+    int rv = 1;

Yes, that fixes the crash.

This is what comes of not being able to test things properly.  Can you
describe your test setup for me?  I'm having no luck getting
xen-on-debian-on-xen-on-debian to work.

That should do it. If your problem is that the L1 Dom0 hangs at boot
then disable the TSC Deadline Timer in libxc/xc_cpuid_x86.c.
This feature is broken since its introduction.


---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

Xen-devel mailing list