|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Make root page table sanity check on restore more generi
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 251b7d5164bd043946f69c711757209ae378720c
# Parent 24efeacbca51e28778ac574db50dcb152fedc6de
Make root page table sanity check on restore more generic.
Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>
diff -r 24efeacbca51 -r 251b7d5164bd tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c Thu Apr 6 15:17:24 2006
+++ b/tools/libxc/xc_linux_restore.c Thu Apr 6 16:51:14 2006
@@ -646,18 +646,14 @@
goto out;
}
- if ((pt_levels == 2) && ((pfn_type[pfn]<ABTYPE_MASK) != L2TAB)) {
+ if ( (pfn_type[pfn] & LTABTYPE_MASK) !=
+ ((unsigned long)pt_levels<<LTAB_SHIFT) ) {
ERR("PT base is bad. pfn=%lu nr=%lu type=%08lx %08lx",
- pfn, max_pfn, pfn_type[pfn], (unsigned long)L2TAB);
- goto out;
- }
-
- if ((pt_levels == 3) && ((pfn_type[pfn]<ABTYPE_MASK) != L3TAB)) {
- ERR("PT base is bad. pfn=%lu nr=%lu type=%08lx %08lx",
- pfn, max_pfn, pfn_type[pfn], (unsigned long)L3TAB);
- goto out;
- }
-
+ pfn, max_pfn, pfn_type[pfn],
+ (unsigned long)pt_levels<<LTAB_SHIFT);
+ goto out;
+ }
+
ctxt.ctrlreg[3] = p2m[pfn] << PAGE_SHIFT;
/* clear any pending events and the selector */
diff -r 24efeacbca51 -r 251b7d5164bd xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h Thu Apr 6 15:17:24 2006
+++ b/xen/include/public/dom0_ops.h Thu Apr 6 16:51:14 2006
@@ -140,15 +140,16 @@
DEFINE_GUEST_HANDLE(dom0_settime_t);
#define DOM0_GETPAGEFRAMEINFO 18
+#define LTAB_SHIFT 28
#define NOTAB 0 /* normal page */
-#define L1TAB (1<<28)
-#define L2TAB (2<<28)
-#define L3TAB (3<<28)
-#define L4TAB (4<<28)
+#define L1TAB (1<<LTAB_SHIFT)
+#define L2TAB (2<<LTAB_SHIFT)
+#define L3TAB (3<<LTAB_SHIFT)
+#define L4TAB (4<<LTAB_SHIFT)
#define LPINTAB (1<<31)
-#define XTAB (0xf<<28) /* invalid page */
+#define XTAB (0xf<<LTAB_SHIFT) /* invalid page */
#define LTAB_MASK XTAB
-#define LTABTYPE_MASK (0x7<<28)
+#define LTABTYPE_MASK (0x7<<LTAB_SHIFT)
typedef struct dom0_getpageframeinfo {
/* IN variables. */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-changelog] Make root page table sanity check on restore more generic.,
Xen patchbot -3 . 0-testing <=
|
|
|
|
|