From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: qemu-devel@nongnu.org
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
Anthony Perard <anthony.perard@citrix.com>,
Ross Lagerwall <ross.lagerwall@citrix.com>
Subject: [Qemu-devel] [PATCH v2] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq
Date: Wed, 23 Aug 2017 14:25:05 +0100 [thread overview]
Message-ID: <20170823132505.1505-1-ross.lagerwall@citrix.com> (raw)
When the guest writes to the RTC, Xen emulates it and broadcasts a
TIMEOFFSET ioreq. Emit an RTC_CHANGE QMP event to all QMP monitors when
this happens rather than ignoring it so that something useful can be
done with the information. This is the same event that QEMU generates
when it emulates the RTC.
This patch by itself doesn't affect any of the toolstacks that I
checked; the libxl toolstack doesn't currently handle this event nor
does the XAPI toolstack. If nothing handles the event, it is simply
ignored. We plan on modifying XAPI to handle it.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
Changed in v2:
* Expanded commit message.
hw/i386/xen/xen-hvm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index d9ccd5d..ffd20dc 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -16,6 +16,7 @@
#include "hw/i386/apic-msidef.h"
#include "hw/xen/xen_common.h"
#include "hw/xen/xen_backend.h"
+#include "qapi-event.h"
#include "qmp-commands.h"
#include "qemu/error-report.h"
@@ -967,6 +968,7 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req)
handle_vmport_ioreq(state, req);
break;
case IOREQ_TYPE_TIMEOFFSET:
+ qapi_event_send_rtc_change((int64_t)req->data, &error_abort);
break;
case IOREQ_TYPE_INVALIDATE:
xen_invalidate_map_cache();
--
2.9.5
next reply other threads:[~2017-08-23 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 13:25 Ross Lagerwall [this message]
2017-08-25 17:27 ` [Qemu-devel] [PATCH v2] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq Stefano Stabellini
2017-09-06 14:43 ` Anthony PERARD
2017-09-20 17:18 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823132505.1505-1-ross.lagerwall@citrix.com \
--to=ross.lagerwall@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).