On 8 November 2011 19:11, Cherry G. Mathew <cherry.g.mat...@gmail.com> wrote: > On 8 November 2011 05:50, Jean-Yves Migeon <jeanyves.mig...@free.fr> wrote: >> On 06.11.2011 16:18, Cherry G. Mathew wrote: >>> Module Name: src >>> Committed By: cherry >>> Date: Sun Nov 6 15:18:19 UTC 2011 >>> >>> Modified Files: >>> src/sys/arch/amd64/include: pmap.h >>> src/sys/arch/i386/include: pmap.h >>> src/sys/arch/x86/include: cpu.h >>> src/sys/arch/x86/x86: pmap.c >>> src/sys/arch/xen/x86: cpu.c x86_xpmap.c >>> >>> Log Message: >>> [merging from cherry-xenmp] make pmap_kernel() shadow PMD per-cpu and MP >>> aware. >> >> Some comments. >> > > ... >>> -/* flag to be used for kernel mappings: PG_u on Xen/amd64, 0 otherwise */ >>> -#if defined(XEN)&& defined(__x86_64__) >>> -#define PG_k PG_u >>> -#else >>> -#define PG_k 0 >>> -#endif >>> - >> >> Are you sure that all the mapping sites are safe (PT/PD bits), given the >> pmap split between pmap/xen_xpmap.c? >> > > Ok, I realise I've broken the build with this one - apologies. For > some odd reason my tree built ok ( even after nuking the obj dir) > > The current bandaid by christos and njoly is incorrect. I propose > re-exporting PG_k to x86/include/pmap.h until (if ?) the xen pmap is > completely independant of the x86 one. > > Please let me know if there are objections to this patch below: > > Thanks, > > -- > ~Cherry > > > > Index: arch/x86/include/pmap.h > =================================================================== > RCS file: /cvsroot/src/sys/arch/x86/include/pmap.h,v > retrieving revision 1.44 > diff -u -r1.44 pmap.h > --- arch/x86/include/pmap.h 6 Nov 2011 11:40:47 -0000 1.44 > +++ arch/x86/include/pmap.h 8 Nov 2011 13:35:16 -0000 > @@ -173,6 +173,13 @@ > ((pmap)->pm_pdirpa[0] + (index) * sizeof(pd_entry_t)) > #endif > > +/* flag to be used for kernel mappings: PG_u on Xen/amd64, 0 otherwise */ > +#if defined(XEN) && defined(__x86_64__) > +#define PG_k PG_u > +#else > +#define PG_k 0 > +#endif > + > /* > * MD flags that we use for pmap_enter and pmap_kenter_pa: > */ > Index: arch/x86/x86/pmap.c > =================================================================== > RCS file: /cvsroot/src/sys/arch/x86/x86/pmap.c,v > retrieving revision 1.140 > diff -u -r1.140 pmap.c > --- arch/x86/x86/pmap.c 8 Nov 2011 12:44:29 -0000 1.140 > +++ arch/x86/x86/pmap.c 8 Nov 2011 13:35:20 -0000 > @@ -211,11 +211,6 @@ > #include <xen/hypervisor.h> > #endif > > -/* If this is not needed anymore it should be GC'ed */ > -#ifndef PG_k > -#define PG_k 0 > -#endif > - > /* > * general info: > * > Index: arch/xen/include/xenpmap.h > =================================================================== > RCS file: /cvsroot/src/sys/arch/xen/include/xenpmap.h,v > retrieving revision 1.30 > diff -u -r1.30 xenpmap.h > --- arch/xen/include/xenpmap.h 6 Nov 2011 11:40:47 -0000 1.30 > +++ arch/xen/include/xenpmap.h 8 Nov 2011 13:35:20 -0000 > @@ -34,13 +34,6 @@ > #include "opt_xen.h" > #endif > > -/* flag to be used for kernel mappings: PG_u on Xen/amd64, 0 otherwise */ > -#if defined(XEN) && defined(__x86_64__) > -#define PG_k PG_u > -#else > -#define PG_k 0 > -#endif > - > #define INVALID_P2M_ENTRY (~0UL) > > void xpq_queue_machphys_update(paddr_t, paddr_t); > Index: arch/xen/x86/xen_pmap.c > =================================================================== > RCS file: /cvsroot/src/sys/arch/xen/x86/xen_pmap.c,v > retrieving revision 1.7 > diff -u -r1.7 xen_pmap.c > --- arch/xen/x86/xen_pmap.c 6 Nov 2011 11:40:47 -0000 1.7 > +++ arch/xen/x86/xen_pmap.c 8 Nov 2011 13:35:21 -0000 > @@ -142,13 +142,6 @@ > #include <xen/hypervisor.h> > #endif > > -/* flag to be used for kernel mappings: PG_u on Xen/amd64, 0 otherwise */ > -#if defined(XEN) && defined(__x86_64__) > -#define PG_k PG_u > -#else > -#define PG_k 0 > -#endif > - > #define COUNT(x) /* nothing */ > > static pd_entry_t * const alternate_pdes[] = APDES_INITIALIZER; >
Committed. Thanks, -- ~Cherry