direct-io.hg

changeset 10388:1c9bdbc5e27b

[IA64] align pages in assign_domain_same_page()

Fix a bug. potential miss of page assignment for domain.
If mpaddr and size are not aligned well, the last page might be not
assigned for the domain.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Fri Jun 09 10:35:36 2006 -0600 (2006-06-09)
parents b87ff075dab9
children ececeade018f
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Thu Jun 08 11:08:35 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Fri Jun 09 10:35:36 2006 -0600
     1.3 @@ -658,8 +658,8 @@ assign_domain_same_page(struct domain *d
     1.4                          unsigned long flags)
     1.5  {
     1.6      //XXX optimization
     1.7 -    unsigned long end = mpaddr + size;
     1.8 -    for (; mpaddr < end; mpaddr += PAGE_SIZE) {
     1.9 +    unsigned long end = PAGE_ALIGN(mpaddr + size);
    1.10 +    for (mpaddr &= PAGE_MASK; mpaddr < end; mpaddr += PAGE_SIZE) {
    1.11          __assign_domain_page(d, mpaddr, mpaddr, flags);
    1.12      }
    1.13  }