> From: Kevin P. Lawton [mailto:[EMAIL PROTECTED]]

<snip>

> > >// Attributes which change dynamically, depending on the
> > >// code that is running at the time.
> > >#define GuestPageData             0x0010 // Has been 
> accessed with R/W
> > >#define GuestPageCode             0x0020 // Has associated 
> prescanned code
> > >#define GuestPageHostSwapEligible 0x0040 // Page marked so 
> host can swap
> > >#define GuestPagePDir             0x0080 // Contains Page Directory
> > >#define GuestPagePTbl             0x0100 // Contains a Page Table
> > >#define GuestPageIDT              0x0200 // Contains current IDT
> > >#define GuestPageGDT              0x0400 // Contains current GDT
> > >#define GuestPageLDT              0x0800 // Contains current LDT
> > >#define GuestPageTSS              0x1000 // Contains current TSS
> > >
> > 
> > Are all of these really non-exclusive?  Or are there 
> mutually exclusive
> > alternatives here that could be capitalised upon to reduce 
> bit usage,
> > because you're already running close to the limits of 16 
> bits, and you
> > don't want to double the memory usage up to 32 bits.
> 
> They are exclusive enough, I'd like to leave them this way.
> There are 4 more bits left.  For 64MB of guest mem, this would
> consume a wapping 32K of memory @ 16bit quantities.

<snip>

Perhaps I missed something in the reading, but Kevin said, "They are
exclusive enough". Which I would agree with looking at names of the defines.
However, I think the point was that the values used are not exclusive,
rather in their current form they may be or'd together to form combinations.
I don't think a page can be GuestPageGDT|GuestPageLDT. If I understand
properly, what Jullian was getting at was that some of these could be
changed like this:

// Attributes which change dynamically, depending on the
// code that is running at the time.
#define GuestPageData             0x0010 // Has been accessed with R/W
#define GuestPageCode             0x0020 // Has associated prescanned code
#define GuestPageHostSwapEligible 0x0040 // Page marked so host can swap
#define GuestPagePDir             0x0080 // Contains Page Directory
#define GuestPagePTbl             0x0100 // Contains a Page Table
#define GuestPageIDT              0x0180 // Contains current IDT
#define GuestPageGDT              0x0200 // Contains current GDT
#define GuestPageLDT              0x0280 // Contains current LDT
#define GuestPageTSS              0x0300 // Contains current TSS

#define GuestPageContentMask        0x0380 // Mask for checking page
contents

This alone would leave us 6 bits instead of 4.

Reply via email to