On Sat, 30 Jul 2011 02:47:59 -0400 (EDT), Rob van der Heij wrote:
> On Sat, Jul 30, 2011 at 4:48 AM, Stephen Powell <zlinux...@wowway.com> wrote:
>>
>> Theoretically, it should be possible to do this with an assembler
>> program which uses the SCK (SET CLOCK) instruction, in conjunction
>> with the CP EXIT facility.  However, I have no idea what effect this
>> will have on CP.  The design of CP assumes that the TOD clock does
>> not change between IPL and SHUTDOWN; and if it does change, strange
>> things may happen.  Those who know the internals of CP may choose
>> to elaborate on what things might happen as a result.
> 
> A virtual machine that issues the SCK instruction will cause CP to
> update the TOD offset in the VMDBK for that virtual machine, provided
> it is allowed to do so with the VTOD directory option. The offset is
> applied by SIE on each STCK instruction that the virtual machine
> issues afterwards.

That's true.  But a dynamically-defined CP command, defined via the
CP exit facility, does not execute in a virtual machine.  It executes
as CP code.  And it will change the TOD clock for the LPAR that CP is
running on.  I'm not recommending it.  I'm simply saying that it is
possible.  I may write such an exit just for fun and try it out in a
2nd-level test system just to see how CP reacts to an unexpected TOD clock
discontinuity.  I suspect that adjustments forward in time may be
tolerated better than adjustments backward in time.  CP may freak out,
for example, if a process appears to have ended before it started.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-

Reply via email to