From patchwork Fri Dec 20 19:47:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11306255 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 323B414B7 for ; Fri, 20 Dec 2019 19:49:06 +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 01FF2206D8 for ; Fri, 20 Dec 2019 19:49:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NqYsvQUh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01FF2206D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org 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 1iiOFi-0004RP-N9; Fri, 20 Dec 2019 19:47:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iiOFi-0004RK-5c for xen-devel@lists.xenproject.org; Fri, 20 Dec 2019 19:47:58 +0000 X-Inumbo-ID: 9ed05020-2361-11ea-a1e1-bc764e2007e4 Received: from mail-wr1-x443.google.com (unknown [2a00:1450:4864:20::443]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ed05020-2361-11ea-a1e1-bc764e2007e4; Fri, 20 Dec 2019 19:47:57 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id z3so10548620wru.3 for ; Fri, 20 Dec 2019 11:47:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=13PHDrJTB7auPI66dgm/9o2crqNyaQt3GE3RUWQ3f+E=; b=NqYsvQUhEOZzU60hP5vwR40x47T/p5DyPyUb04cW2sIVK2JpB04xKpzqevy2xzAEj7 jAiWSIPLS5O8o1+MWf31McCckch7niwdjshuh/iWaEijmX5n7R+VPk7ee6EhNmzk0zW9 BXFDB8TOAfw8dR1335EQl8hZDvPTHyPHBA+NVuvCbJ3Jf4qCQoYIudycRhIhCd0IOU+t NTnNKzOmmL9rdd7149ub2Uj1+ishivLAHJhJ1feAsDqV5eQKnRfG9rff+QydF2QnNymg 09jsGm2YLLKRSSH5Sq/FMGxWS9DBZ4f96D3t7UkO4WsRXQknFAZU5v6BipcKIff7AWFo Lcig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=13PHDrJTB7auPI66dgm/9o2crqNyaQt3GE3RUWQ3f+E=; b=oMejo0apIuHc0uwMxWjXBpAVbAsMmedXCujf/WYZG/PUKol/PEYAYmkI+eoXDTpBEQ mxalqUTiDxSkOxxDE7LZlMOxBEf+flc0Mf9jswNjcC2g/g8N91uzVmG0cKzdqv7KKCni AIQXFuTLDSqpsUmKnBpHeAKc8IDegA1xABYTjkoyvrwk5IU5H/MOkbo7VZXTdzCq1ydb wiPQ/Shv5xfNmzNSGxjZp7dDK/3F+H8PBKavc/3ZJIdf0J3UddoyK1Bo5i2YC3r1X95g AGxWzZfbCqDimm123hWCXCwmQDMKBVz4adEGrgK0OeFENnJp2ttsaFWB/bIsrqUUn4uV 6ctA== X-Gm-Message-State: APjAAAWHxpTZdg3919yxdHJYARTDGZmHcQXWdc1UrMWQC/0JzuFUmr4x MKIb2qrQ9vpq3tex46vVPFf4QG+l X-Google-Smtp-Source: APXvYqz2bvp7NBVxpi9coTGElBUjczAjimBKhciw52lwHygak9J5YJuWDhNfLP/uCnKMN2oAttlqiQ== X-Received: by 2002:a5d:6406:: with SMTP id z6mr15926905wru.294.1576871276710; Fri, 20 Dec 2019 11:47:56 -0800 (PST) Received: from debian.mshome.net (38.163.200.146.dyn.plus.net. [146.200.163.38]) by smtp.gmail.com with ESMTPSA id o7sm10353486wmh.11.2019.12.20.11.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 11:47:56 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Fri, 20 Dec 2019 19:47:49 +0000 Message-Id: <20191220194749.19692-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86: Hyper-V clock source's offset should be signed 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: Wei Liu , Wei Liu , Andrew Cooper , Paul Durrant , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Fixes: 685d16bd5 (x86: implement Hyper-V clock source) Signed-off-by: Wei Liu --- I discover this stupid mistake when I work on extracting common code from viridian and the clock source implementation. --- xen/arch/x86/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index a3c9b927e8..bbcc9b10b8 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -698,7 +698,8 @@ static int64_t __init init_hyperv_timer(struct platform_timesource *pts) static inline uint64_t read_hyperv_timer(void) { - uint64_t scale, offset, ret, tsc; + uint64_t scale, ret, tsc; + int64_t offset; uint32_t seq; const struct ms_hyperv_tsc_page *tsc_page = hyperv_tsc;