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] [QEMU] Correct PAGE_MASK definition

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [QEMU] Correct PAGE_MASK definition
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Tue, 13 Nov 2007 13:36:13 +0800
Delivery-date: Mon, 12 Nov 2007 21:37:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgltxrIZN+pVgx7Qx2N+k17aVncXQ==
Thread-topic: [Xen-devel] [QEMU] Correct PAGE_MASK definition
In tools/ioemu/hw/iommu.c, I found #define PAGE_MASK  (PAGE_SIZE - 1), I
think it's not correct.

diff -r dfca1120813f tools/ioemu/hw/iommu.c
--- a/tools/ioemu/hw/iommu.c    Sun Nov 11 18:28:57 2007 +0000
+++ b/tools/ioemu/hw/iommu.c    Tue Nov 13 13:08:16 2007 +0800
@@ -88,7 +88,7 @@ do { printf("IOMMU: " fmt , ##args); } w
 #define PAGE_SHIFT      14
 #endif 
 #define PAGE_SIZE       (1 << PAGE_SHIFT)
-#define PAGE_MASK      (PAGE_SIZE - 1)
+#define PAGE_MASK       (~(PAGE_SIZE - 1))
 
 typedef struct IOMMUState {
     uint32_t addr


-- Weidong

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

<Prev in Thread] Current Thread [Next in Thread>