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] x86: Small simplification to get_page_fro

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Small simplification to get_page_from_l1e().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Oct 2009 06:40:18 -0700
Delivery-date: Mon, 26 Oct 2009 06:40:47 -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 1256563603 0
# Node ID f0be14bb3f7a4d9e9d865b3a4c1433a25051ee87
# Parent  b27f85b54ecc7276f43cdcd669bda269c0715373
x86: Small simplification to get_page_from_l1e().

No need for separate top-level check for page owner being NULL: this
can be folded into the case that page owner is not who the caller
expected (caller will never expect NULL owner).

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r b27f85b54ecc -r f0be14bb3f7a xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Oct 26 13:19:33 2009 +0000
+++ b/xen/arch/x86/mm.c Mon Oct 26 13:26:43 2009 +0000
@@ -780,9 +780,6 @@ get_page_from_l1e(
         return 1;
     }
 
-    if ( real_pg_owner == NULL )
-        goto could_not_pin;
-
     if ( unlikely(real_pg_owner != pg_owner) )
     {
         /*
@@ -791,7 +788,8 @@ get_page_from_l1e(
          * dom0, until pvfb supports granted mappings. At that time this
          * minor hack can go away.
          */
-        if ( (pg_owner == l1e_owner) || !IS_PRIV_FOR(pg_owner, real_pg_owner) )
+        if ( (real_pg_owner == NULL) || (pg_owner == l1e_owner) ||
+             !IS_PRIV_FOR(pg_owner, real_pg_owner) )
             goto could_not_pin;
         pg_owner = real_pg_owner;
     }

_______________________________________________
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] x86: Small simplification to get_page_from_l1e()., Xen patchbot-unstable <=