Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN25-0829 DIAGNOSE Instruction In a Virtual Machine
The DIAGNOSE instruction cannot be used in a virtual machine for its
normal function. If a virtual machine attempts to execute a DIAGNOSE instruction, a program interrupt returns control to CP. Since a DIAGNOSE instruction issued 1n a virtual machine results only in
returning control to CP and not in performing normal DIAGNOSE functions,
the instruction is used for communication between a virtual machine and CP. The machine language format of DIAGNOSE is:
Rx, Ry CODE <------- 4 bytes ------->
83 I Rx I Ry I CODE is X'83' and interpreted by the assembler as the DIAGNOSE instruction. There is no mnemonic for DIAGNOSE. are general purpose registers that contain operand storage
addresses or return codes passed to the DIAGNOSE interface.
If the registers contain addresses, those addresses must be
real to the virtual machine issuing the DIAGNOSE. is a two-byte hexadecimal value that CP uses to determine what DIAGNOSE function to perform. The codes defined for the
general VM/SP user are described in this section. The code
must be multiple of four. Codes X'OO' through X'FC' are
reserved for IBM use, and X'100' through X'1FC' are reserved
for users.
Because DIAGNOSE operates differently in a virtual machine than it
does in a real machine, a program should determine that it is operating
in a virtual machine before issuing a diagnose instruction, and prevent
execution of a DIAGNOSE when in a real machine. The Store Processor 10 (STIDP) instruction provides a program with information about the
processor in which it is executing, including the processor version
number. If STIDP is issued from a virtual machine, the version number
will be X'FF' in the first byte of the CPUID field.
A virtual machine issuing a diagnose instruction should run with interrupts disabled. This prevents loss of status information
pertaining to the diagnose operation such as condition codes and sense
182 IBM VM/370 System programmer's Guide
April 1, 1981 DIAGNOSE Code X'OO' -- Store Extended-Identification Code
Execution of DIAGNOSE code X'OO' allows a virtual machine to examine the VM/370 extended-identification code. For example, an as/VS1 virtual
machine issues a DIAGNOSE code X'OO' instruction to determine if the
version of VM/370 under which it is executing supports the VM/VS Handshakinq feature. If the extended-identification code is returned to VS1, VM/370 supports handshaking; otherwise, it does not.
The register specified as Rx contains the doubleword aligned virtual
storaqe address where the VM/370 extended-identification code is to be
stored. The Ry register contains the number of bytes to be stored
entered as an unsiqned binary number.
If the VM/370 system currently executing does not suooort the
DIAGNOSE code - x'OO' instruction, no data is returned to the virtual
machine. If it does support the DIAGNOSE code X'OO' instruction, the
following data is returned to the virtual machine (at the location
specified by RX): System
Number Version Code
MCEL Processor Address User id Program Product
Bit Map
The first byte is the
version number, the second
byte is the level, and the third byte is the PLC (Proqram Level
Chanqe) number. VM/370 executes the STIDP (Store Processor ID) instruction
to determine the version
code. VM/370 executes the STIDP instruction to determine
the maximum length of the MCEL (Machine Check Extended
Logout) area. VM/370 executes the STAP (Store Processor Address)
instruction to determine the
processor address.
The userid of the virtual
machine issuing the DIAGNOSE.
Bits that indicate the
Proqram Products that
are installed.
8 bytes;-EBCDIC 3 bytes, hexadecimal
1 byte, hexadecimal
2 bytes, hexadecimal
2 bytes, hexadecimal
8 bytes, EBCDIC 8 bytes, hexadecimal
(Reserved for IBM use)
If VM/370 is executinq in a virtual machine, another 24 bytes, or
less, of extended identification data is appended to the first 24 bytes
described above. Up to five nested levels of VM/370 virtual machines are sup-ported b-y·--th-is diaqno-se- inst-ru€tion result in-g in a max-i-m--u-m- of -1-6-0- bytes of data that can be returned to the virtual machine that initially
issued the DIAGNOSE instruction. Upon return, Ry contains its original value less the number of bytes
that were stored. Part 2. Control Proqram (CP) 183
Previous Page Next Page