From patchwork Mon Aug 21 14:01:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9912607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F203602D8 for ; Mon, 21 Aug 2017 14:05:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A6EC28684 for ; Mon, 21 Aug 2017 14:05:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CDFE286F6; Mon, 21 Aug 2017 14:05:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 785A228684 for ; Mon, 21 Aug 2017 14:05:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djnHi-0006IR-39; Mon, 21 Aug 2017 14:02:30 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djnHh-0006IL-68 for xen-devel@lists.xenproject.org; Mon, 21 Aug 2017 14:02:29 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 63/A2-09901-4F7EA995; Mon, 21 Aug 2017 14:02:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRWlGSWpSXmKPExsXitHRDpO6X57M iDbav47T4vmUykwOjx+EPV1gCGKNYM/OS8isSWDOuLPnGUrCQo+LlrX+sDYx32boYOTkkBPwl Gib/YQex2QQMJG5d+s4MYosISEv0z2kHinNxMAusZpS4/noBE0hCWMBaovfoAaAiDg4WAVWJx oUGIGFeATuJRb/ns0DMlJPYc3EG2EwhATWJt8vPsEDUCEqcnPkEzGYWkJA4+OIF8wRG7llIUr OQpBYwMq1i1ChOLSpLLdI1MtFLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMBgY g2MG472PkIUZJDiYlUd4NqbMihfiS8lMqMxKLM+KLSnNSiw8xynBwKEnwnn0GlBMsSk1PrUjL zAGGJUxagoNHSYT3Ckiat7ggMbc4Mx0idYpRUUqcdwtIQgAkkVGaB9cGi4VLjLJSwryMQIcI8 RSkFuVmlqDKv2IU52BUEubtBJnCk5lXAjf9FdBiJqDFhq3TQBaXJCKkpBoY58isVr2bcGbvwp sKzP5yKg9rkoUUzy2btWHeTrne5JsX+Rddua7kXB6zJF1DNNRb9lqWEe+Eymuf5kZsVLX5o1/ /64xhcsMuiyn3v9w4a7rdx8/hwj3efOMiz9I4tjCvB4etm2WWazwNnDLdVNlMaNXm7N5FPKZv +BYrvrNjDpRJf/T76rR2JZbijERDLeai4kQANISczYACAAA= X-Env-Sender: prvs=399efa679=ross.lagerwall@citrix.com X-Msg-Ref: server-7.tower-27.messagelabs.com!1503324146!108145623!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27313 invoked from network); 21 Aug 2017 14:02:27 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 21 Aug 2017 14:02:27 -0000 X-IronPort-AV: E=Sophos;i="5.41,409,1498521600"; d="scan'208";a="436241393" From: Ross Lagerwall To: Date: Mon, 21 Aug 2017 15:01:38 +0100 Message-ID: <20170821140138.27421-1-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.9.5 MIME-Version: 1.0 Cc: Anthony Perard , xen-devel@lists.xenproject.org, Stefano Stabellini , Ross Lagerwall Subject: [Xen-devel] [PATCH] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When the guest writes to the RTC, Xen emulates it and broadcasts a TIMEOFFSET ioreq. Emit an RTC_CHANGE QMP message when this happens rather than ignoring it so that something useful can be done with the information. Signed-off-by: Ross Lagerwall --- 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();