Hide Forgot
Now upstream: commit 654a36d857ff949e0d1989904b76f53fded9dc83 Author: Marcelo Tosatti <mtosatti@redhat.com> Date: Wed Jun 4 14:52:03 2014 -0300 mc146818rtc: add "rtc-time" link to "/machine/rtc" Add a link to rtc under /machine providing a stable location for management apps to query the value of the time. The link should be added by any object that sends RTC_TIME_CHANGE events. {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } Suggested by Paolo Bonzini and Andreas Faerber. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Assigning back to Marcelo so that he takes care of the bug during QE.
QEMU commit 654a36d857ff949e0d1989904b76f53fded9dc83 part of QEMU 2.1.0, marking as MODIFIED.
(In reply to Marcelo Tosatti from comment #3) > QEMU commit 654a36d857ff949e0d1989904b76f53fded9dc83 part of QEMU 2.1.0, > marking as MODIFIED. Update this bz to qemu-kvm-rhev component since this bz is fixed qemu2.1. Free to correct me if there is wrong. Best Regards, Junyi
Verify this issue with the instruction of comment #8 on qemu-kvm-rhev-2.1.2-1.el7.x86_64. host info: # uname -r && rpm -q qemu-kvm-rhev && rpm -q seabios 3.10.0-171.el7.x86_64 qemu-kvm-rhev-2.1.2-1.el7.x86_64 seabios-1.7.5-5.el7.x86_64 guest info: 3.10.0-171.el7.x86_64 Steps: 1) Start guest via qemu command line. e.g:/usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection...-rtc base=localtime,clock=host,driftfix=slew... 2) Execute the following QMP commands: { "execute": "qmp_capabilities" } {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } 3) Save the output of "qom-get" command. {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } {"return": {"tm_year": 114, "tm_sec": 46, "tm_hour": 2, "tm_min": 53, "tm_mon": 9, "tm_mday": 8}} 4) Read RTC date inside the guest. # hwclock Wed 08 Oct 2014 10:53:59 AM CST -10.010463 seconds 5) Adjust RTC date inside the guest with "hwclock" command (--set --data XXXX i believe) to current RTC value minus one hour. # hwclock --set --date "2014-10-08 11:53:59" 6) Execute the same "qom-get" command as in step 2. {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } {"return": {"tm_year": 114, "tm_sec": 16, "tm_hour": 3, "tm_min": 54, "tm_mon": 9, "tm_mday": 8}} Results: The difference between the values of "qom-get" in step 3 and step 6 is differ by approximately 1 hour. {"return": {"tm_year": 114, "tm_sec": 46, "tm_hour": 2, "tm_min": 53, "tm_mon": 9, "tm_mday": 8}} ^^^^^ {"return": {"tm_year": 114, "tm_sec": 16, "tm_hour": 3, "tm_min": 54, "tm_mon": 9, "tm_mday": 8}} ^^^^^ Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake, thanks. Best Regards, sluo
(In reply to Sibiao Luo from comment #9) > Verify this issue with the instruction of comment #8 on > qemu-kvm-rhev-2.1.2-1.el7.x86_64. > host info: > # uname -r && rpm -q qemu-kvm-rhev && rpm -q seabios > 3.10.0-171.el7.x86_64 > qemu-kvm-rhev-2.1.2-1.el7.x86_64 > seabios-1.7.5-5.el7.x86_64 > guest info: > 3.10.0-171.el7.x86_64 > > Steps: > 1) Start guest via qemu command line. > e.g:/usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 4096 -smp > 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection...-rtc > base=localtime,clock=host,driftfix=slew... > 2) Execute the following QMP commands: > { "execute": "qmp_capabilities" } > {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } > > 3) Save the output of "qom-get" command. > {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } > {"return": {"tm_year": 114, "tm_sec": 46, "tm_hour": 2, "tm_min": 53, > "tm_mon": 9, "tm_mday": 8}} > > 4) Read RTC date inside the guest. > # hwclock > Wed 08 Oct 2014 10:53:59 AM CST -10.010463 seconds > > 5) Adjust RTC date inside the guest with "hwclock" command (--set --data > XXXX i believe) to current RTC value minus one hour. > # hwclock --set --date "2014-10-08 11:53:59" > I can get the RTC_CHANGE event after this steps. {"timestamp": {"seconds": 1412736957, "microseconds": 817109}, "event": "RTC_CHANGE", "data": {"offset": -25308}} > 6) Execute the same "qom-get" command as in step 2. > {"execute":"qom-get","arguments":{"path":"/machine","property":"rtc-time"} } > {"return": {"tm_year": 114, "tm_sec": 16, "tm_hour": 3, "tm_min": 54, > "tm_mon": 9, "tm_mday": 8}} > > Results: > The difference between the values of "qom-get" in step 3 and step 6 is > differ by approximately 1 hour. > {"return": {"tm_year": 114, "tm_sec": 46, "tm_hour": 2, "tm_min": 53, > "tm_mon": 9, "tm_mday": 8}} ^^^^^ > > {"return": {"tm_year": 114, "tm_sec": 16, "tm_hour": 3, "tm_min": 54, > "tm_mon": 9, "tm_mday": 8}} ^^^^^ > > Base on above, this issue has been fixed correctly, move to VERIFIED status, > please correct me if any mistake, thanks. > > Best Regards, > sluo
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0624.html