A method for synchronizing a logical clock in a logical partition executing on a host processor having a host clock, and controlled by a hypervisor, with an external time source connected to the host processor, said logical clock having a value created by arithmetically combining said host clock with a value specific to said logical partition, said method comprising the steps, performed by said hypervisor, of:
- a) detecting a synchronization check indicating an out-of-synchronization condition between the external time source and the host clock;
- b) insulating the logical partition from host clock synchronization after said detecting of said synchronization check, said step of insulating further comprising the steps of:
- i) preventing a user dispatch within the logical partition during said host clock synchronization;
- ii) setting a control to intercept a timer facility instruction;
- iii) setting a creep mode indicator for said host clock, said creep mode indicator causing a simulation of any store clock instruction during said host clock synchronization by incrementing, by a small positive value, a last host clock value on each said store clock instruction;
- and
- iv) setting a dummy value of a clock comparator, said dummy value being chosen to prevent a clock comparator interruption from occurring during said host clock synchronization;
- c) synchronizing the host clock with the external time source;
- d) calculating a clock adjustment value for use by said hypervisor in maintaining clock consistency;
- e) applying said clock adjustment value to said value specific to said logical partition by arithmetically combining said clock adjustment value with said value specific to said logical partition;
- and
- f) setting a notification to synchronize the logical clock with the host clock and the external time source, after said synchronizing of the host clock with the external time source, if the logical partition is executing in a mode having access to the external time source.