Jean Guyader
2011-Nov-28 14:42 UTC
[PATCH] x86: Move nested_p2m per domain data into its own struct.
An upcoming change may require to increase the size of struct domain (for x86). The result is a build failure because struct domain gets larger than a page. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> --- xen/arch/x86/domain.c | 5 +++++ xen/arch/x86/mm/hap/hap.c | 4 ++-- xen/arch/x86/mm/mm-locks.h | 4 ++-- xen/arch/x86/mm/p2m.c | 13 ++++++------- xen/include/asm-x86/domain.h | 9 +++++++-- 5 files changed, 22 insertions(+), 13 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Nov-28 15:04 UTC
Re: [PATCH] x86: Move nested_p2m per domain data into its own struct.
>>> On 28.11.11 at 15:42, Jean Guyader <jean.guyader@eu.citrix.com> wrote: >--- a/xen/include/asm-x86/domain.h >+++ b/xen/include/asm-x86/domain.h >@@ -238,6 +238,12 @@ struct pv_domain > unsigned int nr_e820; > }; > >+struct nested_p2m_per_domain >+{ >+ struct p2m_domain *nested_p2m[MAX_NESTEDP2M]; >+ mm_lock_t nested_p2m_lock;So you call these nested_p2m* but the container ...>+}; >+ > struct arch_domain > { > #ifdef CONFIG_X86_64 >@@ -274,8 +280,7 @@ struct arch_domain > int page_alloc_unlock_level; > > /* nestedhvm: translate l2 guest physical to host physical */ >- struct p2m_domain *nested_p2m[MAX_NESTEDP2M]; >- mm_lock_t nested_p2m_lock; >+ struct nested_p2m_per_domain *nested_p2m;... is also called this way. Pretty redundant, just requiring extra typing and eventually leading to ugly to read wrapped lines. Jan> > /* NB. protected by d->event_lock and by irq_desc[irq].lock */