From patchwork Tue Jan 21 15:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kubascik X-Patchwork-Id: 11344093 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE4561398 for ; Tue, 21 Jan 2020 15:08:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 B4F3E21569 for ; Tue, 21 Jan 2020 15:08:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4F3E21569 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dornerworks.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itv7h-0006Fh-NA; Tue, 21 Jan 2020 15:07:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1itv7f-0006Fc-V8 for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 15:07:19 +0000 X-Inumbo-ID: b2b9be53-3c5f-11ea-bacb-12813bfff9fa Received: from webmail.dornerworks.com (unknown [12.207.209.150]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b2b9be53-3c5f-11ea-bacb-12813bfff9fa; Tue, 21 Jan 2020 15:07:12 +0000 (UTC) From: Jeff Kubascik To: Date: Tue, 21 Jan 2020 10:07:02 -0500 Message-ID: <20200121150704.126001-1-jeff.kubascik@dornerworks.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [172.27.13.179] X-ClientProxiedBy: Mcbain.dw.local (172.27.1.45) To Mcbain.dw.local (172.27.1.45) X-spam-status: No, score=-2.9 required=3.5 tests=ALL_TRUSTED, BAYES_00, MAILSHELL_SCORE_0_4 X-Spam-Flag: NO Subject: [Xen-devel] [PATCH v4 0/2] xen/arm: physical timer improvements X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stewart Hildebrand , Volodymyr Babchuk , Stefano Stabellini , Julien Grall Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This patch set improves the emulation of the physical timer by removing the physical timer offset and sign extend the TimerValue to better match the behavior described in the ARMv8 Reference Manual (ARM DDI 0487E.a), section D11.2.4. Changes in v2: - Update commit message to specify reference manual version and section - Change physical timer cval to hold hardware value - Make sure to sign extend TimerValue on writes. This was done by first casting the r pointer to (int32_t *), dereferencing it, then casting to uint64_t. Please let me know if there is a more correct way to do this Changes in v3: - Split TimerValue sign extension fix into separate patch - Update commit message to mention physical timer cleanup - Removed physical timer cval initialization line - Changed TimerValue sign extension to (uint64_t)(int32_t)*r - Account for condition where cval < boot_count Changes in v4: - Improved commit message for patch #2, as suggested/provided by Julien Jeff Kubascik (2): xen/arm: remove physical timer offset xen/arm: Sign extend TimerValue when computing the CompareValue xen/arch/arm/vtimer.c | 34 ++++++++++++++++++---------------- xen/include/asm-arm/domain.h | 3 --- 2 files changed, 18 insertions(+), 19 deletions(-)