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] Callers of __gpfn_to_mfn() do not need to check

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Callers of __gpfn_to_mfn() do not need to check
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Jan 2006 23:46:09 +0000
Delivery-date: Wed, 25 Jan 2006 23:55:50 +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 ac04112c45b9f51fa6548efc142b14bed202ced8
# Parent  c9362a31ba5d50bbdccc394a7d677bfe9c08fd2f
Callers of __gpfn_to_mfn() do not need to check
shadow-translate mode.

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

diff -r c9362a31ba5d -r ac04112c45b9 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Jan 25 18:09:28 2006
+++ b/xen/arch/x86/mm.c Wed Jan 25 18:16:07 2006
@@ -1826,8 +1826,7 @@
             break;
 
         case MMUEXT_NEW_BASEPTR:
-            if (shadow_mode_translate(current->domain))
-                mfn = __gpfn_to_mfn(current->domain, mfn);
+            mfn = __gpfn_to_mfn(current->domain, mfn);
             okay = new_guest_cr3(mfn);
             percpu_info[cpu].deferred_ops &= ~DOP_FLUSH_TLB;
             break;
@@ -2679,10 +2678,9 @@
 
 long do_set_gdt(unsigned long *frame_list, unsigned int entries)
 {
-    int nr_pages = (entries + 511) / 512;
+    int i, nr_pages = (entries + 511) / 512;
     unsigned long frames[16];
     long ret;
-    int x;
 
     /* Rechecked in set_gdt, but ensures a sane limit for copy_from_user(). */
     if ( entries > FIRST_RESERVED_GDT_ENTRY )
@@ -2691,10 +2689,8 @@
     if ( copy_from_user(frames, frame_list, nr_pages * sizeof(unsigned long)) )
         return -EFAULT;
 
-    if (shadow_mode_translate(current->domain)) {
-        for (x = 0; x < nr_pages; x++)
-            frames[x] = __gpfn_to_mfn(current->domain, frames[x]);
-    }
+    for ( i = 0; i < nr_pages; i++ )
+        frames[i] = __gpfn_to_mfn(current->domain, frames[i]);
 
     LOCK_BIGLOCK(current->domain);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Callers of __gpfn_to_mfn() do not need to check, Xen patchbot -unstable <=