How does CP handle the IPL of a Guest OS

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
Hello Team,
 Can you one point me to the relevant CP module or documentation on how CP handles the IPL of a Guest Operating System. I assume that CP issues a read CCW and then intercepts/interrogates the results. Also how any bootstrap, al MVS 3.8,  and additional IPL text would need to be understood.
 

 Regards,
 Martin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list


On 1/11/2017 5:07 PM, [hidden email] [H390-VM] wrote:

>
>
> Hello Team,
>
> Can you one point me to the relevant CP module or documentation on how
> CP handles the IPL of a Guest Operating System. I assume that CP
> issues a read CCW and then intercepts/interrogates the results. Also
> how any bootstrap, al MVS 3.8,  and additional IPL text would need to
> be understood.
>
>
Martin,

For virtual device IPLs :

Essentially CP will map a very specific module (DMKVMI) onto the virtual
machine virtual address space and load a virtual PSW to branch unto it.
DMKVMI will  then initiate a 24 byte Read IPL CCW I/O with command
chaining set directly from the virtual machine to the target device.
Once the I/O part of the IPL process is complete (with CE+DE), DMKVMI  
will issue a DIAG 40 instruction to indicate to CP to load the PSW
loaded at 0 and then unmap the module. The rest of the IPL process is
managed by whatever was loaded by the initial IPL CCWs and whatever
process applies to the loaded program - and is not directly managed by
the architecture IPL process.

For a shared segment IPL saved via SAVESYS :

The pages from the DASD areas described in DMKSNT are directly loaded
into the virtual machine address space and the initial registers and PSW
are loaded from the extra page also described in DMKSNT.

--Ivan

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
In reply to this post by Hercules390 - Vm mailing list
On 11 January 2017 at 11:07, [hidden email] [H390-VM] <
[hidden email]> wrote:

> Can you one point me to the relevant CP module or documentation on how CP
> handles the IPL of a Guest Operating System. I assume that CP issues a read
> CCW and then intercepts/interrogates the results. Also how any bootstrap,
> al MVS 3.8,  and additional IPL text would need to be understood.


It's a combination of what I think is the only CP module that runs in a
virtual machine, and a magic Diagnose.

There is a good but brief description of this (among many other things) in
the VM course materials at
http://www.bitsavers.org/pdf/ibm/370/Adesse_VM_Course_May85.pdf in Chapter
22 (page 369).

This book (and I believe Ivan's post) are describing VM/SP, but it's not
significantly different in VM/370. For that matter it's not conceptually
different in modern zVM, but the details are necessarily almost all changed.

Tony H.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list


On 1/11/2017 6:31 PM, Tony Harminc [hidden email] [H390-VM] wrote:
>
> It's a combination of what I think is the only CP module that runs in
> a virtual machine, and a magic Diagnose.
>
>
Actually, (and for the sake of completeness - and to show off!) there
are few other modules which are part of CP (or at least maintained as
part of CP) that run in a virtual machine (or standalone) :

DMKDDR (DDR)
DMKFMT (CPFMT)
DMKBSL (3CARD LOADER)
DMKDIR (DIRECT)

(But unlike DMKVMI, they are not loaded by CP directly in a virtual
machine, but are either standalone or are CMS modules).

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list


On 1/11/2017 6:44 PM, Ivan Warren [hidden email] [H390-VM] wrote:

>
>
>
> On 1/11/2017 6:31 PM, Tony Harminc [hidden email] [H390-VM] wrote:
>>
>> It's a combination of what I think is the only CP module that runs in
>> a virtual machine, and a magic Diagnose.
>>
>>
> Actually, (and for the sake of completeness - and to show off!) there
> are few other modules which are part of CP (or at least maintained as
> part of CP) that run in a virtual machine (or standalone) :
>
> DMKDDR (DDR)
> DMKFMT (CPFMT)
> DMKBSL (3CARD LOADER)
> DMKDIR (DIRECT)
>
> (But unlike DMKVMI, they are not loaded by CP directly in a virtual
> machine, but are either standalone or are CMS modules).
And of course...

CP as a whole (if you run CP second level !)

--Ivan


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
In reply to this post by Hercules390 - Vm mailing list
On 11 January 2017 at 12:44, Ivan Warren [hidden email] [H390-VM]
<[hidden email]> wrote:

> It's a combination of what I think is the only CP module that runs in a
> virtual machine, and a magic Diagnose.
>
> Actually, (and for the sake of completeness - and to show off!) there are
> few other modules which are part of CP (or at least maintained as part of
> CP) that run in a virtual machine (or standalone) :
>
> DMKDDR (DDR)
> DMKFMT (CPFMT)
> DMKBSL (3CARD LOADER)
> DMKDIR (DIRECT)
>
> (But unlike DMKVMI, they are not loaded by CP directly in a virtual machine,
> but are either standalone or are CMS modules).

Yeah, as soon as I wrote that I thought of the CP utilities. But as
you say, they are not run *by* CP on its own initiative.

> And of course...
> CP as a whole (if you run CP second level !)

:-)

