7a3e29b12f
mc146818rtc: fix timer interrupt reinjection again
...
Commit 369b41359a
broke timer interrupt
reinjection when there is no period change by the guest. In that
case, old_period is 0, which ends up zeroing irq_coalesced (counter of
reinjected interrupts).
The consequence is Windows 7 is unable to synchronize time via NTP.
Easily reproducible by playing a fullscreen video with cirrus and VNC.
Fix by passing s->period when periodic_timer_update is called due to
expiration of the timer. With this change, old_period == 0 only
means that the periodic timer was off.
Reported-by: Marcelo Tosatti <mtosatti@redhat.com >
Co-developed-by: Marcelo Tosatti <mtosatti@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2019-11-19 10:02:13 +01:00
3ae32adff1
Revert "mc146818rtc: fix timer interrupt reinjection"
...
This reverts commit b429de7301
, except
that the reversal of the outer "if (period)" is left in.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2019-11-19 10:01:34 +01:00
673652a785
Merge commit 'df84f17' into HEAD
...
This merge fixes a semantic conflict with the trivial tree.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2019-10-26 15:38:02 +02:00
2330113bf5
hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
...
The "hw/ptimer.h" header is not used, remove it.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-14-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:34:12 +02:00
7ffcb73d3f
hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less
...
Only 2 source files require the "mc146818rtc_regs.h" header.
Instead of having it processed 12 times, by all objects
using "mc146818rtc.h", include it directly where used.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-13-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:33:07 +02:00
ea5dcf4e1d
hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Cédric Le Goater <clg@kaod.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-12-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:31:44 +02:00
7f0df1ccdf
hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-11-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:29:18 +02:00
8035f85ef3
hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Remove Alistair outdated email address (see commit c22e580c2a
).
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-10-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:28:01 +02:00
64e85ffde8
hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
...
The DS1338 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-9-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:26:35 +02:00
6a648a5f23
hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
...
The TWL92230 is an "energy management device" companion with
a RTC. Since we mostly model the RTC, move it under the hw/rtc/
subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-8-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:24:50 +02:00
2811ac3059
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
...
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com >
Message-Id: <20191003230404.19384-7-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:23:15 +02:00
de04c31d31
hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
...
The M41T80 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-6-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:22:12 +02:00
819ce6b2a5
hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
...
The M48T59 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-5-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:20:45 +02:00
bcdb90640a
hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
...
The MC146818 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Use copyright statement from 80cabfad16
for "hw/rtc/mc146818rtc.h".
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Acked-by: David Gibson <david@gibson.dropbear.id.au >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20191003230404.19384-4-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:13:10 +02:00
877c181cd4
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
...
The PL031 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20191003230404.19384-3-philmd@redhat.com >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2019-10-24 20:10:27 +02:00