ChangeSet 1.1734, 2005/06/23 09:48:36+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx
Fix alloc_{l2,l3}_table to correctly compute longword-sized virtual
address from int-sized pagetable index. Based on discussion from
Scott Parish and Jan Beulich.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
mm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c 2005-06-23 05:03:43 -04:00
+++ b/xen/arch/x86/mm.c 2005-06-23 05:03:43 -04:00
@@ -753,7 +753,7 @@
#else
# define create_pae_xen_mappings(pl3e) (1)
# define l1_backptr(bp,l2o,l2t) \
- ({ *(bp) = (l2o) << L2_PAGETABLE_SHIFT; 1; })
+ ({ *(bp) = (unsigned long)(l2o) << L2_PAGETABLE_SHIFT; 1; })
#endif
static int alloc_l2_table(struct pfn_info *page, unsigned int type)
@@ -821,7 +821,7 @@
pl3e = map_domain_page(pfn);
for ( i = 0; i < L3_PAGETABLE_ENTRIES; i++ )
{
- vaddr = i << L3_PAGETABLE_SHIFT;
+ vaddr = (unsigned long)i << L3_PAGETABLE_SHIFT;
if ( is_guest_l3_slot(i) &&
unlikely(!get_page_from_l3e(pl3e[i], pfn, d, vaddr)) )
goto fail;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|