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: 9912603 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 84FB2602D8 for ; Mon, 21 Aug 2017 14:03:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8413228628 for ; Mon, 21 Aug 2017 14:03:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7871028630; Mon, 21 Aug 2017 14:03:38 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12A7628628 for ; Mon, 21 Aug 2017 14:03:38 +0000 (UTC) Received: from localhost ([::1]:47654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djnIn-0006F8-AR for patchwork-qemu-devel@patchwork.kernel.org; Mon, 21 Aug 2017 10:03:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djnHl-0006AV-VJ for qemu-devel@nongnu.org; Mon, 21 Aug 2017 10:02:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djnHh-00063z-24 for qemu-devel@nongnu.org; Mon, 21 Aug 2017 10:02:33 -0400 Received: from smtp.citrix.com ([66.165.176.89]:18074) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1djnHg-00062r-Sj for qemu-devel@nongnu.org; Mon, 21 Aug 2017 10:02:28 -0400 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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Subject: [Qemu-devel] [PATCH] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anthony Perard , xen-devel@lists.xenproject.org, Stefano Stabellini , Ross Lagerwall Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-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();