Diagnostic instructions and associated storage keys for restoring machine state
By using diagnostic instructions in a computing environment to restore the machine state from the dump storage area and using storage keys to protect data access, the problems of data recovery and access permission protection in the existing technology are solved, and efficient data recovery and security protection are achieved.
Patent Information
- Application Number
- CN202480013215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-17
- Filing Date
- 2024-02-02
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies have difficulty in efficiently restoring machine states and protecting data access rights in computing environments, especially in saving and restoring selected data and related storage keys when program loading errors occur.
A computer program product is provided, including diagnostic instructions for obtaining selected data from a dump storage area and restoring a machine state, while using a storage key to protect data access and realizing data recovery and storage through a diagnostic processing module.
It achieves efficient recovery of machine status and protection of data access rights in the computing environment, ensures data security and integrity, and supports data recovery and protection under multiple computing environment architectures.
Smart Images

Figure CN120641877A_ABST
Abstract
Description
Background Art
[0001] One or more aspects relate generally to facilitating processing within a computing environment, and particularly to improving data recovery processing within a computing environment.
[0002] There are situations where it is necessary to save data for later retrieval if necessary. As an example, during the initial program load of a program, a boot loader is loaded into memory and used to perform the initial program load before passing control to the program. Once the program receives control from the boot loader, it is free to use the memory previously occupied and used by the boot loader for its own purposes.
[0003] If an error is encountered at a later time, a dump program can be loaded to save selected data (e.g., overwritten data) from the program's memory to a storage device for later use during debugging. To load the dump program, an initial program load is performed. As part of the initial program load of the dump program, the selected data is saved before loading the boot loader, which will load the dump program. This facilitates the acquisition and recovery of this data. Summary of the Invention
[0004] A computer program product for facilitating processing within a computing environment overcomes the shortcomings of the prior art and provides additional advantages. The computer program product includes one or more computer-readable storage media and program instructions stored collectively on the one or more computer-readable storage media for performing a method. The method includes obtaining instructions to be executed within the computing environment. The instructions include an operation code indicating a diagnostic operation. Executing the instructions includes retrieving selected data from a dump storage area to be used for restoring a machine state, and restoring the machine state. Restoring includes storing the selected data in a selected location. One or more storage keys used to protect access to the selected data are restored.
[0005] Computer-implemented methods and systems related to one or more aspects are also described and claimed herein. Additionally, services related to one or more aspects are also described and claimed herein.
[0006] Additional features and advantages are realized through the techniques described herein.Other embodiments and aspects are described in detail herein and are considered a part of the claimed aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] One or more aspects are particularly pointed out and distinctly claimed as examples in the claims at the conclusion of the specification. The foregoing and objects, features and advantages of one or more aspects will become apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:
[0008] Figure 1A An example of a computing environment for incorporating and using one or more aspects of the present invention is depicted;
[0009] Figure 1B Another example of aspects of a computing environment for incorporating and using one or more aspects of the present invention is depicted;
[0010] Figure 2 depicts an example of further details of a processor or processor unit according to one or more aspects of the present invention;
[0011] Figure 3A Depicts an example according to one or more aspects of the present invention. Figure 1A An example of a submodule of a diagnostic processing module;
[0012] Figure 3B Describes an embodiment of the present invention according to one or more aspects Figure 3A An example of a submodule of an execution instruction submodule;
[0013] Figure 4A An example of a format for a diagnostic instruction according to one or more aspects of the present invention is depicted;
[0014] Figures 4B-4C Describes a method according to one or more aspects of the present invention. Figure 4A an example of fields of a register pair used by an exemplary execution of a diagnostic instruction;
[0015] Figure 4D Describes a method according to one or more aspects of the present invention. Figure 4A an example of fields of registers used by an example execution of a diagnostic instruction;
[0016] Figures 4E-4F Describes a method according to one or more aspects of the present invention. Figure 4A an example of fields of a register pair used by another exemplary execution of a diagnostic instruction;
[0017] Figure 4G Describes a method according to one or more aspects of the present invention. Figure 4A an example of a field of a register used by another exemplary execution of a diagnostic instruction;
[0018] Figure 5AAn example of diagnostic instruction processing according to one or more aspects of the present invention is depicted;
[0019] Figure 5B Describes the implementation of one or more aspects of the present invention Figure 5A An example of further details of the operation;
[0020] Figure 5C Describes the implementation of one or more aspects of the present invention Figure 5A Another example of further details of the operation of;
[0021] Figure 6 Describes the use of one or more aspects of the present invention Figure 4A An example of a diagnostic instruction; and
[0022] Figures 7A-7B Another example of a computing environment is depicted to incorporate and use one or more aspects of the present invention. DETAILED DESCRIPTION
[0023] According to one or more aspects of the present invention, a capability is provided for facilitating processing within a computing environment. In one aspect, the capability includes facilitating processing related to restoring machine state (e.g., original data) based on a selected condition (e.g., an error). In one example, the capability includes retrieving data from a selected region using an instruction (e.g., a single architectural instruction), restoring the machine state using the retrieved data, and restoring a storage key associated with the retrieved data.
[0024] In one or more aspects, an instruction is issued by an entity (e.g., a dump program, a boot loader, etc.) to retrieve a selected portion of data (e.g., of an operating system, a logical partition, etc.) from a selected area (e.g., a dump save area). The retrieved data is used to restore a machine state (e.g., the original data saved to the dump save area) and to recover a storage key associated with the selected portion of the data.
[0025] In one or more aspects, instructions are used (e.g., in one execution) to perform one or more other functions including, but not limited to, freeing a selected region for other use, creating an unenabled wait program status word (PSW), and / or ending a currently executing initial program load (IPL).
[0026] In one or more aspects, an instruction is configured to include multiple subcodes, and a specific subcode is selected for a specific execution of the instruction. One or more functions are performed in the specific execution of the instruction based on the selected subcode. The instruction can be issued by one or more components of a computing environment, including but not limited to programs such as a dump program, a boot loader, etc. Many options and / or variations are possible.
[0027] In one or more aspects, instructions are referred to herein as diagnostic instructions, and the processing associated with instructions including recovery processing is referred to herein as diagnostic processing. Instructions can be used by other programs and / or entities and / or for other purposes. Many variations and options are possible.
[0028] One or more aspects of the present invention are incorporated into, executed by, and / or used by a computing environment. By way of example, the computing environment can be of various architectures and types, including, but not limited to, personal computing, client-server, distributed, virtual, simulated, partitioned, non-partitioned, cloud-based, quantum, grid, time-sharing, clustered, peer-to-peer, wearable, mobile, having one or more nodes, having one or more processors, and / or any other type of environment and / or configuration capable of executing, for example, a process (or processes) for performing diagnostic processing (including executing selected subcodes of diagnostic instructions) and / or one or more other aspects of the present invention. Aspects of the present invention are not limited to a particular architecture or environment.
[0029] Various aspects of the present disclosure are described by narrative text, flow charts, block diagrams of computer systems, and / or block diagrams of machine logic included in computer program product (CPP) embodiments. With respect to any flow chart, depending on the technology involved, the operations may be performed in an order different from the order shown in a given flow chart. For example, two operations shown in successive flow chart blocks may be performed in reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time, again depending on the technology involved.
[0030] Computer program product embodiments ("CPP embodiments" or "CPPs") are terms used in this disclosure to describe any collection of one or more storage media (also referred to as "media") that are collectively included in a collection of one or more storage devices, which collectively include machine-readable code corresponding to instructions and / or data for performing the computer operations specified in a given CPP claim. A "storage device" is any tangible device that can hold and store instructions for use by a computer processor. Without limitation, a computer-readable storage medium can be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include: magnetic disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or pits / land formed in a major surface of a disk), or any suitable combination of the foregoing. As the term is used in this disclosure, computer-readable storage media should not be construed as storing data in the form of transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides, light pulses through fiber optic cables, electrical signals transmitted through wires, and / or other transmission media. As will be understood by those skilled in the art, data is typically moved at certain occasional points in time during the normal operation of the storage device, such as during access, defragmentation, or garbage collection, but this does not make the storage device transitory because the data is not transitory while it is stored.
[0031] refer to Figure 1AAn example of a computing environment for executing, incorporating, and / or using one or more aspects of the present invention is described. In one example, computing environment 100 includes an example of an environment for executing at least some of the computer code involved in executing the methods of the present invention, such as diagnostic processing code or module 150. In addition to block 150, computing environment 100 includes, for example, computer 101, wide area network (WAN) 102, end-user device (EUD) 103, remote server 104, public cloud 105, and private cloud 106. In this embodiment, computer 101 includes processor group 110 (including processing circuitry 120 and cache 121), communication fabric 111, volatile memory 112, persistent storage 113 (including operating system 122 and block 150, as described above), peripheral device group 114 (including user interface (UI) device group 123, storage 124, and Internet of Things (IoT) sensor group 125), and network module 115. Remote server 104 includes remote database 130. The public cloud 105 includes a gateway 140 , a cloud coordination module 141 , a host physical machine group 142 , a virtual machine group 143 , and a container group 144 .
[0032] Computer 101 may take the form of a desktop computer, a laptop computer, a tablet computer, a smartphone, a smartwatch or other wearable computer, a mainframe computer, a quantum computer, or any other form of computer or mobile device now known or developed in the future that is capable of running programs, accessing a network, or querying a database such as remote database 130. As is well known in the art of computer technology, and depending on the technology, the performance of computer-implemented methods may be distributed among multiple computers and / or across multiple locations. On the other hand, in this presentation of computing environment 100, the detailed discussion focuses on a single computer, particularly computer 101, to keep the presentation as simple as possible. Computer 101 may be located in the cloud, although in Figure 1A On the other hand, computer 101 need not be in the cloud except to any extent that can be positively indicated.
[0033] Processor complex 110 includes one or more computer processors of any type now known or to be developed in the future. Processing circuitry 120 may be distributed across multiple packages, such as multiple cooperating integrated circuit chips. Processing circuitry 120 may implement multiple processor threads and / or multiple processor cores. Cache 121 is memory located in the processor chip package and is typically used for data or code that should be quickly accessed by threads or cores running on processor complex 110. Cache memory is typically organized into multiple levels based on relative proximity to the processing circuitry. Alternatively, some or all of the caches of the processor complex may be located "off-chip." In some computing environments, processor complex 110 may be designed to work with qubits and perform quantum computations.
[0034] Computer-readable program instructions are typically loaded onto the computer 101 to cause the processor group 110 of the computer 101 to execute a series of operating steps to implement a computer-implemented method, such that the instructions so executed will instantiate the narrative description of the computer-implemented method included in this document and / or the method specified in the flow chart (collectively referred to as the "inventive method"). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 121 and other storage media discussed below. The program instructions and associated data are accessed by the processor group 110 to control and direct the execution of the inventive method. In the computing environment 100, at least some of the instructions for performing the inventive method may be stored in a permanent storage device 113 in block 150.
[0035] Communications fabric 111 is the signaling pathway that allows the various components of computer 101 to communicate with each other. Typically, the fabric is comprised of switches and conductive pathways, such as those that constitute a bus, a bridge, physical input / output ports, etc. Other types of signal communication pathways may be used, such as fiber optic communication pathways and / or wireless communication pathways.
[0036] Volatile memory 112 is any type of volatile memory now known or developed in the future. Examples include dynamic random access memory (RAM) or static RAM. Typically, volatile memory is characterized by random access, but this is not required unless explicitly stated. In computer 101, volatile memory 112 is located in a single package and internal to computer 101, but alternatively or additionally, volatile memory can be distributed across multiple packages and / or located externally relative to computer 101.
[0037] Permanent storage 113 is any form of non-volatile memory for computers now known or developed in the future. The non-volatility of this memory means that the stored data is retained regardless of whether power is supplied to the computer 101 and / or directly to the permanent storage 113. Permanent storage 113 can be a read-only memory (ROM), but typically at least a portion of the permanent storage allows the writing, deletion, and rewriting of data. Some common forms of permanent storage include magnetic disks and solid-state storage devices. Operating system 122 can take several forms, such as various known proprietary operating systems or operating systems of the open source portable operating system interface type using a kernel. The code included in box 150 typically includes at least some of the computer code involved in executing the method of the present invention.
[0038] The peripheral device group 114 includes a collection of peripheral devices of the computer 101. The data communication connection between the peripheral devices and other components of the computer 101 can be implemented in various ways, such as a Bluetooth connection, a near field communication (NFC) connection, a connection made by a cable (such as a universal serial bus (USB) type cable), a plug-in connection (e.g., a secure digital (SD) card), a connection made through a local area communication network, and even a connection made through a wide area network such as the Internet. In various embodiments, the UI device group 123 may include components such as a display screen, a speaker, a microphone, a wearable device (such as goggles and a smart watch), a keyboard, a mouse, a printer, a touchpad, a game controller, and a tactile device. The storage device 124 is an external storage device, such as an external hard drive, or a plug-in storage device, such as an SD card. The storage device 124 can be permanent and / or volatile. In some embodiments, the storage device 124 can take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 101 requires a large amount of storage (e.g., where computer 101 locally stores and manages a large database), the storage may be provided by a peripheral storage device designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. IoT sensor group 125 consists of sensors that can be used in IoT applications. For example, one sensor may be a thermometer, while another may be a motion detector.
[0039] The network module 115 is a collection of computer software, hardware, and firmware that allows the computer 101 to communicate with other computers via the WAN 102. The network module 115 may include hardware such as a modem or a Wi-Fi signal transceiver, software for packetizing and / or depacketizing data transmitted over a communication network, and / or web browser software for transmitting data over the Internet. In some embodiments, the network control function and the network forwarding function of the network module 115 are executed on the same physical hardware device. In other embodiments (e.g., embodiments utilizing software-defined networking (SDN)), the control function and forwarding function of the network module 115 are executed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for executing the method of the present invention can typically be downloaded to the computer 101 from an external computer or external storage device via a network adapter card or network interface included in the network module 115.
[0040] WAN 102 is any wide area network (e.g., the Internet) capable of transmitting computer data over non-local distances using any technology now known or later developed for transmitting computer data. In some embodiments, WAN 102 may be replaced and / or supplemented by a local area network (LAN) designed to transmit data between devices located in a local area, such as a Wi-Fi network. A WAN and / or LAN typically includes computer hardware, such as copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers.
[0041] End-user device (EUD) 103 is any computer system used and controlled by an end user (e.g., a customer of the business operating computer 101), and can take any of the forms discussed above in connection with computer 101. EUD 103 typically receives helpful and useful data from the operation of computer 101. For example, in the hypothetical scenario where computer 101 is designed to provide recommendations to an end user, the recommendations would typically be transmitted from network module 115 of computer 101 to EUD 103 via WAN 102. In this manner, EUD 103 can display or otherwise present the recommendations to the end user. In some embodiments, EUD 103 can be a client device, such as a thin client, a heavy client, a mainframe computer, a desktop computer, or the like.
[0042] Remote server 104 is any computer system that provides at least some data and / or functionality to computer 101. Remote server 104 may be controlled and used by the same entity that operates computer 101. Remote server 104 represents a machine that collects and stores helpful and useful data for use by other computers, such as computer 101. For example, if computer 101 is designed and programmed to provide recommendations based on historical data, then this historical data may be provided to computer 101 from remote database 130 of remote server 104.
[0043] Public cloud 105 is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and / or other computer capabilities, particularly data storage (cloud storage) and computing power, without requiring direct, active management by users. Cloud computing typically leverages resource sharing to achieve consistency and economies of scale. Direct and active management of the computing resources of public cloud 105 is performed by computer hardware and / or software of cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented as virtual computing environments running on various computers comprising host physical machine group 142, which is the universe of physical computers in and / or available to public cloud 105. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine group 143 and / or containers from container group 144. It should be understood that these VCEs can be stored as images and transferred between various physical machine hosts either as images or after instantiation of the VCEs. Cloud orchestration module 141 manages the transfer and storage of images, deploys new instantiations of VCEs, and manages active instantiations of VCE deployments. Gateway 140 is a collection of computer software, hardware, and firmware that allows public cloud 105 to communicate over WAN 102 .
[0044] Some further explanation of Virtualized Computing Environments (VCEs) will now be provided. A VCE can be stored as an "image." A new, active instance of the VCE can be instantiated from that image. Two common types of VCEs are virtual machines and containers. Containers are VCEs that use operating system-level virtualization. This refers to an operating system feature where the kernel allows the existence of multiple isolated userspace instances, called containers. From the perspective of the programs running in them, these isolated userspace instances typically appear to be actual computers. Computer programs running on a normal operating system can utilize all of the resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running within a container can only use the contents of the container and the devices assigned to the container, a feature known as containerization.
[0045] 105 . Private cloud 106 is similar to public cloud 105 , except that the computing resources are only available to a single enterprise. Although private cloud 106 is depicted as communicating with WAN 102 , in other embodiments, the private cloud may be completely disconnected from the Internet and accessible only through a local / private network. A hybrid cloud is a combination of multiple clouds of different types (e.g., private, community, or public cloud types), typically implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is tied together by standardized or proprietary technologies that enable coordination, management, and / or data / application portability between the multiple constituent clouds. In this embodiment, public cloud 105 and private cloud 106 are both part of a larger hybrid cloud.
[0046] The above-described computing environment is only one example of a computing environment in which one or more aspects of the present invention may be incorporated, executed, and / or used. Other examples are possible. For example, in one or more embodiments, Figure 1A One or more components / modules are not included in the computing environment and / or are not used for one or more aspects of the present invention. In addition, in one or more embodiments, additional and / or other components / modules can be used. Other variations are possible.
[0047] refer to Figure 1B Another example of aspects of a computing environment for incorporating, using, and / or performing one or more aspects of the present invention is described. In one example, a computing environment 160 supports logical partitioning and includes, for example, a memory 165 (also referred to as system memory, main storage, main memory, central storage, storage; e.g., persistent storage such as persistent storage 113; other storage, etc.) coupled to, for example, one or more processor units 190 (e.g., central processing units (CPUs), other types of processors, etc.) of a processor complex (e.g., processor complex 110).
[0048] Memory 165 includes, for example, one or more logical partitions 170, a logical partition manager such as a hypervisor 172, and firmware 174. An example of a hypervisor 172 is provided by IBM ® ® , an International Business Machines Corporation of Armonk, New York. ® PR / SM™ (Processor Resource / System Manager) Logical Partition Manager. IBM and PR / SM are trademarks or registered trademarks of International Business Machines Corporation in at least one jurisdiction.
[0049] Logical partition support provides the ability to operate a large number of logical partitions 170, each capable of operating with a different program 180 and running a guest operating system 182. Each logical partition 170 can function as a separate system. That is, each logical partition can be independently reconfigured, run a guest operating system, and operate with different programs. An operating system or application running in a logical partition appears to have access to the entire system, but in reality, only a portion of the system is available.
[0050] In one example, logical partition 170 includes one or more logical processors, each of which represents all or a portion of a physical processor resource (eg, processor unit 190 ) that can be dynamically allocated to the logical partition.
[0051] Firmware 174 includes, for example, microcode for the processor and / or system. It includes, for example, hardware-level instructions and / or data structures used when implementing higher-level machine code. In one embodiment, it includes, for example, proprietary code, which is typically delivered as microcode including trusted software or microcode specific to the underlying hardware, and controls the operating system's access to the system hardware.
[0052] In one example, the firmware 174 includes a boot loader 176 for use in an initial program load (IPL) of a selected program (e.g., an operating system), or according to one or more aspects of the present invention, a dump program for collecting machine state (e.g., data from a selected data area (e.g., a data area of a program (e.g., an operating system)) at a specific time. Initial program loading provides a mechanism for causing a program (e.g., an operating system, a dump program) to be read from a specified device and for initiating execution of the program. In one or more embodiments, boot loader code (also referred to as a boot loader, such as boot loader 176) is loaded, copied, or otherwise present in the firmware and is used to perform an initial program load of a program (e.g., an operating system, a dump program). A specific type of initial program load is list-guided initial program load, which allows loading programs (e.g., an operating system, a dump program) from various types of input / output devices.
[0053] The program loaded by the initial program load or otherwise initiated executes instructions to perform operations within the computing environment. To execute the instructions, in one example, functional components such as processor units or processors (e.g., of processor complex 110) are used. Figure 2An example of functional components for executing instructions is described. In one example, the functional components for executing instructions include, for example, an instruction fetch component 200 for fetching instructions to be executed; an instruction decode / operand fetch component 202 for decoding the fetched instructions and obtaining operands for the decoded instructions; one or more instruction execution components 204 for executing the decoded instructions; a memory access component 206 for accessing memory, when necessary, for instruction execution; and a writeback component 208 for providing results of the executed instructions. One or more components may access and / or use one or more registers 210 in instruction processing. Additionally, one or more components may access and / or use the diagnostic processing module 150. Additional, fewer, and / or other components may be used in one or more aspects of the present invention.
[0054] According to one or more aspects of the present invention, a diagnostic processing module (e.g., diagnostic processing module 150) includes code or instructions for performing diagnostic processing. In one example, the diagnostic processing module (e.g., diagnostic processing module 150) includes various sub-modules for performing processing. The sub-modules are computer-readable program code (e.g., instructions) stored in, for example, a computer-readable medium, such as a storage device (e.g., storage device 124, persistent storage device 113, cache 121, or other storage device). The computer-readable medium may be part of a computer program product, and the computer-readable program code may be executed by and / or performed using one or more computing devices (e.g., one or more computers, such as computer(s) 101; one or more servers, such as remote server(s) 104; one or more processors, such as processor units or processors of processor complex 110; and / or processing circuitry, such as processing circuitry 120 of processor complex 110; other computing devices, etc.). Additional, fewer, and / or other computers, servers, processors, processing circuitry, and / or computing devices may be used to execute one or more of the sub-modules and / or portions thereof. Many examples are possible.
[0055] Reference Figure 3A An example of the diagnostic processing module 150 is described. In one example, the diagnostic processing module 150 includes an obtain instruction submodule 300 for obtaining (e.g., receiving, being provided, pulling, obtaining, acquiring, being issued, etc.) diagnostic instructions to be executed, and an execute instruction submodule 310 for executing the diagnostic instructions.
[0056] In one example, reference Figure 3BThe execute instruction submodule 310 includes, for example, an obtain operand submodule 312 for obtaining one or more operands of the diagnostic instruction; a determine operation submodule 314 for determining an operation to be performed by the diagnostic instruction; and an execute operation submodule 316 for executing the determined operation. Additional, fewer, and / or other submodules may be used to implement diagnostic processing, including executing diagnostic instructions and / or other processing associated therewith.
[0057] Reference Figure 4A An example of a diagnostic instruction is described. In one embodiment, a diagnostic instruction (e.g., diagnostic instruction 400 (also referred to as diagnostic "0308" in a particular architecture)) is a single-architecture hardware machine instruction at the hardware / software interface. It is configured to include multiple subcodes, and a specific subcode is indicated in the instruction call. Execution of each subcode includes performing one or more functions as part of executing the diagnostic instruction for the specified subcode.
[0058] As an example, in one implementation, the diagnostic instructions are part of an instruction set architecture. An example of an instruction set architecture for incorporating and / or using the diagnostic instructions and / or aspects of the present invention is provided by IBM Corporation of Armonk, New York. ® z / Architecture ® Instruction Set Architecture. One embodiment of the z / Architecture instruction set architecture is described in IBM Publication No. SA22-7832-12, Thirteenth Edition, September 2019, entitled “z / Architecture Principles of Operation,” the entire contents of which are incorporated herein by reference. However, the z / Architecture instruction set architecture is merely an example architecture; other architectures and / or other types of computing environments of International Business Machines Corporation and / or other entities / companies may include and / or use one or more aspects of the present invention. z / Architecture is a trademark or registered trademark of International Business Machines Corporation in at least one jurisdiction.
[0059] In one example, the diagnostic instruction 400 has a format known as a register and storage operand format, for example, having 32 bits. In this particular example, the diagnostic instruction 400 has an operation code (e.g., opcode) field 402 (e.g., bits 0-7) that specifies the diagnostic operation; a register (e.g., R1) field 404 (e.g., bits 8-11) that specifies at least one general-purpose register used in executing the diagnostic instruction; another register (e.g., R3) field 406 (e.g., bits 12-15) that specifies at least one general-purpose register used in executing the diagnostic instruction; a base register field (e.g., B2) 408 (e.g., bits 16-19) that specifies a base register; and a displacement (e.g., D2) field 410 (e.g., bits 20-31) that specifies a displacement value that is added to the value in the base register specified in the base register field 408 to provide a value to be used as the operation code extension of the diagnostic instruction 400. Each field is further described below.
[0060] In one embodiment, the fields of the instruction are separate and independent of each other; however, in other embodiments, more than one field can be combined. In addition, a field can be extended to more than one position. For example, a field can be in one group of bits and extended to another group of bits separated from the group of bits (for example, at the beginning of the instruction format and at the end of the instruction format; and / or its variants). Although example types of registers are specified, other types of registers can be used. In addition, although example positions within the instruction format are provided, other positions can also be used for one or more instruction fields. Diagnostic instructions such as diagnostic instruction 400 can have additional, fewer and / or other fields. Other examples are possible.
[0061] In addition, in the description of diagnostic instructions such as diagnostic instruction 400, the specific size (for example, specific byte and / or position) of specific location, specific field and / or field can be indicated herein. However, other locations, fields and / or sizes can be provided. In addition, although it is possible to specify that position is set to a specific value, for example one or zero, this is only an example. In other instances, if position is set, it can be set to different values, for example opposite value or another value. Many variations are possible.
[0062] If a field has a subscript number associated with it, the subscript number associated with the field indicates the operand to which the field applies. For example, the subscript number 1 associated with register R1 indicates that the register(s) designated with R1 comprise the first operand, the subscript number 2 associated with base registers B2 and D2 indicates the second operand, and so on.
[0063] In one example of the diagnostic instruction 400, the contents of the D2 field 410 are added to the contents of the general register specified in B2 408. The result is not used to address data; instead, selected bits (e.g., bits 0-47) are ignored, and the remaining selected bits (e.g., bits 48-63) are used as an opcode extension. When the opcode extension is the selected opcode (e.g., hexadecimal '0308'), the initial program load-related functions are executed.
[0064] In one example, a diagnostic instruction (e.g., diagnostic instruction 400 with a selected opcode extension (e.g., hexadecimal '0308')) provides various functions associated with an initial program load (IPL). For example, it provides a reset function used during a list-guided initial program load process, a function for starting the initial program load, and a function for setting and storing initial program load parameters.
[0065] As indicated, in one embodiment, according to one or more aspects of the present invention, the diagnostic instructions implement multiple subcodes, of which two subcodes are provided. These subcodes are referred to as subcodes 11 and 12, but may be referenced in other ways.
[0066] In one or more aspects, the use of R1 field 404 depends on the subcode specified in general register R3 of R3 field 406, as described herein. For example, selected positions (e.g., bit positions 48-63) of general register R3 contain an unsigned binary integer (e.g., 16 bits) specifying the subcode. This subcode in R3 is verified for a call to the diagnostic '0308'. Furthermore, in one example, selected positions (e.g., bit positions 0-47) of general register R3 vary based on the subcode value. In one example, for subcodes 11 and 12, bit 47 of general register R3 is reserved and is zero. Other variations and / or selections are possible.
[0067] As an example, subcode 11 is an operation such as "Load Dump Pages From List-Directed IPL Dump Save Area," while subcode 12 is an operation such as "Restore Dump Pages From List-Directed Dump Save Area and Terminate IPL." In one embodiment, subcodes 11 and 12 can be issued from any central processing unit. Each subcode is further described below.
[0068] Subcode 11 – Load dump page from list-directed IPL dump save area
[0069] In one embodiment, when subcode 11 is specified, the R1 field 404 specifies the even register in an even-odd pair of general registers; otherwise, in one example, a specification exception is recognized. The R1+1 field is the odd register in the odd-even pair. In one example, reference Figure 4B The contents 404a of general register R1 specify, for example, a starting address 420 (e.g., a starting absolute address) of a storage region in which a specified range of storage pages and their associated storage keys are to be restored from the dump save area. The address is specified, for example, on a 4K byte boundary; otherwise, in one example, a specification exception is recognized.
[0070] Furthermore, in one example, reference Figure 4C , describing the contents of general register R1+1 430a. In one example, selected positions (e.g., bit positions 0-31) of general register R1+1 contain an unsigned binary integer (e.g., 32 bits) that specifies a count 432 of pages of the dump save area to be restored, starting from the starting page number of the dump save area (specified in R3). A response code 436 is returned, for example, at selected positions (e.g., bit positions 48-63) of general register R1+1. Certain positions (e.g., bit positions 32-47) of general register R1+1 are set to, for example, zero 434 or another value. A selected response code 436 (e.g., hexadecimal 0001) indicates that the operation was completed successfully. Another selected response code 436 (e.g., hexadecimal 0002) indicates that the operation was partially successful.
[0071] refer to Figure 4D , in one example, depicts the contents 406a of general register R3. In one example, when subcode 11 is specified, selected positions (e.g., bit positions 0-31) of general register R3 include an unsigned binary integer (e.g., 32 bits) that specifies a starting page number 440 (0-N) in the dump save area from which the dump data and associated storage keys are to be restored. As indicated, selected positions (e.g., bit positions 0-31) of general register R1+1 specify a count 432 of pages of the dump save area to be restored, starting from the starting page number of the dump save area. If, for example, the starting page number is greater than the number of pages available in the dump save area, or the sum of the page count and the current page number is greater than the number of pages available in the dump save area, a selected response code 436 (e.g., hexadecimal 0203) is returned at the selected position of general register R1+1, for example, and no data or storage keys are stored. In one example, memory access to the memory area pointed to by the contents of general register R1 where a specified range of memory pages and their associated memory keys are to be restored is not protected by low address protection and key control.
[0072] In operation, in one example, subcode 11 (i.e., execution of the diagnostic instruction 400 with, for example, subcode 442 set to 11) stores a specified range of memory pages from a dump save area owned by a configuration (e.g., a logical partition, an operating system, etc.) to a specified memory area pointed to by, for example, logical address 420 in general register R1. The storage key associated with the restored primary storage device in the configuration is set to the storage key of the primary storage device that existed when the primary storage device was saved in the dump save area.
[0073] When the issuing configuration does not have a dump save area, a selected response code 436 (eg, hexadecimal 0304) is returned at selected positions (eg, bit positions 48-63) of general register R1+1, and no data or storage keys are stored.
[0074] When the page count 432 specified in general register R1+1 is set to, for example, zero and the release configuration owns the dump save area, a selected response code 436 (e.g., hexadecimal 0001) is returned in, for example, selected locations (e.g., bit positions 48-63) of general register R1+1, and no data or storage key is stored.
[0075] When one or more storage pages in the recovery specified storage range encounter an error, in the position (for example, bit position 48-63) of the selection of for example general register R1+ 1, the response code 436 (for example, hexadecimal 0002) of selection is returned. In one example, the affected indication about which pages in the specified storage range is not provided. In another example, when the storage page can not be recovered, error indication is provided in for example multiple formats. For example, a page zero with for example identification string is stored in its position. This identification string is in multiple formats (for example, EBCDIC (Extended Binary Coded Decimal Interchange Code), ASCII (American Standard Code for Information Interchange) etc.) storage so that error indication is a readable format, and no matter the format for checking the data of storage device.
[0076] When an error is encountered while recovering the storage key for any memory page within the specified memory range, a selected response code 436 (e.g., hexadecimal 0002) is returned at a selected position (e.g., bit positions 48-63) of, for example, general register R1+1. In one example, no indication is given as to which memory pages within the specified memory range are affected.
[0077] According to one or more aspects of the present invention, a diagnostic process is used to perform diagnostic processing, including executing diagnostic instructions, such as diagnostic instructions 400. Figures 5A-5CAn example of such a process is described. In one example, a diagnostic process (e.g., diagnostic process 500) can be implemented using one or more submodules (e.g., one or more of submodules 300-316) and performed by one or more computing devices (e.g., one or more computers (e.g., computer 101, other computers, etc.), one or more servers (e.g., server 104, other servers, etc.), one or more processors, processor units, nodes, and / or processing circuits, etc. (e.g., processor group 110 or other processor groups), and / or other computing devices, etc.). Although example computing devices, computers, servers, processors, processor units, nodes, and / or processing circuits are provided, additional, fewer, and / or other computers, servers, processors, processor units, nodes, processing circuits, and / or computing devices may be used for the diagnostic process and / or other processes. Various options are possible.
[0078] refer to Figure 5A In one example, a diagnostic process 500 obtains 502 (e.g., receives, retrieves, extracts, is provided, pulled, issued, etc.) an instruction, such as the diagnostic instruction 400, and executes 510 the instruction. Execution includes, for example, obtaining 512 one or more operands of the instruction. As an example, the process 500 obtains one or more of the following: an opcode using the opcode field 402, a subcode 442 using the R3 field 406, a logical address 420 of the dump page area using the R1 field 404, a starting page number 440 using the R3 field 406, and a page count 432 using the R1 field 404. In one or more embodiments, additional, fewer, and / or other operands may be used. Many variations are possible.
[0079] In one example, based on obtaining the operands, process 500 determines 514 the operation to be performed (e.g., as specified, for example, by subcode 442). In one example, the operation is a load dump page from list-directed IPL dump save area operation specified by subcode 11, however, additional, fewer, and / or other operations may be specified. Furthermore, in other embodiments, no subcode is specified, and the operation is determined from another field of the instruction, such as one or more opcode fields, one or more other fields, or by implication, etc. Many variations are possible.
[0080] In one example, based on the determination operation, process 500 performs 516 operation. Figure 5B Describes further details regarding one example of performing an operation (eg, loading a dump page from a list-directed IPL dump save area - subcode 11).
[0081] In one embodiment, process 516a performs validation 530 on one or more of the obtained operands. For example, process 516a determines whether the starting page number 440 is greater than the number of pages available in the dump save area, or whether the sum of the page count 432 and the current page number is greater than the number of pages available in the dump save area. If so, a selected response code 436 (e.g., hexadecimal 0203) is returned at a selected location, such as general register R1+1, and no data or storage key is stored. In one example, storage accesses to the storage area pointed to by the contents of general register R1, which is to restore a specified range of storage pages and their associated storage keys, are not protected by low address protection and key control.
[0082] Assuming the verification is successful, the process 516a restores 532 a specified range of memory pages from the dump save area owned by the configuration (e.g., a logical partition, an operating system) to a specified memory area pointed to by the logical address 420 in, for example, general register R1. This restores the failed machine state of the configuration by restoring, for example, portions of the memory area that were overwritten by, for example, the boot loader and / or the dump program itself. In addition, the process 516a restores 534 the storage key associated with the restored primary storage device in the configuration to the storage key of the restored primary storage device that existed when the primary storage device was saved in the dump save area.
[0083] The process 516a determines 536 a response code to return based on performing the store and restore. For example, when the release configuration does not have a dump save area, a selected response code 436 (e.g., hexadecimal 0304) is returned at a selected location (e.g., bit positions 48-63) of, for example, general register R1+1, and no data or storage key is stored.
[0084] When the page count 432 specified in general register R1+1 is set to, for example, zero and the release configuration has a dump save area, a selected response code 436 (e.g., hexadecimal 0001) is returned in, for example, a selected location (e.g., bit positions 48-63) of general register R1+1, and no data or storage key is stored.
[0085] When an error is encountered while restoring one or more memory pages in a specified memory range, a selected response code 436 (e.g., hexadecimal 0002) is returned in a selected position (e.g., bit position 48-63) of, for example, general register R1+1. The contents of any such memory page are unpredictable. In one example, no indication is given about which pages in the specified memory range are affected. In another example, when a memory page cannot be restored, an error indication in, for example, a plurality of formats is provided. For example, a page zero with, for example, an identification string is stored in its position. The identification string is stored in a plurality of formats (e.g., EBCDIC, ASCII, etc.) so that the error indication is in a readable format, regardless of the format used to view the data of the storage device.
[0086] When an error is encountered while restoring the storage key for any memory page within the specified memory range, a selected response code 436 (e.g., hexadecimal 0002) is returned at a selected position (e.g., bit positions 48-63) of, for example, general register R1+1. The contents of any such storage key are unpredictable. In one example, no indication is given as to which memory pages within the specified memory range are affected.
[0087] Process 516a returns 538 the determined response code 436. This completes the processing based on subcode 11.
[0088] In addition to subcode 11, the diagnostic instruction 400 may also specify other subcodes, including, according to one aspect of the present invention, subcode 12. Further details regarding subcode 12 are described below.
[0089] Subcode 12 – Restore dump pages from the list-directed dump save area and terminate the IPL
[0090] In one example, reference Figure 4E , when specifying subcode 12, the content 404b of general register R1 specifies, for example, an instruction address 450 (for example, 64 bits), such as a failed instruction address, which is used as the instruction address of a waiting program status word (PSW) that is not enabled. This PSW will be constructed and loaded after the storage device and the associated storage key are restored. The instruction address is not used for addressing data, and in one example, the instruction address will conform to the format of the instruction address of the program status word based on the current addressing mode. The remainder of the program status word is provided by, for example, a hypervisor. In other embodiments, controls other than the program status word can be used.
[0091] Starting from a selected location (eg, absolute storage location 0), storage access to the storage area where the dump save area storage pages and their associated storage keys are to be restored is free from low address protection and key control protection.
[0092] In one example, a response code 454 is returned at a selected position (e.g., bit positions 48-63) of the contents 430b of, for example, general register R1+1 under one or more defined circumstances. Figure 4F ), as described herein. Selected positions (e.g., bit positions 32-47) of general register R1+1 are set to selected values (e.g., zero 452). The contents 406b of general register R3 ( Figure 4G ) includes subcode 458 (e.g., bit positions 48-63), and ignores selected bit positions (e.g., bit positions 0-47) and will include, for example, zero 456 for future compatibility. Other variations are possible.
[0093] In one example, subcode 12 stores the entire range of storage pages currently owned by the release configuration (e.g., a logical partition, an operating system, etc.) from the dump save area into a storage device (e.g., a partition storage device) starting at a selected location (e.g., absolute storage location 0). The storage key associated with the restored primary storage device in the configuration is set to the restored storage key of the primary storage device that existed when the primary storage device was saved in the dump save area. In one example, the first page in the dump save area is called a prefix page, and it includes dump save area metadata instead of the first page of the primary storage area to be saved. This allows the saved primary storage area to be closed, for example, by one page. For example, a 4K byte primary storage page located at, for example, location 0 is stored in the second 4K byte page of the dump save area because the first page of the dump save area includes the prefix page. When the dump program requests to load the entire dump save area back to the same main storage area starting from, for example, location 0, the first page of the main storage area starting from, for example, location 0 will include the prefix page instead of the actual contents of the first page of the main storage area saved from, for example, location 0, and the actual contents of the first page of the main storage area starting from, for example, location 0 is loaded to main storage location 4K. To prevent the main storage area from moving, for example, 4K-byte storage pages, the prefix page is not stored; instead, the data at location 4K is regarded as the start of the actual dump data (the first page of the dump data), and the data is restored to, for example, location 0 of the main storage device starting from location 4K of the dump save area.
[0094] When the release configuration does not have a dump save area, a selected response code 454 (e.g., hexadecimal 0304 response code) is returned at a selected location (e.g., bit positions 48-63) of, for example, general register R1+1. No data is stored, no storage key is set, and the disabled wait program status word is not loaded.
[0095] When an error is encountered when restoring one or more storage pages in a specified storage range, or when an error is encountered when saving one or more storage pages in a specified storage range, the content of any such storage page is unpredictable. In one example, no indication is given about which pages in the specified storage range are affected. In another example, when a storage page cannot be restored, an error indication in, for example, a plurality of formats is provided. For example, a page zero with, for example, an identification string is stored in its place. The identification string is stored in a plurality of formats (e.g., EBCDIC, ASCII, etc.) so that the error indication is in a readable format, regardless of the format used to view the data of the storage device.
[0096] When an error is encountered while restoring the storage key for any storage page in the specified storage range, or when an error is encountered while saving the storage key for any storage page in the specified storage range, the contents of any such storage key are unpredictable. In one example, no indication is given as to which storage pages in the specified storage range are affected.
[0097] Upon completion of the memory recovery and storage key recovery functions, the dump save area owned by the release configuration is released. In one example, the hypervisor constructs a disabled wait program status word using the failed instruction address 450 (e.g., 64 bits) of the release configuration provided in general register R1 and loads it onto the release CPU to terminate the list-directed IPL. The storage state on the load mode is terminated.
[0098] Successful (or partially successful) completions are not communicated back to the publisher via a response code, since the publishing CPU will not receive control back.
[0099] In one example, reference Figure 5A Based on the determination that subcode 12 operation 514 will be performed, process 500 performs 516 operation. Figure 5C Further details are described regarding the operations performed to restore dump pages from the list-directed dump save area and terminate the IPL (subcode 12).
[0100] In one embodiment, process 516b restores 550 an entire range of memory pages from the dump save area currently owned by the issuing configuration (e.g., a configuration issuing diagnostic instructions with subcode 12) back to the partitioned storage device starting at a selected location (e.g., absolute storage location 0). Additionally, process 516b restores 552 the storage key associated with the restored primary storage device in the configuration to the storage key of the restored primary storage device that existed when the primary storage device was saved in the dump save area.
[0101] If any, the process 516a determines 554 a response code 454 to be returned based on the execution of the store and set. For example, when the release configuration does not have a dump save area, a selected response code 454 (e.g., a response code of hexadecimal 0304) is returned at a selected location (e.g., bit positions 48-63) of, for example, general register R1+1. No data is stored, no storage key is set, and the disabled wait program status word is not loaded.
[0102] When an error is encountered when restoring one or more storage pages in a specified storage range, or when an error is encountered when saving one or more storage pages in a specified storage range, the content of any such storage page is unpredictable. In one example, no indication is given about which pages in the specified storage range are affected. In another example, when a storage page cannot be restored, an error indication in, for example, a plurality of formats is provided. For example, a page zero with, for example, an identification string is stored in its place. The identification string is stored in a plurality of formats (e.g., EBCDIC, ASCII, etc.) so that the error indication is in a readable format, regardless of the format used to view the data of the storage device.
[0103] When an error is encountered while restoring the storage key for any storage page in the specified storage range, or when an error is encountered while saving the storage key for any storage page in the specified storage range, the contents of any such storage key are unpredictable. In one example, no indication is given as to which storage pages in the specified storage range are affected.
[0104] Process 516a returns 556 the determined response code.
[0105] Additionally, in one embodiment, upon completion of memory recovery and storage key recovery, process 516b releases 558 the dump save area owned by the release configuration. This allows the dump save area to be reused.
[0106] Furthermore, in one example, process 516 b constructs 560 a non-enabled wait program status word using the issue-configured failed instruction address 450 (e.g., 64 bits) provided, for example, in register R1 using a hypervisor (e.g., hypervisor 172), and terminates 562 the list-directed initial program load by, for example, loading the constructed non-enabled wait program status word on the issue central processing unit. The store state on the load mode is terminated.
[0107] In one example, a successful (or partially successful) completion is not communicated back to the publisher via a response code because the publishing central processor does not receive control back. This completes the processing based on subcode 12.
[0108] In one example, as described herein, response codes are provided for subcode functions 11 and 12. Example response codes are provided below:
[0109] A response code such as hexadecimal 0001 indicates that the function completed successfully and returned all data. This is provided for subcode 11. A response code such as hexadecimal 0002 indicates that the function was partially successful and returned partial data. This is provided for subcode 11. In one example, a response code such as hexadecimal 0002 is provided when subcode 11 is specified but an error is encountered while restoring one or more storage pages or their associated storage keys to the specified storage range.
[0110] In addition, as an example, when subcode 11 is specified but the number of pages requested to be stored from the dump save area is not available, a response code such as hexadecimal 0203 is provided; and when subcodes 11 and 12 are specified but the customer does not own the dump save area, a response code such as hexadecimal 0304 is provided.
[0111] Additional, fewer, and / or other response codes may be provided. Furthermore, the example values for the response codes are merely examples. Other values may be provided.
[0112] In one or more examples, diagnostic '0308' may encounter a program exception, examples of which are listed below. Additional, fewer, and / or other exceptions may be provided. In each case, instruction execution is suppressed.
[0113] • Identify privileged operation exceptions if the central processing unit is in a problem state.
[0114] • When a diagnostic is provided, but the diagnostic '0308' is not provided or the specified subcode is not provided on the machine, a specification exception is recognized.
[0115] • As an example, a specification exception is recognized when subcode 11 or 12 is not specified and selected positions (eg, bit positions 0-47) of general register R3 are not all zero.
[0116] • A specification exception is recognized when subcode 11 is specified and the selected position of general register R3 (e.g., bits 0-47) is not zero and a secure IPL from the selected device facility is not installed, or when subcode 11 is specified and the selected position of general register R3 (e.g., bits 32-47) is not zero and a secure IPL from the selected device facility is installed.
[0117] • A specification exception is recognized when the subcode field in selected positions (eg, bit positions 48-63) of general register R3 includes a reserved subcode value.
[0118] • Identify specification exceptions when the central processing complex operates in base mode and instructions do not execute under interpreted execution.
[0119] • A specification exception is recognized when subcode 11 or 12 is specified and the R1 field does not specify an even register.
[0120] • When subcode 11 is specified and the address specified by general register R1 is not specified on a 4k-byte boundary, a specification exception is recognized.
[0121] When subcode 11 or 12 is specified, the condition code does not change.
[0122] Example program exceptions include:
[0123] • Access (Storage-Subcode 11)
[0124] • Privileged operations
[0125] •specification
[0126] •Transaction constraints
[0127] Additional, fewer, and / or other program exceptions may be specified.
[0128] Described herein are examples of diagnostic instructions for retrieving data stored in a selected area, such as a dump save area, restoring a machine state at a selected location using the data (e.g., data present at the time of initial program load and / or at the time of a program (e.g., operating system, boot loader, etc.) failure) and recovering storage keys associated therewith. Figure 6 An example of using diagnostic instructions is described, for example, an initial program loading process using diagnostic instructions. In one example, the initial program loading process (e.g., initial program loading process 600) can be implemented using a module having one or more sub-modules and executed by one or more computing devices (e.g., one or more computers (e.g., computer(s) 101, other computers(s), etc.), one or more servers (e.g., server(s) 104, other servers(s), etc.), one or more processors, processor(s), processor(s), nodes, and / or processing circuits, etc. (e.g., processing circuits of processor group 110 or other processor groups), and / or other computing devices, etc.). Although example computing devices, computers, servers, processor units, nodes, and / or processing circuits are provided, additional, fewer, and / or other computers, servers, processors, processor units, node processing circuits, and / or computing devices can be used for the initial program loading process and / or other processes. Various options are possible.
[0129] refer to Figure 6 In one example, an initial program load process 600 saves 601 a machine state (e.g., data to be overwritten) in a selected area (e.g., a dump save area), for example, using a hypervisor (e.g., hypervisor 172). Process 600 loads 602 a boot loader (e.g., boot loader 176), for example, using the hypervisor, to a selected location (e.g., a logically partitioned memory). Process 600 performs 604 an initial program load of a program (e.g., an operating system (OS)) using the loaded boot loader. Upon initial program load, the program receives control 606 and is free to use memory once occupied by the boot loader.
[0130] Process 600 detects 608 that, for example, a program error has occurred and that a dump is to be initiated, for example, by a dump program. Based on the detected error, for example, a machine operator initiates an initial program load of the dump program. Process 600 saves 610 a machine state (e.g., program data) in a selected area (e.g., a dump save area) using, for example, a hypervisor (e.g., hypervisor 172). Process 600 loads 612 a boot loader (e.g., boot loader 176) into memory (e.g., of a logical partition) using, for example, the hypervisor. Process 600, using the boot loader, initiates 614 an initial program load of the dump program, which uses the data saved in the dump save area and possibly other data saved in memory to provide a dump for use in debugging.
[0131] Process 600 determines 616 whether the initial program load of the dump program was successful. For example, process 600 determines whether the initial program load of the dump program or the execution of the dump program failed. If the initial program load or the execution of the dump program was successful, process 600 issues 618 a diagnostic instruction subcode 11, for example, via the dump program, to transfer control to the hypervisor to obtain a specified range of memory pages, restore the machine state (e.g., store the specified range of memory pages in a selected location), and obtain a storage key to restore the storage key. However, if there is a fault not attributable to the dump program, process 600 detects an unsuccessful initial program load, for example, via the dump program or boot loader, and issues 620 a diagnostic instruction subcode 12 to transfer control to the hypervisor (e.g., hypervisor 172) to access the dump save area to obtain the stored data in the dump save area, restore the machine state and the storage key, and terminate the initial program load to enable a retry of the failed dump operation. In addition, in one example, the hypervisor terminates the client program (e.g., the guest operating system) with a guest error message on behalf of the client program.
[0132] In one example, if the initial program load is unsuccessful due to a dump program or boot loader error, another initial program load process and / or other error handling is performed.Other variations are possible.
[0133] Although examples of using diagnostic instructions are provided, additional and / or other examples are possible. One or more aspects of the processing described herein may be used for other purposes beyond those described herein. In addition, although various examples are provided for one or more formats of instructions, additional and / or other formats may be used.
[0134] Other variations and embodiments are possible.
[0135] Furthermore, although one or more examples of computing environments in which one or more aspects of the present invention may be incorporated and used are described herein, Figures 7A-7B Another embodiment of a computing environment that incorporates and uses one or more aspects of the present invention is shown.
[0136] First reference Figure 7A In this example, the computing environment 36 includes, for example, a native central processing unit (CPU) 37 based on an architecture having an instruction set architecture, memory 38, and one or more input / output devices and / or interfaces 39, coupled to each other via, for example, one or more buses 40 and / or other connections.
[0137] The local central processing unit 37 includes one or more local registers 41, such as one or more general purpose registers and / or one or more special purpose registers used during processing within the environment. These registers contain information representing the state of the environment at any particular point in time.
[0138] In addition, the native central processing unit 37 executes instructions and code stored in the memory 38, and in one specific example, the central processing unit executes emulator code 42 stored in the memory 38. This code enables a computing environment configured in one architecture to emulate another architecture (different from the one architecture) and to execute software and instructions developed based on the other architecture.
[0139] refer to Figure 7BFurther details regarding the emulator code 42 are described. The guest instructions 43 stored in the memory 38 include software instructions (e.g., related to machine instructions) that are developed to execute in an architecture different from the architecture of the native CPU 37. For example, the guest instructions 43 can be designed to execute on a processor based on another instruction set architecture, but instead, be emulated on the native CPU 37, which can be, for example, an instruction set architecture. In one example, the emulator code 42 includes an instruction acquisition routine 44 to obtain one or more guest instructions 43 from the memory 38 and optionally provide local buffering for the obtained instructions. It also includes an instruction conversion routine 45 to determine the type of the guest instruction obtained and convert the guest instruction into one or more corresponding native instructions 46. The conversion includes, for example, identifying the function to be performed by the guest instruction and selecting (one or more) native instructions to perform the function.
[0140] In addition, the emulator code 42 includes an emulation control routine 47 to enable execution of native instructions. The emulation control routine 47 can cause the native CPU 37 to execute a routine of native instructions that emulates one or more previously acquired guest instructions, and at the end of that execution, return control to the instruction fetch routine to emulate the acquisition of the next guest instruction or set of guest instructions. The execution of the native instructions 46 can include loading data from the memory 38 into a register; storing data from a register back to the memory; or performing some type of arithmetic or logical operation determined by the conversion routine.
[0141] For example, each routine is implemented in software that is stored in memory and executed by the native central processing unit 37. In other examples, one or more routines or operations are implemented in firmware, hardware, software, or some combination thereof. The registers of the emulated processor can be emulated using the registers 41 of the native CPU or by using locations in memory 38. In an embodiment, the guest instructions 43, the native instructions 46, and the emulator code 42 can reside in the same memory, or can be distributed among different memory devices.
[0142] According to one or more aspects of the present invention, exemplary instructions that may be simulated are the diagnostic instructions described herein.
[0143] The computing environments described herein are merely examples of computing environments that can be used. One or more aspects of the present invention can be used with many types of environments. The computing environments provided herein are merely examples. Each computing environment can be configured to include one or more aspects of the present invention. For example, each can be configured to implement diagnostics and / or initial program loading processes and / or perform one or more other aspects of the present invention.
[0144] One or more aspects of the present invention relate to computer technology and facilitate processing within a computer, thereby improving its performance. For example, recovery processing is facilitated, improving processing within a computing environment. By using a single architected instruction to perform multiple functions of a recovery-related subcode, processing is pipelined and storage costs are reduced. This improves processing within a processor, computer system, and / or computing environment.
[0145] In one or more aspects, based on a program (e.g., a boot loader or dump program) not knowing the dump save area length for storing previously saved dump data, an instruction is issued to specify a first dump save area page range (e.g., the first page of the dump save area) to obtain a dump prefix page and extract the dump save area length. In one or more aspects, an instruction is issued to specify a storage range for recovering data from a partial / complete dump save area. As an example, the hypervisor recovers the contents of the dump save area and the associated storage key to, for example, a partitioned storage for the specified dump save area page. Based on the hypervisor being unable to recover data for a page in the specified dump save area page, an error is indicated by, for example, formatting the erroneous storage page with a specific character string in a different character format so that one of the character string formats appears in a readable format, regardless of the data format used to view the stored data.
[0146] In one or more aspects, software can retrieve the contents of some or all dump save area pages and their associated storage keys by specifying a starting dump save area page and a page count (dump save area offset and length). The restored storage key for each dump save area page ensures that the original storage protection mechanism is still applicable and visible when viewing the dump data for storage access error analysis. The visible restored dump data error string allows readers to easily identify erroneous dump data pages.
[0147] In one or more aspects, the program uses the same command used to retrieve dump data from the dump save area to find the length of the dump save area itself. The program specifies a storage range to retrieve a selected portion of the program's data area from the dump save area for later debugging purposes. The hypervisor restores the storage key (e.g., access control, extraction protection, storage protection, reference and / or change indicators of the storage key) for each dump save area page for the specified dump save area page to ensure that the original storage protection mechanism is still in effect.
[0148] In one or more aspects, the program can restore original data (original machine state) that was overwritten, for example, by a boot loader, an operating system, or a dump program, from the dump save area back to the original storage location and then terminate the initial program load using, for example, a hypervisor. Additionally, in one or more aspects, the dump program can determine the size of the dump save area and how the dump program can retrieve selected portions of the program's data area from the dump save area for debugging purposes later using the same commands.
[0149] In one or more aspects, when the initial program load of the dump program cannot be performed due to an error that is not attributed to the program, the hypervisor can terminate the initial program load on behalf of the program after restoring the contents of the dump save area and the associated storage key to the original partition storage location. In one or more aspects, for example, an instruction (for example, by a boot loader, an operating system, or a dump program) with a failed instruction address that does not enable a wait program status word is issued to the hypervisor to restore the dump save area and the associated storage key to, for example, the original partition storage location. The hypervisor restores the contents of the dump save area and the associated storage key to the partition storage. The hypervisor releases a shared dump save area (for example, to be used by other partitions). The hypervisor creates a failed instruction address that does not enable a wait program status word. The hypervisor terminates the initial program load by loading the failed instruction address that does not enable a wait program status word.
[0150] In one or more aspects, the original state of the machine is restored before the initial program load is terminated after an error is detected so that the dump can be retried, for example, via diagnostic subcode 12. This is not something the dump program itself can do in conjunction with other diagnostic operations (e.g., diagnostic '0308' subcode 11) because the restored memory will erase the dump program before the dump program can perform other steps.
[0151] For example, a program (e.g., a dump program or a boot loader) and a hypervisor work together to restore the contents of a dump save area and associated storage keys to the original partition storage location (original machine state) so that failed dump operations can be retried and to terminate initial program loading when an error not attributed to a program is detected. For example, the program provides, for example, a hypervisor with the failure instruction address of an unenabled wait program status word to restore the dump save area and associated storage keys to the original partition storage location because it cannot do so by itself. In one example, the hypervisor restores the contents of the dump save area of the associated storage keys to the original partition storage location on behalf of the program. In one example, the hypervisor creates an unenabled wait program status word using the failure instruction address provided by the program on behalf of the program. The hypervisor terminates initial program loading on behalf of the program by loading the unenabled wait program status word.
[0152] Other aspects, variations, and / or embodiments are possible.
[0153] In addition to the above, one or more aspects may be provided, proposed, deployed, managed, serviced, etc., by a service provider that provides management of a customer environment. For example, a service provider may create, maintain, support, etc., computer code and / or computer infrastructure that implements one or more aspects for one or more customers. In return, the service provider may receive payment from the customer, for example, under a subscription and / or fee agreement. Additionally or alternatively, the service provider may receive payment from the sale of advertising content to one or more third parties.
[0154] In one aspect, an application may be deployed to perform one or more embodiments. As an example, deployment of an application includes providing a computer infrastructure operable to perform one or more embodiments.
[0155] As another aspect, a computing infrastructure may be deployed that includes integrating computer readable code into a computing system, wherein the code in combination with the computing system is capable of performing one or more embodiments.
[0156] In another aspect, a process for integrating a computing infrastructure may be provided, comprising integrating computer-readable code into a computer system. The computer system includes a computer-readable medium, wherein the computer medium includes one or more embodiments. The code, combined with the computer system, is capable of executing one or more embodiments.
[0157] Although various embodiments have been described above, these are merely examples. For example, other instruction formats, operands, and / or registers may be used. Although reference is made to pages of memory or storage, one or more aspects may be applicable to other units or sizes of memory or storage. Furthermore, although a hypervisor is described herein as performing certain aspects of one or more embodiments, one or more of these aspects may be performed by one or more additional and / or other entities, components, etc. Many variations are possible.
[0158] Various aspects and embodiments are described herein. In addition, many variations are possible without departing from the spirit of the various aspects of the present invention. It should be noted that, unless otherwise inconsistent, each aspect or feature and variations thereof described and / or claimed herein may be combined with any other aspect or feature.
[0159] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprises" and / or "comprising" are used in this specification, they specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0160] If present, the corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of one or more embodiments has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the forms disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments were chosen and described in order to best explain the various aspects and practical applications, and to enable others of ordinary skill in the art to understand various embodiments with various modifications as are suited to the particular use contemplated.
Claims
1. A computer program product for facilitating processing within a computing environment, the computer program product comprising: One or more computer-readable storage media and program instructions collectively stored on the one or more computer-readable storage media, the program instructions executing a method, the method comprising: obtaining instructions to be executed within the computing environment, the instructions including an operation code indicative of a diagnostic operation; and Executing the instruction, the execution comprising: Retrieve selected data from the dump save area to be used for restoring the machine state; restoring the machine state, the restoring comprising storing the selected data in a selected location; and One or more storage keys used to protect access to the selected data are recovered.
2. The computer program product according to claim 1, wherein The selected location is a selected storage location specified using a field of the instruction.
3. The computer program product according to claim 1, wherein Obtaining the selected data includes: using one or more selected fields of the instruction to determine a range of data to be retrieved from the dump save area; and The data range is acquired from the dump storage area.
4. The computer program product according to claim 3, wherein: The one or more selected fields include one field for indicating a start page number of the dump save area and another field for specifying a count of pages to be retrieved in the dump save area.
5. The computer program product of claim 1 , wherein: The method further includes obtaining metadata of the dump saving area based on the issuance of the instruction to determine information related to the dump saving area, wherein the information is used when the instruction is further issued to specify the selected data to be retrieved from the dump saving area.
6. The computer program product of claim 1 , wherein: The method further comprises: determining that an error occurred in a portion of the selected data being restored during the restoration of the machine state; and Providing an indication of the error based on determining the error, wherein providing the indication of the error includes placing an error indication in a plurality of formats within the portion of the selected data to provide the indication of the error in a readable format regardless of a data format used to view the portion of the selected data in storage.
7. The computer program product of claim 1 , wherein: The selected location is an original storage location from which the selected data is obtained and placed into the dump save area.
8. The computer program product of claim 1, wherein: The instruction specifies, using a field of the instruction, an address of an instruction to be used as a non-enabled wait program state word to be loaded based on restoring the machine state and the one or more storage keys.
9. The computer program product of claim 1 , wherein: The method further includes releasing the dump save area to be reused.
10. The computer program product of claim 1, wherein: The instruction is issued based on an error in an initial program load of the program, and wherein the method further comprises: creating a disabled wait program status word using the failed instruction address provided by using a field of the instruction; and The initial program loading is terminated, wherein the terminating the initial program loading includes loading the disabled wait program status word.
11. The computer program product according to claim 10, wherein: The method further includes terminating a client program, the selected data being data of the client program.
12. A computer system for facilitating processing within a computing environment, the computer system comprising: Memory; as well as a processor in communication with the memory, wherein the computer system is configured to perform a method comprising: obtaining instructions to be executed within the computing environment, the instructions including an operation code indicative of a diagnostic operation; and Executing the instruction, the execution comprising: Retrieve selected data from the dump save area to be used for restoring the machine state; restoring the machine state, the restoring comprising storing the selected data in a selected location; and One or more storage keys used to protect access to the selected data are recovered.
13. The computer system according to claim 12, wherein: Obtaining the selected data includes: using one or more selected fields of the instruction to determine a range of data to be retrieved from the dump save area; and The data range is acquired from the dump storage area.
14. The computer system according to claim 12, wherein: The selected location is an original storage location from which the selected data is obtained and placed into the dump save area.
15. The computer system according to claim 12, wherein: The instruction is issued based on an error in an initial program load of the program, and wherein the method further comprises: creating a disabled wait program status word using the failed instruction address provided by using a field of the instruction; and The initial program loading is terminated, wherein the terminating the initial program loading includes loading the disabled wait program status word.
16. A computer-implemented method for facilitating processing within a computing environment, the computer-implemented method comprising: obtaining instructions to be executed within the computing environment, the instructions including an operation code indicative of a diagnostic operation; as well as Executing the instruction, the execution comprising: Retrieve selected data from the dump save area to be used for restoring the machine state; restoring the machine state, the restoring comprising storing the selected data in a selected location; and One or more storage keys used to protect access to the selected data are recovered.
17. The computer-implemented method of claim 16, wherein: The selected location is a selected storage location specified using a field of the instruction.
18. The computer-implemented method of claim 16, wherein: Obtaining the selected data includes: using one or more selected fields of the instruction to determine a range of data to be retrieved from the dump save area; and The data range is acquired from the dump storage area.
19. The computer-implemented method of claim 16, wherein: The selected location is an original storage location from which the selected data is obtained and placed into the dump save area.
20. The computer-implemented method of claim 16, wherein: The instruction is issued based on an error in an initial program load of a program, and the method further comprises: creating a disabled wait program status word using the failed instruction address provided by using a field of the instruction; and The initial program loading is terminated, wherein the terminating the initial program loading includes loading the disabled wait program status word.