Re: CVS commit: src/sys/arch

2012-02-25 Thread Manuel Bouyer
On Sat, Feb 25, 2012 at 10:30:30AM +0530, Cherry G. Mathew wrote:
 I've made a few changes to pmap.c where it looks harmless to do so,
 but are in favour of consistency.
 ftp://ftp.netbsd.org/pub/NetBSD/misc/cherry/tmp/xen-set-pte.diff

Did you test it ? I have a vague memory that using spl() in early
allocation routines would cause a trap (maybe because curcpu() doesn't
work yet) but maybe your recent changes fixed it.
Also you can change
#ifndef XEN
   const pd_entry_t pteflags = PG_V | PG_RW;
#else /* XEN */
   const pd_entry_t pteflags = PG_u | PG_V | PG_RW;
#endif /* XEN */

to:
const pd_entry_t pteflags = PG_k | PG_V | PG_RW;

(PG_k is defined to PG_u on Xen/amd64 and 0 otherwise).

-- 
Manuel Bouyer bou...@antioche.eu.org
 NetBSD: 26 ans d'experience feront toujours la difference
--


Re: CVS commit: src/sys/arch

2012-02-25 Thread Cherry G. Mathew
On 25 February 2012 17:32, Manuel Bouyer bou...@antioche.eu.org wrote:
 On Sat, Feb 25, 2012 at 10:30:30AM +0530, Cherry G. Mathew wrote:
 I've made a few changes to pmap.c where it looks harmless to do so,
 but are in favour of consistency.
 ftp://ftp.netbsd.org/pub/NetBSD/misc/cherry/tmp/xen-set-pte.diff

 Did you test it ? I have a vague memory that using spl() in early
 allocation routines would cause a trap (maybe because curcpu() doesn't
 work yet) but maybe your recent changes fixed it.

Yes and yes.

 Also you can change
 #ifndef XEN
       const pd_entry_t pteflags = PG_V | PG_RW;
 #else /* XEN */
       const pd_entry_t pteflags = PG_u | PG_V | PG_RW;
 #endif /* XEN */

 to:
        const pd_entry_t pteflags = PG_k | PG_V | PG_RW;

 (PG_k is defined to PG_u on Xen/amd64 and 0 otherwise).


Ah cool, that would remove those ugly #ifdefs

Cheers,
-- 
~Cherry


Re: CVS commit: src/sys/arch/x86/x86

2012-02-25 Thread Cherry G. Mathew
On 26 February 2012 01:33, Cherry G. Mathew che...@netbsd.org wrote:
 Module Name:    src
 Committed By:   cherry
 Date:           Sat Feb 25 20:03:58 UTC 2012

 Modified Files:
        src/sys/arch/x86/x86: pmap.c

 Log Message:
 Revert previous since it does a redundant xpq queue flush.
 xen_bcast_invlpg() flushes the queue for us.

As bouyer@ kindly pointed out offline.

Cheers,

-- 
~Cherry