Tony H.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
In reply to this post by Hercules390 - Vm mailing list
Hello Tony,
Thanks for the information, it appears that this function has more to it than meets the eye. I will have a look at the VM internals course.

Thanks again.

Regards,
Martin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
In reply to this post by Hercules390 - Vm mailing list
Hello Tony,
I have now looked at the Adesse Course and as you say it is all explained, spookily on page 370.  It is DMKVMI in virtual mode that does the work with a little DIAG help :-)

Thanks again for the pointer.

Regards,
Martin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
In reply to this post by Hercules390 - Vm mailing list

> It's a combination of what I think is the only CP module that runs in
> a virtual machine, and a magic Diagnose.
>
>
I was still always wondering about one thing :

 From within the virtual machine, DMKVMI issues a SIO with the CAW set
to 0 which points to a CCW formed as such : X'0200000060000018' (Read
IPL, Address 0, SILI+CC, length 24).

Note that this creates 2 problems : The CCW is not only a self modyfing
CCW chain, but it also overwrites itself (so DMKCCW can't really predict
what will happen next.) Chances are that during the IPL process in a
virtual machine, CP will first initiate the I/O to a complete different
location (than the virtual machine's PSA) then issue the I/O on behalf
of the virtual machine. But the whole CCW chain could be way more
complex (basically if the 2nd CCW is a TIC). Or the CCW is modified to
include a PCI + SUSPEND - and then resumed when everything is resolved.

This is probably resolved the same way as when you issue a 'CP SET ISAM
ON' (ISAM makes extensive use of self modifying CCWs)

That's one of the BIG caveats of the IBM S/370, XA and z mainframe
architecture : the utter lack of a complete I/O MMU (that is DAT for
I/O).... Of course there is IDAW & MIDAW... but these still require CCW
doctoring.

--Ivan

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
It is called the IPL simulator because it does one CCW at a time for the
reasons you mention.

On 18/01/17 18:56, Ivan Warren [hidden email] [H390-VM] wrote:

>
>> It's a combination of what I think is the only CP module that runs in
>> a virtual machine, and a magic Diagnose.
>>
>>
> I was still always wondering about one thing :
>
> From within the virtual machine, DMKVMI issues a SIO with the CAW set to
> 0 which points to a CCW formed as such : X'0200000060000018' (Read IPL,
> Address 0, SILI+CC, length 24).
>
> Note that this creates 2 problems : The CCW is not only a self modyfing
> CCW chain, but it also overwrites itself (so DMKCCW can't really predict
> what will happen next.) Chances are that during the IPL process in a
> virtual machine, CP will first initiate the I/O to a complete different
> location (than the virtual machine's PSA) then issue the I/O on behalf
> of the virtual machine. But the whole CCW chain could be way more
> complex (basically if the 2nd CCW is a TIC). Or the CCW is modified to
> include a PCI + SUSPEND - and then resumed when everything is resolved.
>
> This is probably resolved the same way as when you issue a 'CP SET ISAM
> ON' (ISAM makes extensive use of self modifying CCWs)
>
> That's one of the BIG caveats of the IBM S/370, XA and z mainframe
> architecture : the utter lack of a complete I/O MMU (that is DAT for
> I/O).... Of course there is IDAW & MIDAW... but these still require CCW
> doctoring.
>
> --Ivan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list


On 1/18/2017 8:52 PM, 'John P. Hartmann' [hidden email] [H390-VM]
wrote:
> It is called the IPL simulator because it does one CCW at a time for the
> reasons you mention.
>
You can't !

If you do so, some DASD CCWs are going to break because they are not
chained properly.

--Ivan


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list
Sure, but I can do the initial CCW and then start a second I/O at
location 8.  It also needs to get the initial PSW out of the way.
Remember why OS/360 starter system release 6 could not IPL on a model 30
without an EC?


On 18/01/17 19:55, Ivan Warren [hidden email] [H390-VM] wrote:

>
>
> On 1/18/2017 8:52 PM, 'John P. Hartmann' [hidden email] [H390-VM]
> wrote:
>> It is called the IPL simulator because it does one CCW at a time for the
>> reasons you mention.
>>
> You can't !
>
> If you do so, some DASD CCWs are going to break because they are not
> chained properly.
>
> --Ivan
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How does CP handle the IPL of a Guest OS

Hercules390 - Vm mailing list


On 1/18/2017 9:00 PM, 'John P. Hartmann' [hidden email] [H390-VM]
wrote:
> Sure, but I can do the initial CCW and then start a second I/O at
> location 8.  It also needs to get the initial PSW out of the way.
> Remember why OS/360 starter system release 6 could not IPL on a model 30
> without an EC?
>
The issue I see is that :

Some DASD CCWs require that some CCW condition be set by the Read Ipl
CCW.. Of course, CP *May* insert some "Define Extent" or "Set File
Mask"  CCWs or even alter the content of Seeks or Locate record
parameters.... But some CCWs require that the IPL Read CCW be issued first.

--Ivan


smime.p7s (4K) Download Attachment
Loading...