qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch 2/3] mc146818rtc: add rtc_reset_reinjection QMP


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [patch 2/3] mc146818rtc: add rtc_reset_reinjection QMP command
Date: Sat, 31 May 2014 00:01:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 30/05/2014 22:11, address@hidden ha scritto:
+
+static QLIST_HEAD(, RTCState) rtc_devices =
+    QLIST_HEAD_INITIALIZER(rtc_devices);
+
+void qmp_rtc_reset_reinjection(Error **errp)
+{
+    RTCState *s;
+
+    QLIST_FOREACH(s, &rtc_devices, link) {
+        s->irq_coalesced = 0;
+    }
+}
+
 static void rtc_set_time(RTCState *s)
 {
     struct tm tm;
@@ -911,6 +926,8 @@ ISADevice *rtc_init(ISABus *bus, int bas
     } else {
         isa_init_irq(isadev, &s->irq, RTC_ISA_IRQ);
     }
+    QLIST_INSERT_HEAD(&rtc_devices, s, link);
+
     return isadev;
 }

Index: qemu/qapi-schema.json
===================================================================
--- qemu.orig/qapi-schema.json
+++ qemu/qapi-schema.json
@@ -4722,3 +4722,15 @@
               'btn'     : 'InputBtnEvent',
               'rel'     : 'InputMoveEvent',
               'abs'     : 'InputMoveEvent' } }
+
+##
+# @: rtc-reset-reinjection
+#
+# This command will reset RTC's interrupt reinjection backlog.
+# Can be used if another mechanism to synchronize guest time
+# is in effect, for example QEMU guest agents guest-set-time
+# command.
+#
+# Since: 2.1
+##
+{ 'command': 'rtc-reset-reinjection' }

Coalesced interrupts are only supported on x86, so you do not really need CONFIG_MC146818RTC.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]