ia64/xen-unstable

changeset 18319:641e10533c89

x86 shadow: Relax BUILD_BUG_ON() regarding struct sizes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 13 12:12:08 2008 +0100 (2008-08-13)
parents b75f0b3e2a7e
children d96bf4cd0f37
files xen/arch/x86/mm/shadow/private.h
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/private.h	Wed Aug 13 11:09:46 2008 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/private.h	Wed Aug 13 12:12:08 2008 +0100
     1.3 @@ -213,15 +213,14 @@ struct shadow_page_info
     1.4      };
     1.5  };
     1.6  
     1.7 -/* The structure above *must* be the same size as a struct page_info
     1.8 +/* The structure above *must* be no larger than a struct page_info
     1.9   * from mm.h, since we'll be using the same space in the frametable. 
    1.10   * Also, the mbz field must line up with the owner field of normal 
    1.11   * pages, so they look properly like anonymous/xen pages. */
    1.12  static inline void shadow_check_page_struct_offsets(void) {
    1.13 -    BUILD_BUG_ON(sizeof (struct shadow_page_info) 
    1.14 -                 != sizeof (struct page_info));
    1.15 -    BUILD_BUG_ON(offsetof(struct shadow_page_info, mbz) 
    1.16 -                 != offsetof(struct page_info, u.inuse._domain));
    1.17 +    BUILD_BUG_ON(sizeof (struct shadow_page_info) < sizeof (struct page_info));
    1.18 +    BUILD_BUG_ON(offsetof(struct shadow_page_info, mbz) !=
    1.19 +                 offsetof(struct page_info, u.inuse._domain));
    1.20  };
    1.21  
    1.22  /* Shadow type codes */