diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-29 18:09:51 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-29 18:09:51 +0100 |
| commit | 9328cfd2fe4a7ff86a41b2c26ea33974241d7d4e (patch) | |
| tree | 3f877873730540d63eb0cf5901aedefaffa4f238 /hw/timer | |
| parent | 4f9c5be9191fb08d16023fb6fde1f1d802ce4b44 (diff) | |
| parent | b4900c0e8a606bed834bd610fbae0fdf1d697ff9 (diff) | |
| download | focaccia-qemu-9328cfd2fe4a7ff86a41b2c26ea33974241d7d4e.tar.gz focaccia-qemu-9328cfd2fe4a7ff86a41b2c26ea33974241d7d4e.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,vhost,virtio fixes, enhancements virtio bi-endian support new command to resync RTC misc bugfixes and cleanups Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 29 Jun 2014 17:41:13 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (37 commits) tests: add human format test for string output visitor vhost-net: disable when cross-endian target-ppc: enable virtio endian ambivalent support virtio-9p: use virtio wrappers to access headers virtio-serial-bus: use virtio wrappers to access headers virtio-scsi: use virtio wrappers to access headers virtio-blk: use virtio wrappers to access headers virtio-balloon: use virtio wrappers to access page frame numbers virtio-net: use virtio wrappers to access headers virtio: allow byte swapping for vring virtio: memory accessors for endian-ambivalent targets virtio: add endian-ambivalent support to VirtIODevice cpu: introduce CPUClass::virtio_is_big_endian() exec: introduce target_words_bigendian() helper virtio: add subsections to the migration stream virtio-rng: implement per-device migration calls virtio-balloon: implement per-device migration calls virtio-serial: implement per-device migration calls virtio-blk: implement per-device migration calls virtio-net: implement per-device migration calls ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer')
| -rw-r--r-- | hw/timer/mc146818rtc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index 05002bf9d6..307732c744 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -27,6 +27,7 @@ #include "hw/timer/mc146818rtc.h" #include "qapi/visitor.h" #include "qapi-event.h" +#include "qmp-commands.h" #ifdef TARGET_I386 #include "hw/i386/apic.h" @@ -85,6 +86,7 @@ typedef struct RTCState { Notifier clock_reset_notifier; LostTickPolicy lost_tick_policy; Notifier suspend_notifier; + QLIST_ENTRY(RTCState) link; } RTCState; static void rtc_set_time(RTCState *s); @@ -523,6 +525,20 @@ static void rtc_get_time(RTCState *s, struct tm *tm) rtc_from_bcd(s, s->cmos_data[RTC_CENTURY]) * 100 - 1900; } +static QLIST_HEAD(, RTCState) rtc_devices = + QLIST_HEAD_INITIALIZER(rtc_devices); + +#ifdef TARGET_I386 +void qmp_rtc_reset_reinjection(Error **errp) +{ + RTCState *s; + + QLIST_FOREACH(s, &rtc_devices, link) { + s->irq_coalesced = 0; + } +} +#endif + static void rtc_set_time(RTCState *s) { struct tm tm; @@ -911,6 +927,8 @@ ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) } else { isa_init_irq(isadev, &s->irq, RTC_ISA_IRQ); } + QLIST_INSERT_HEAD(&rtc_devices, s, link); + return isadev; } |