lation when DAT is on. When OAT is on
and the first-operand address cannot be
translated because of a situation that
would normally cause a page-translation
or segment-translation exception, the
instruction is completed by setting
condition code 3.When translation of the first-operand
address can be completed, or whenOAT is
off, the storage key for the block
designated by the first-operand addressis tested against the access key speci
fied in bits 24-27 of the second-operand
address, and the condition code is set
to indicate whether store and fetch
accesses are permitted, taking into
consideration all applicable protection
mechanisms. Thus, for example, if the
low-address-protection facility is
installed and active and if the first
operand effective address is less than
512, then a store access is not permit
ted.Segment protection, when
installed, is also taken into account.
The contents of storage, including the
change bit, are not affected. Depending
on the model, the reference bit for the
first-operand address may be set to one,
even for the case in which the location
is protected against fetching.Special Conditions When OAT is on, an addressing exception
is recognized when the address of the
segment-table entry, the page-table
entry, or the operand real address after
translation designates a location which
is not available in the configuration.
Also, when DAT is on, a translation
specification exception is recognized
when the segment-table entry or page
table entry has a format error. When
DAT is off, only the addressing excep
tion due to the operand real address
applies. For all of these cases, the
operation is suppressed.
ResultingCondition Code:
o Fetching permitted; storing
permitted
1 Fetching permitted; storing not
permitted
2 Fetching not permitted; storing
not permitted
3 Translation not available
Program Exceptions:
Addressing (operand 1)Operation (if the extended facility
is not installed)
Privileged operation
Translation specification
Programming 1. TEST PROTECTION permits a program
to check the validity of an address
passed from a calling program with
out incurring program exceptions.
The instruction sets a condition
code to indicate whether fetching
or storing is permitted at the
location designated by the first
operand address of the instruction.
The instruction takes into consid
eration all of the protection
mechanisms installed in the
machine: key-controlled, segment,
and low-address protection. Addi
tionally, since segment translation
and page translation may be a
program substitute for a protection
violation, these situations are
used to set the condition code
rather than cause a program excep
tion.
2.See the programming notes under SET PSW KEY FROM ADDRESS for more
details and for an alternative
approach to testing validity of
addresses passed by a calling
program. The approach usingTEST PROTECTION has the advantage of a
test which does not result in
interruptions; however, the test
and use are separated in time and
may not be accurate if the possi
bility exists that the storage key
of the location in question can
change between the time it is test
ed and the time it is used.
3. In the handling of dynamic address
translation,TEST PROTECTION is
similar toLOAD REAL ADDRESS in
that the instructions do not cause
page-translation and segment
translation exceptions. Instead,
these situations are indicated by
means of a condition-code setting.Situations which result in condi
tion codes 1, 2, and 3 forLOAD REAL ADDRESS result in condition
code3 for TEST PROTECTION. The
instructions also differ in several
other respects. The address of TEST PROTECTION is a
logical address and thus is not
subject to translation when DAT is
off. The second-operand address of
LOAD REALADDRESS is a· virtual
address which is always translated.TEST PROTECTION may use the TLB for
translation of the address, whereasLOAD REAL ADDRESS does not use the
TLB.(LOAD REAL ADDRESS is the
only instruction which must perform
translation without use of the
TLB.)
When DAT is off forLOAD REAL ADDRESS, the translation-specifica
tion exception for an invalid value
of bits 8-12 of control register0 occurs after instruction fetching Chapter 10. Control Instructions 10-53
and the first-operand address cannot be
translated because of a situation that
would normally cause a page-translation
or segment-translation exception, the
instruction is completed by setting
condition code 3.
address can be completed, or when
off, the storage key for the block
designated by the first-operand address
fied in bits 24-27 of the second-operand
address, and the condition code is set
to indicate whether store and fetch
accesses are permitted, taking into
consideration all applicable protection
mechanisms. Thus, for example, if the
low-address-protection facility is
installed and active and if the first
operand effective address is less than
512, then a store access is not permit
ted.
installed, is also taken into account.
The contents of storage, including the
change bit, are not affected. Depending
on the model, the reference bit for the
first-operand address may be set to one,
even for the case in which the location
is protected against fetching.
is recognized when the address of the
segment-table entry, the page-table
entry, or the operand real address after
translation designates a location which
is not available in the configuration.
Also, when DAT is on, a translation
specification exception is recognized
when the segment-table entry or page
table entry has a format error. When
DAT is off, only the addressing excep
tion due to the operand real address
applies. For all of these cases, the
operation is suppressed.
Resulting
o Fetching permitted; storing
permitted
1 Fetching permitted; storing not
permitted
2 Fetching not permitted; storing
not permitted
3 Translation not available
Program Exceptions:
Addressing (operand 1)
is not installed)
Privileged operation
Translation specification
Programming
to check the validity of an address
passed from a calling program with
out incurring program exceptions.
The instruction sets a condition
code to indicate whether fetching
or storing is permitted at the
location designated by the first
operand address of the instruction.
The instruction takes into consid
eration all of the protection
mechanisms installed in the
machine: key-controlled, segment,
and low-address protection. Addi
tionally, since segment translation
and page translation may be a
program substitute for a protection
violation, these situations are
used to set the condition code
rather than cause a program excep
tion.
2.
details and for an alternative
approach to testing validity of
addresses passed by a calling
program. The approach using
test which does not result in
interruptions; however, the test
and use are separated in time and
may not be accurate if the possi
bility exists that the storage key
of the location in question can
change between the time it is test
ed and the time it is used.
3. In the handling of dynamic address
translation,
similar to
that the instructions do not cause
page-translation and segment
translation exceptions. Instead,
these situations are indicated by
means of a condition-code setting.
tion codes 1, 2, and 3 for
code
instructions also differ in several
other respects. The
logical address and thus is not
subject to translation when DAT is
off. The second-operand address of
LOAD REAL
address which is always translated.
translation of the address, whereas
TLB.
only instruction which must perform
translation without use of the
TLB.)
When DAT is off for
tion exception for an invalid value
of bits 8-12 of control register