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-unstable] [IA64] Support grant_table v2 for XENMAPS

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Support grant_table v2 for XENMAPSPACE_grant_table
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 02:15:22 -0800
Delivery-date: Mon, 22 Feb 2010 02:15:53 -0800
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 1266833290 0
# Node ID 94e009ef5a58c02d4fe78fcc4c85627b469ee937
# Parent  70d974c2401d2f44cb0a7b2e34f8f20c267c433f
[IA64] Support grant_table v2 for XENMAPSPACE_grant_table

This patch is ia64 counter part of 20281:95ea2052b41b.
This fixes the issue that HVM domains with PV-on-HVM drivers panic.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff -r 70d974c2401d -r 94e009ef5a58 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Mon Feb 22 10:07:27 2010 +0000
+++ b/xen/arch/ia64/xen/mm.c    Mon Feb 22 10:08:10 2010 +0000
@@ -3338,12 +3338,25 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
         case XENMAPSPACE_grant_table:
             spin_lock(&d->grant_table->lock);
 
-            if ((xatp.idx >= nr_grant_frames(d->grant_table)) &&
-                (xatp.idx < max_nr_grant_frames))
-                gnttab_grow_table(d, xatp.idx + 1);
-
-            if (xatp.idx < nr_grant_frames(d->grant_table))
-                mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]);
+            if (d->grant_table->gt_version == 0)
+                d->grant_table->gt_version = 1;
+
+            if (d->grant_table->gt_version == 2 &&
+                (xatp.idx & XENMAPIDX_grant_table_status))
+            {
+                xatp.idx &= ~XENMAPIDX_grant_table_status;
+                if (xatp.idx < nr_status_frames(d->grant_table))
+                    mfn = virt_to_mfn(d->grant_table->status[xatp.idx]);
+            }
+            else
+            {
+                if ((xatp.idx >= nr_grant_frames(d->grant_table)) &&
+                    (xatp.idx < max_nr_grant_frames))
+                    gnttab_grow_table(d, xatp.idx + 1);
+
+                if (xatp.idx < nr_grant_frames(d->grant_table))
+                    mfn = virt_to_mfn(d->grant_table->shared_raw[xatp.idx]);
+            }
 
             spin_unlock(&d->grant_table->lock);
             break;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Support grant_table v2 for XENMAPSPACE_grant_table, Xen patchbot-unstable <=