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 be fetched. The insert-storage-key function of the virtual­
machine assist is invoked each time a CPU attempts
to execute an INSERT STORAGE 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 a privileged.,.operation exception if bits 0-2 of control register 6 are
not 100 binary or if bits 28-31 of the general
register specified by the R2 field of the
instruction are not zeros (1).
2. The word MICRSEG, 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 bit 30 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 positions 0-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 entry SEGPAGE 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
of VMPSW 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 bits 0-3 of the segment-table entry
(2.A.S).
7. The location of the word P 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 entry P 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 word MICVPSW, 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 of INSERT STORAGE KEY is
completed by modifying the contents of the
general register (first operand) specified by the
R 1 field of the instruction. The modification
depends on the value of bit 20 of the second­
operand address, on whether the virtual PSW is itt---E&-&-BG--m:eds-,--and-Bu-wb£thet---the-rea1-- .. -
page-tabie entry is valid or invalid. The setting
of the first-operand tit positions is as shown in
Figure 6 (3).
Figure 7 summarizes the fields used. Setting of First-Operand Bits When
Bit 20 of Second Operand Is: Positions of
First Operand 0-23 24-28 I !
-
- - 1
29
3U In virtual BC mode 29-30 in virtual
mode, inval id PTE I ! EC Zero One Unchanged Unchanged
Bits 16-20 of Bits 24-28 of
swap-table word swap-table word - .., .- -- Leros Leru:, Bits 21-22 of I Bits 29-30 of
swap-table word swap-table word 29-30 in virtuai
! OR bits 5-6 of stor- OR bits 5-6 of i EC mode, valid PTE I age key, bits 21-22 key, bits 29-30 of swap-table word
31 Zero Figure 6. Setting of First-Operand Bits
Field Control Address
Name Block Type MICRSEG MICBLOK Real MICVPSW MICBLOK Real .... t'. " I I __ 1 IvMBLOK IRedl SEGPAGE ISEGTABLE Real PAGSWP PAGTABLE Real PAGCORE PAGTABLE Real SWPKEY 1 I SWPTABLE I Rea 1 SWPKEY2 jSWPTABLE!Real Offset (Hex) 0 8
o 4SX -4 2PX 1
8PX
+
2
I I !SPX+3 No. of
Bytes
4
4 ') 4
4
2
Figure 7. Fields Used in INSERT STORAGE KEY
of swap-table
word Zero Contents Address of real
segment table
Address of VMPSW \1 ... II 1 DC: t- Segment-table entry
Address of swap table Page-table entry ILOW 2K-byte virtual
key IHi9h 2K-byte virtual
key I I i
- -I I I I I I I Virtual-Machine Assist 11
Previous Page Next Page