From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36BBDC31E40 for ; Fri, 9 Aug 2019 04:01:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05E292171F for ; Fri, 9 Aug 2019 04:01:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05E292171F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvw5N-0002Q9-2w for qemu-devel@archiver.kernel.org; Fri, 09 Aug 2019 00:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52703) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvw4y-0001zm-0Y for qemu-devel@nongnu.org; Fri, 09 Aug 2019 00:00:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvw4w-0006qp-BB for qemu-devel@nongnu.org; Fri, 09 Aug 2019 00:00:35 -0400 Received: from mga18.intel.com ([134.134.136.126]:18163) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvw4w-0006kr-1D for qemu-devel@nongnu.org; Fri, 09 Aug 2019 00:00:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Aug 2019 21:00:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,364,1559545200"; d="scan'208,217";a="350383940" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 08 Aug 2019 21:00:23 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 8 Aug 2019 21:00:23 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 8 Aug 2019 21:00:23 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.204]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.112]) with mapi id 14.03.0439.000; Fri, 9 Aug 2019 12:00:21 +0800 From: "Wu, Wentong" To: "qemu-devel@nongnu.org" Thread-Topic: qemu icount mode timer accuracy Thread-Index: AdVOYV9YomMNai4qTsa2jpTa1UmfJQ== Date: Fri, 9 Aug 2019 04:00:20 +0000 Message-ID: <228A20DABA3D9846AF1B64E31C217296010E8CE3@SHSMSX106.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzY2NzVkMWUtNTZkOS00YTQ3LTk4NDEtMzVkNTE5NGY2Mzk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSk93Q1dCYmJkUmtxaU5pRkkxSnpDM0gzelVTQUw0aW9iYU1WRDdleWVTcHpHbkdkT2R0Q3ZSR0N6K1FLaU1rMCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.126 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 Subject: [Qemu-devel] qemu icount mode timer accuracy X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi, Recently I'm working to enable Qemu icount mode with TCG, with source code = review I found that Qemu can give deterministic execution for guest code ti= meout. But for exact time point for guest OS, I have a question: For armv7m_systick.c example, guest OS will use systick_read which will cal= l "t =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); " to calculate his exact ti= me point, and qemu_clock_get_ns will use qemu_icount. But from qemu_tcg_rr_= cpu_thread_fn { prepare_icount_for_run(cpu); r =3D tcg_cpu_exec(cpu); proce= ss_icount_data(cpu);}, we know qemu just update qemu_icount value after tcg= _cpu_exec, so for each tcg_cpu_exec execution there is the same qemu_icount= value, and then guest code will get the same time point for that one tcg e= xecution. Can someone confirm that? Thanks