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

[Xen-devel] [PATCH 02/10] Move PAGE_SHIFT to memmap.h

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 02/10] Move PAGE_SHIFT to memmap.h
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Fri, 19 Aug 2011 01:03:19 +0900
Cc: Daniel Castro <evil.dani@xxxxxxxxx>
Delivery-date: Thu, 18 Aug 2011 09:08:58 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ScPk2qECxJdCOdiBub8S5GgIDPn0GAOrmTs7qp/+Kos=; b=ZtIajtePAINDHC+XnyLhV/b8oRnvomH649l+3KjCP4MJo+63xPCu3djVjL9x/LDyzk xMdvqSnPzoMvQCy64OK0C8yvw3GbfpAccf5sSN4FNmq15Ou50Iw7iFQD2LF1986DpEWQ oY3OZxyMmdQQEXPuYcjfpiAwj/9uTKLmte3IQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1313683408-32306-1-git-send-email-evil.dani@xxxxxxxxx>
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: <1313683408-32306-1-git-send-email-evil.dani@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
PAGE_SHIFT is used by both Virtio and Xen as a contant when moving
addresses from guest space to machine space, in order to have a
single definition PAGE_SHIFT has been moved to memmap.h. This has
no impact on neither virtio or xen.

Signed-off-by: Daniel Castro <evil.dani@xxxxxxxxx>
---
 src/memmap.h      |    2 ++
 src/virtio-ring.h |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/memmap.h b/src/memmap.h
index 01c7ddb..8674168 100644
--- a/src/memmap.h
+++ b/src/memmap.h
@@ -21,6 +21,8 @@ void memmap_finalize(void);
 
 // A typical OS page size
 #define PAGE_SIZE 4096
+//Used by Virtio and Xen
+#define PAGE_SHIFT 12
 
 // e820 map storage (defined in system.c)
 extern struct e820entry e820_list[];
diff --git a/src/virtio-ring.h b/src/virtio-ring.h
index b7a7aaf..fd30778 100644
--- a/src/virtio-ring.h
+++ b/src/virtio-ring.h
@@ -4,7 +4,7 @@
 #include "types.h" // u64
 #include "memmap.h" // PAGE_SIZE
 
-#define PAGE_SHIFT 12
+
 #define PAGE_MASK  (PAGE_SIZE-1)
 
 #define virt_to_phys(v) (unsigned long)(v)
-- 
1.7.4.1


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