[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch
On Wed, 9 Nov 2011 07:52:13 +0530, Cherry G. Mathew wrote:
The cleanest way would be to share the code between x86 and Xen,
the allocation "below 4GiB" boundary for both, and use it everywhere
the pmap code. Only the manipulation of the vcpu_guest_context_t
ctrlregs members would have to force this use.
Fair enough. Although the <4G tests would be a bit deceptive (since
they're cosmetic) - I guess leaving a note in the code about the
rationale behind this will help.
Well, the cpu_info struct will be shared by all implementations of x86
eventually (at least for PAE & !PAE, native & Xen). So having lots of
#ifdef XEN/#ifdef PAE means more work for me later on :)
- are you sure that these have to be "defined(PAE) ||
That's a crude way of making pmap_cpu_init_late() do nothing for
i386 (non-pae) since i386 doesn't need shadow PMDs.
In that case, test against "i386_use_pae" (0 == !PAE, 1 == PAE), and
simply return if !PAE. Avoid having loooooonnng macro blocks with
different levels of #ifdef. It's fairly difficult to untangle and
unpleasant to read.
I agree - this looks better.
I always wondered whether i386_use_pae should be set for amd64.
Strictly speaking, PAE is enabled when we are running in long mode. I
set the sysctl(7) a while ago for NX regression tests in ATF, but not
the variable. Maybe I should.
Main Index |
Thread Index |