Alex Horn 02c6ccc6dd rtc: Only call rtc_set_cmos when Register B SET flag is disabled.
This bug occurs when the SET flag of Register B is enabled. When an RTC
data register (i.e. any of the ten time/calender CMOS bytes) is set, the
data is (as expected) correctly stored in the cmos_data array. However,
since the SET flag is enabled, the function rtc_set_time is not invoked.
As a result, the field base_rtc in RTCState remains uninitialized. This
causes a problem on subsequent writes which can end up overwriting data.
To see this, consider writing data to Register A after having written
data to any of the RTC data registers; the following figure illustrates
the call stack for the Register A write operation:

 +- cmos_io_port_write
 +-- check_update_timer
 +---- get_next_alarm
 +------ rtc_update_time

In rtc_update_time, get_guest_rtc calculates the wrong time and
overwrites the previously written RTC data register values.

Signed-off-by: Alex Horn <alex.horn@cs.ox.ac.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-27 11:04:33 -06:00
..
2012-10-29 19:41:56 +01:00
2012-10-23 08:58:25 -05:00
2012-11-01 19:49:45 +01:00
2012-11-01 19:49:45 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:10 +00:00
2012-10-30 07:45:10 +00:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-14 18:19:22 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-26 14:25:42 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-26 09:35:35 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 16:38:26 +10:00
2012-11-10 13:49:20 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-12 16:42:56 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 17:59:06 +02:00
2012-10-29 17:59:06 +02:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-11-10 13:49:20 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-11-26 09:35:35 -06:00
2012-11-26 09:35:35 -06:00
2012-10-23 08:58:25 -05:00
2012-11-26 09:35:37 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-26 13:41:00 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:11 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:08 +00:00
2012-10-30 07:45:09 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 11:45:54 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 11:45:54 +01:00
2012-10-23 08:58:25 -05:00
2012-11-26 13:41:00 -06:00
2012-11-05 11:54:49 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 19:41:56 +01:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:12 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-11-26 09:35:36 -06:00
2012-10-23 08:58:25 -05:00
2012-10-31 01:02:46 +01:00
2012-11-01 13:10:06 +01:00
2012-11-01 13:10:06 +01:00
2012-11-10 13:49:20 +00:00
2012-10-31 01:02:45 +01:00
2012-11-10 13:49:20 +00:00
2012-10-31 01:02:45 +01:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-16 11:27:07 +01:00
2012-11-16 11:27:06 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 15:17:57 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00