On Thu, 30 Mar 2000, Julian Hall wrote:
> At 07:02 AM 3/21/00 -0500, you wrote:
> >If you're into implementation details...
> >
> >My plan is to keep a bitmap of attributes relating to the
> >usage of each physical page of guest memory, so we can
> >keep track of what structures are in it, and other
> >details. This way the monitor can quickly determine
> >info about the page. Below is the current set of
> >defined attributes. If you can think of other useful
> >info, let me know. It helps to think ahead, when
> >making architectural decisions.
> >
> >-Kevin
> >
> >
> >// These bits define the possible usage and attributes assigned
> >// to a particular guest physical page. These are useful for keeping
> >// track of what kinds of system structures are contained in a page
> >// at a given time, and if the page has associated cached code
> >// information in the prescan logic. We can also tag particular
> >// pages with other more static attributes.
> >
> >// Attributes which are more or less static. They are likely
> >// to be assigned at boot time, and not change often.
> >#define GuestPageHostSwapCapable 0x0001 // If can _ever_ swap this page
> >#define GuestPageMemMapIO 0x0002 // Memory Mapped IO space, eg VGA
> >#define GuestPageRO 0x0004 // Read Only mem, eg BIOS ROM
> >
> >// 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.
-Kevin