Field Control Address Offset No. Of Name alack Type (Hex) Bytes Contents MICVPSW MICBLOK Real 8 4 Address VMPSW VM.BLOK Real 0 2 Virtual Figure 5. Fields Used in INSERT PSWKEY INSERT STORAGE KEY The INSERT STORAGE KEY instruction is
executed for a virtual machine if the virtual
machine assist is activated for this instruction
unless (1) a virtual-machine exception is
recognized, (2) the real page size is 2K bytes, or
(3) some pertinentVM/370 control field cannot befetched. The insert-storage-key function of the virtual
machine assist is invoked each time aCPU attempts
to execute an INSERTSTORAGE KEY instruction
when the problem-state bit of the real PSW is one.
Execution of this function consists in performing
the following steps:
1. Execution of this function ends with a program
interruption for aprivileged.,.operation exception if bits 0-2 of control register 6 are
not100 binary or if bits 28-31 of the general
register specified by the R2 field of the
instruction are not zeros (1).
2. The wordMICRSEG, which contains the real
segment-table address, is fetched with a key of
zero. Execution ends if an addressing
condition is encountered (2.A.1).
3. Execution ends with a program interruption for
a privileged-operation exception if bit30 of
MICRSEG is one (2.A.2).
4. The address in the general register specified by
the R2 field of the instruction is partitioned to
obtain the segment index and the page index.
The partitioning of the address is based on
4K-byte pages and either 64K-byte or 1M-byte
segments, depending on whether bit 31 of
MICRSEG is zero or one, respectively. For a
64K-byte segment, execution ends with a
program interruption for a priVileged-operation
exception if the segment-table-length value in
bit positions0-7 of MICRSEG is less than the
value obtained by appending four zeros to the
left of bits 8-11 of the address specified
(2.A.3).
s. The address of the real segment-table entry is
computed and the entrySEGPAGE is fetched
with a key of zero. Execution ends if an
addressing condition is encountered (2.A.4).10 Virtual-Machine Assist and Shadow-Table-Bypass Assist
ofVMPSW PSW bits 0-15 6. Execution ends with a program interruption for
a privileged-operation exception if the
segment-table entry is invalid, if the entry has
an invalid format, or if the value of the
leftmost four bits of the page index exceeds the
value of bits0-3 of the segment-table entry
(2.A.S).
7. The location of the wordP AGSWP, containing
the swap-table address, is computed by
subtracting 4 from the page-table origin derived
from the segment-table entry. The word at this
location is fetched with a key of zero.
Execution ends if an addressing condition is
encountered (2.A.6.A.l).
8. Eight times the page index is added to bits 8-31
of a swap-table-address word. The swap-table
word at the address computed is fetched with a
key of zero. Execution ends if an addressing
condition is encountered.SWPKEYI and SWPKEY2 are in bytes 2 and 3 of the word
fetched (2.A.6.A.2).
9. Twice the page index is added to the page-table
origin from the segment-table entry to obtain
the address of the page-table entry. The page
table entryP AGCORE is fetched with a key of
zero. Execution ends if an addressing
condition is encountered (2.A.6.B.l).10. Execution ends with a program interruption for
a privileged-operation exception if the page
table entry is valid and has an invalid format
(2.A.6.B.2).
11. If the page-table entry is valid, the real storage
key is fetched. Execution ends if an addressing
condition is encountered in fetching the real
storage key. If the page-table entry is invalid,
this step is not performed (2.A.6.B.3).
12. The wordMICVPSW, containing the virtual PSW address, is fetched with a key of zero.
Execution ends if an addressing condition is
encountered (2.B.1).
13.VMPSW, the virtual PSW, is fetched with a key
of zero. Execution ends if an addressing
condition is encountered (2.B.2).
J 4. Execution ofINSERT STORAGE KEY is
completed bymodifying the contents of the
executed for a virtual machine if the virtual
machine assist is activated for this instruction
unless (1) a virtual-machine exception is
recognized, (2) the real page size is 2K bytes, or
(3) some pertinentVM/370 control field cannot be
machine assist is invoked each time a
to execute an INSERT
when the problem-state bit of the real PSW is one.
Execution of this function consists in performing
the following steps:
1. Execution of this function ends with a program
interruption for a
not
register specified by the R2 field of the
instruction are not zeros (1).
2. The word
segment-table address, is fetched with a key of
zero. Execution ends if an addressing
condition is encountered (2.A.1).
3. Execution ends with a program interruption for
a privileged-operation exception if bit
MICRSEG is one (2.A.2).
4. The address in the general register specified by
the R2 field of the instruction is partitioned to
obtain the segment index and the page index.
The partitioning of the address is based on
4K-byte pages and either 64K-byte or 1M-byte
segments, depending on whether bit 31 of
MICRSEG is zero or one, respectively. For a
64K-byte segment, execution ends with a
program interruption for a priVileged-operation
exception if the segment-table-length value in
bit positions
value obtained by appending four zeros to the
left of bits 8-11 of the address specified
(2.A.3).
s. The address of the real segment-table entry is
computed and the entry
with a key of zero. Execution ends if an
addressing condition is encountered (2.A.4).
of
a privileged-operation exception if the
segment-table entry is invalid, if the entry has
an invalid format, or if the value of the
leftmost four bits of the page index exceeds the
value of bits
(2.A.S).
7. The location of the word
the swap-table address, is computed by
subtracting 4 from the page-table origin derived
from the segment-table entry. The word at this
location is fetched with a key of zero.
Execution ends if an addressing condition is
encountered (2.A.6.A.l).
8. Eight times the page index is added to bits 8-31
of a swap-table-address word. The swap-table
word at the address computed is fetched with a
key of zero. Execution ends if an addressing
condition is encountered.
fetched (2.A.6.A.2).
9. Twice the page index is added to the page-table
origin from the segment-table entry to obtain
the address of the page-table entry. The page
table entry
zero. Execution ends if an addressing
condition is encountered (2.A.6.B.l).
a privileged-operation exception if the page
table entry is valid and has an invalid format
(2.A.6.B.2).
11. If the page-table entry is valid, the real storage
key is fetched. Execution ends if an addressing
condition is encountered in fetching the real
storage key. If the page-table entry is invalid,
this step is not performed (2.A.6.B.3).
12. The word
Execution ends if an addressing condition is
encountered (2.B.1).
13.
of zero. Execution ends if an addressing
condition is encountered (2.B.2).
J 4. Execution of
completed by