D!KPRVLG deter.ines if the privileged operation affects the virtual I/O configuration. D!KPRVLG simulates non-I/O privileged instructions
(such as LPSi). If the instruction's operation code is fro. X'9C to X'9F', control is transferred to D!KVSIEX. After clearing the condition code in the user's V!BLOK, D!KSCIVU is
then called to locate the virtual I/O blocks representing the I/O components (channel, control unit and device) addressed by the
instruction. D!KVSIEX then branches to handle the request based on the
operation requested.
In attached processor systems, the I/O control blocks are protected
by forcing all critical execution paths in CP to operate on the main processor. VIRTUAL I/O REQUESTS The virtual I/O interface maintained by CP provides to the software
operating in the useris virtual machine, the condition coaes, status
inforaation, and interruptions necessary to make it appear to the user's
virtual machine that it is in fact running on a real System/370. The
virtual I/O interface consists of: A virtual I/O configuration for each active virtual machine that
consists of a set of I/O control blocks that are maintained in the
Control Program's free storage. This configuration is built at logon time fro. information contained in the user's directory file, and can
be changed by the user or the system operator. A set of routines that maintain the status of the virtual I/O
configuration. Other system routines that simulate or translate the channel programs provided by the user to initiate I/O on units in the real system's configuration. Virtual SIO With a SIO" the condition code returned from DBKSCRVU is tested to
verify that all addressed components were located. If they were not,
then a condition code of 3 (unit not available) is placed in the PSi and
control returns to the dispatcher. Otherwise, the addresses of the
appropriate virtual I/O control blocks are saved, and D!KVSIEX tests the
status of the addressed I/O units by scanning the VCHBLOKs, VCUBLOKS, and VDEVBLOKs to locate the block that contains the status of the
addressed subchannel. The subchannel status is indicated in: The VCHBLOK for a selector or block multiplexer channel. The VCUBLOK for a shared selector subchannel on a byte multiplexer channel. The VDEVBLOK for a nonshared subchannel on a byte multiplexer channel. When the block containing the status is found, the status is tested.
If the subchannel is busy or has an interruption pending, condition code
2 is placed in the virtual PSi. Otherwise, the subchannel is available
and the device and the control unit are tested for interruption pending
1-84 IB! V!/370 System Logic and Problem Determination--Volume 1
or busy. If either is found, condition code 1 is placed in the virtual PSW and the proper CSW status is stored in the virtual aachine's page
zero. If all components in the subchannel path are free, DeKVSIEX proceeds to simulate the SIO by locating and loading the contents of the
virtual machine's CAW from virtual location X'48' and testing the device
type of the unit addressed.
The device type is in the VDEVBLOK. If the device class code
indicates a terminal or console, control is passed to the aodule DMKVCNEX with a GOTO. DeKVCREX interprets and simulates the entire
channel program, moving the necessary data to or froa virtual storage
and reflecting the proper interruptions and status bytes. When DeKVCIEX has finished, it passes control directly to the dispatcher, DftKDSPCH. If the referenced device is a spooled unit record device, DeKVSIEX passes control to DMKVSPEX for additional processing. When control returns to DBKVSIEX, it passes control to DftKDSPCH. If the device is not a terminal or a spooling device, the SIO is
translated and executed directly on the real systea's I/O device. DMKVSIEX calls DMKFREE to obtain free storage and then it constructs an IOBLOK in the storage obtained. The IOBLOK serves as an identifier of
the I/O task to be performed. It contains a pointer to the channel
program to be executed and the address of the routine that is to handle
any interruptions associated with the operation. DMKVSIEX stores the contents of the user's CAW in IOBC1W and sets the
interruption return address (IOBIRA) to be the same as the virtual
interruption return address (DHKVIOIN) in DftKVIO. The CCW translation
routine (DMKCCWTR) is then called to locate and bring into real main storage all user pages associated with the channel prograa, including
those containing data and CCWs. The following occurs: The CCWs are translated. A corresponding real channel program is constructed. The data pages are locked into real storage. DftKCCWTR returns control to DftKVSIEX. DftKVSIEX places the user in a
pseudo wait state, IOWAIT, and calls the real I/O scheduler DftKIOSQV to schedule the I/O on the real configuration. DMKIOSQV queues the request for operation on the real channel,
control unit, and device corresponding to the address used by the
virtual machine. When the real SIO is issued, DftKIOS takes the user out
of IOWAIT and reflects the condition code for the SIO if it is zero. If
it is not zero, the operation is further analyzed by DftKVIOII. In any
case, DftKIOSQV returns control to DftKVSIEX, which passes control to DMKDSPCH. Privileged I/O Instructions Other privileged I/O instructions are handled directly by DftKVSIEX. scans the virtual channel, control unit, and device blocks in
the same manner as for a SIO and reflects the proper status and
condition to the virtual machine. In soae cases (TIO), the status of
the addressed devices is altered after the status is presented.
CP Introduction 1-85
Previous Page Next Page