Third-level The virtual storage space defined by
operating in second-level storage, under control of page
tables which reside in second-level storage.
the systea
and segaent fage Logical mapping between first-level and
second-level storage. !!!!ual !ab1es: Logical aapping between second-level
and third-level storage. Shad2! and !ab1e§: Logical aapping between first-level
storage and third-level storage. A standard, nonrelocating virtual aachine in CP is provided with a
single control register, control register zero that can be used for: Extended masking of external interruptions Special interruption traps for SSM Enabling of virtual block multiplexing A virtual machine that is allowed Lv uSe the control of Systea/370 is provided with a full coap1ement of 16
registers, allowing virtual aonitor calls, PER, extended masking, and dynamic address translation. control
channel An extension to the noraa1 virtua1-aachine VMBLOK is built at the
tiae that an extended control virtual machine logs onto CPa This ECBLOK contains the 16 virtual control registers, 2 shadow control registers,
and several words of information for maintenance of the shadow tables,
virtual CPU timer, virtual TOD clock coaparator, and virtual PER event
data. The majority of the processing for virtual address translation is
performed by the aodu1e DMKVAT, with additional routines in DMKPRG, DMKPRV, DMKDSP, DMKCDB, DMKLOG, DMKUSO, and DMKPTR. The siau1ation of
the relocation-control instructions (that is, LCTL, STCTL, PTLB, RRE,
and LRI) is perforaed by DMKPRV. These instructions, with the exception
of LCTL and STCTL, are not available to virtual aachines which are not
allowed the extended control aode. ihen an extended-control virtual aachine is first active, it has only
the real page and segment tables provided for it by CP and operates
entirely in second-level storage. DMKPRV examines each PSi loaded via LPSi to determine when the virtual aachine enters or leaves extended
control or translate mode, setting-the appropriate flag bits in the VMBLOK. Flag bits are also set whenever the virtual aachine aodifies
control registers 0 or 1, the registers that control the dynaaic address
translation feature. DMKDSP also examines PSis that are loaded as the
result of interruptions to determine any changes in the virtual
machine's operating aode. The virtual machine can load or store any of
the control registers, enter or leave extended control aode, take
interruptions, etc., without invoking the address translation feature.
If the virtual machine, already in extended control mode, turns on
the translate bit in the EC aode PSi, then the DMKVATMD routine is
called to exaaine the virtual control registers and build the required
shadow tables. (Shadow tables are required because .the real DAT hardware
is capable of only a first-level storage mapping.) DMKVATMD examines virtual control registers 0 and 1 to determine if they contain valid
information for use in constructing the shadOW tables. Control register
zero specifies the size of the page and segment the virtual aachine is
using in the virtual page and segment tables. The shadow tables
constructed by DMKVIT8D are always in the same foraat as the virtual
tables.
1-118 IBK V8/370 System Logic and Problem Determination--Vo1ume 1
The shadow segment table is constructed in first-level storage and
initialized to indicate that all segments are unavailable. Flags are
aaintained in the VMBLOK to indicate that the shadow tables exist. DMKVATMD also constructs the shadow control registers 0 and 1. Shadow control register 0 contains the external interruption mask bits used by CP, mixed with the hardware controls and enabling bits from virtual
control register o. Shadow control register 1 contains the segment
table origin address of the shadow segment table. When the virtual machine is operating in virtual translate mode, CP loads the shadow control registers into the real control registers and
dispatches the user. The immediate result of attempting to execute an
instruction is a segment exception, intercepted by DMKPRG and passed to DMKVATSI. DMKVATSI exaaines the virtual segment table in second-level
storage. If the virtual segment is not available, the segment exception
interruption is reflected to the virtual machine. If the virtual
segment is marked available# then DMKV1TSI: Allocates one full segment of shadow page table, in the format specified by virtual control register o. Sets all of the page table entries to indicate page not in storage. Barks the segment available in the shadow segment table. Redispatches the virtual machine via DMKDSP. Once again, the i.mediate result is an interruption, which is a
paging exception and control is passed to DMKVATPI. DMKVATPI references
the virtual page table in second-level storage to determine if the
virtual page is available. If the virtual page is not available, the
paging interruption is reflected to the virtual machine. However, if
the virtual page is marked in storage, the virtual page table entry
determines which page of second-level storage is being referenced by the
third-level storage address provided.. DftKVATPI next determines if t'bat
page of second-level storage is resident in first-level storage at that
tiae. If so, the appropriate entry in the shadow page table is filled
in and marked in storage. If not, the required page is brought into
first-level storage via DMKPTRAN and the shadow page table filled in as
above.
As the virtual machine continues execution, aore shadow tables are
filled in or allocated as the third-level storage locations are
referenced. Whenever a new segment is referenced, another segment of
shadow page tables is allocated. Whenever a new page is referenced, the
appropriate shadow page table entry is validated, etc. No changes are made in the shadow tables if the virtual aachine leaves translate mode (usually via an interruption), unless it also leaves extended control
aode. Dropping out of BC mode is the signal for CP to release all of the
shadow page and segment tables and the copy of the virtual segment
table.
There are soae situations that require invalidating all of the shadow
tables constructed by CP or even releasing and reallocating thea. Whenever DftKPTR swaps out a page that belongs to a virtual relocating
aachine, it sets a bit in the VMBLOK indicating that all of the shadow
page tables .ust be invalidated. Invalidation of all of the tables is required since CP does not know which third-level storage pages map into
the second-level page that is being swapped out. The actual
invalidation is handled by D!KVATAB, called fro. DMKDSP when the virtual
aachine is on the verge of being dispatched. CP Introduction 1-119
Previous Page Next Page