Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-07 Thread Pavel Machek
Hi! > Since most hypervisors will likely provide a suspend/resume mechanism > that is external to the guest, most of this is a moot point anyways. Ok. > But I wondered if you thought the pgd_clone() accessor would make this > cleaner or if it is just most confusing: > > #ifdef CONFIG_SOFTWA

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-07 Thread Zachary Amsden
Pavel Machek wrote: Hi! This helps complete the encapsulation of updates to page tables (or pages about to become page tables) into accessor functions rather than using memcpy() to duplicate them. This is both generally good for consistency and also necessary for running in a hypervisor wh

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-07 Thread Pavel Machek
Hi! > This helps complete the encapsulation of updates to page tables (or pages > about to become page tables) into accessor functions rather than using > memcpy() to duplicate them. This is both generally good for consistency > and also necessary for running in a hypervisor which requires explic

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-06 Thread Zachary Amsden
Chris Wright wrote: * [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: + memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); if (PTRS_PER_PMD == 1) spin_lock_irqsave(&pgd_lock, flags); - memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, + clone_pgd_range((pgd_t *)p

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-05 Thread Zachary Amsden
Zachary Amsden wrote: Chris Wright wrote: Why memset was never done on PAE? That's a good point. The memset() is redundant on PAE, since it allocates all 4 PMDs immediately after that (in pgd_alloc). There are two reasons for moving the memset() - one is that it can potentially perfor

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-05 Thread Zachary Amsden
Chris Wright wrote: * [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: + memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); if (PTRS_PER_PMD == 1) spin_lock_irqsave(&pgd_lock, flags); - memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, + clone_pgd_range((pgd_t *)p

Re: [PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-05 Thread Chris Wright
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > + memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); > if (PTRS_PER_PMD == 1) > spin_lock_irqsave(&pgd_lock, flags); > > - memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, > + clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,

[PATCH 1/1] i386 Encapsulate copying of pgd entries

2005-08-05 Thread zach
Add a clone operation for pgd updates. This helps complete the encapsulation of updates to page tables (or pages about to become page tables) into accessor functions rather than using memcpy() to duplicate them. This is both generally good for consistency and also necessary for running in a hyper