Previous Topic: 6.4.1 Instruction Simulation

Next Topic: 6.4.3 PR/SM and LPAR

6.4.2 Shadow Table Maintenance


Shadow table maintenance is the mechanism that VM utilizes to
manage the storage needs of virtual machines that are
executing a guest operating system with one or more virtual
address spaces (e.g., MVS and SVS).  The following diagram
shows how this mechanism works.


_______________     ___________________
|             |     |                 |
|REAL STORAGE |     | VIRTUAL STORAGE |
|             |<----|                 | <-----------
|FIRST LEVEL  |     | SECOND  LEVEL   |            |
|_____________|     |_________________|    _________________
                                          |                 |
   |                                      | VIRTUAL STORAGE |
   |                                      |                 |
   |                                      | THIRD   LEVEL   |
   |                                      |_________________|
   |          Shadow Table Maintenance            |
   ------------------------------------------------



 Figure 6-2.  Shadow Table Maintenance



A guest operating system that is running in a virtual machine
interprets the virtual storage of VM as real storage.  The
guest operating system therefore creates its own virtual
address spaces, or third-level storage.  Considerable
overhead would be incurred by a virtual machine if each
address had to be translated twice, (e.g., from third-level
to second-level virtual storage, and then from second-level
to first-level real storage).  Shadow tables eliminate some
of this overhead by enabling VM to selectively map third-
level virtual storage directly to first level real storage.

Shadow table entries are first marked invalid.  The shadow
table can be invalidated in many ways (e.g., a new control
register one load or PTLB instruction call by the virtual
machine).  The shadow table entries are filled in as the
virtual machine runs and VM translates third-level storage to
first-level storage.

The VM command that controls multiple shadow table
maintenance is as follows:

   SET STMULTI n USEG xxx CSEG yyy

   The 'n' parameter controls the maximum number of shadow
   table origin blocks that VM can allocate before shadow
   table stealing and invalidation occurs.  The default value
   is 3; the limit is 6.  This limit can be increased by
   changing field DMKSYSMS in module DMKSYS.  For the MVS
   guest operating system, 'n' should be set to a value that
   is equal to 2 plus the average number of active
   initiators.

   USEG xxx defines the size of the pre-allocated page tables
   for each STO block.  If the value specified is too small,
   stealing occurs.  This can also degrade the performance of
   a guest operating system under VM.

   CSEG yyy defines the number of full segments at the high
   end of storage that are shared among all address spaces.
   For MVS or SVS, yyy should be the number of 64K segments
   in the PLPA.


Shadow Table Bypass

VM allows bypassing of shadow table support for the MVS
nucleus.  The area of storage to be bypassed must start at
location 0; and the virtual (third-level) and real
(second-level) storage addresses must be equal for that
virtual machine.

The command that establishes the bypass support is:

   SET STBYPASS nnnnnK

where "nnnnn" is storage size.