Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp634351pxb; Thu, 5 Nov 2020 09:02:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8kKP+zBrpvqGUJfiZuXR6w8LygSztbhEFkIY+pHmV49OXmd9+GOYNTXcTnx8DelALoipB X-Received: by 2002:a17:906:9457:: with SMTP id z23mr3094274ejx.296.1604595740243; Thu, 05 Nov 2020 09:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604595740; cv=none; d=google.com; s=arc-20160816; b=wo4RP8bSr1YftgCZLWnuOgsQ6PW0PxwXSm91mGC18wTKsUwGn+GIOokO/2JseuTmXx qt2plcS1zWGnEoguQESPpE0kurK7SBMtyzqlBfmIiDFiTeffLDh/auGyfrTZRehLy8BM WAaiojVj33gj8DgELLtBKLvJsiAyjG6zmMbBjTm6DEPFqcnUovWoQ1SnrHQ1wDFJa14/ qxIUtDeA/pTmptvmC2fXItKd7vpWy3P/IXeMp9sDIpvbqZPMQGwY8e5tPV/wyfd3LE1s nU3jyzt2yfebse/f2L34Eafv3SHsM4sKdU9HJ52Q2diPqrevxnQjCZnSVWWxOlpZZ+kd Di1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W4IasveCaJ+y+23uuqqTJDxprJLeTqvGVHfo3rkumMU=; b=eP684k9F6hohd5bH4LUI+rFaEwR4AlhmsZe6Hqp4XiIDJcRcL6DB5tIYjlzx7MrewF USVIW/86WZgS9yeigt6VWBR6f8/1EM249g4WBHcgfGA+LlQ6g5ORIuTuBEF365oU5i/W XhZBB5tafpKLkFLOnwmWMKT7J0UnAknaJy1X3aYCSNCWIoS6bv73CAzePkuH2PFwaqBp J9b6j2t2NsQJvEHI8MfAh2utTuUDnZqQWif6Kr3xedmknGGzPkFxbw7YuvWTt2eoWeAj StXGD4W/RZkgEc5Fcn1bot86aHPRVfwIHUueJffPCYs6OOGzTTZJWho/4pXhvFRS992N 50tA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si1391261ejc.514.2020.11.05.09.01.55; Thu, 05 Nov 2020 09:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731799AbgKEQ72 (ORCPT + 99 others); Thu, 5 Nov 2020 11:59:28 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45974 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731579AbgKEQ6Y (ORCPT ); Thu, 5 Nov 2020 11:58:24 -0500 Received: by mail-wr1-f66.google.com with SMTP id p1so2576170wrf.12; Thu, 05 Nov 2020 08:58:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W4IasveCaJ+y+23uuqqTJDxprJLeTqvGVHfo3rkumMU=; b=kyH92wUaud5clfdd7ZCNECm42Q4HuG+Zt8KNZaizCnTf3cp2sgzxAy5glwO22FZojw 6wOnnM+M3PzV+T4dK8oiNhOVSeRKkxjWg14byp0fRBWx+xVc8VDQ/+e8oM68Vyp6wszX UQ//ejhujOeV2qYjdtf81O+f42VNpWoCpJb6VfATGVl2uOivoi//SMCO9Kvmc51IkV/O 01vsFH/xMS9QE4QqMnXWY84s9fmtCnLhgw3+s2xbpOjP1Uah+NYj60M3o77ABgz+eyH7 KLKGOpqjLkdn3YZCWDoYPYzXas83x5Gvz3uLrsDfP1/bR3XeTaJ8eoUfwBbd+S8C1Q31 kbPw== X-Gm-Message-State: AOAM5308kp8ujoqVHm2xT7/j0iQVL5qh5mtGYwD9apw1YoF8dxOxTxQz +2oWhwCFoU/VjB7UiLZe0IQD1inu9Rw= X-Received: by 2002:adf:de12:: with SMTP id b18mr4214757wrm.187.1604595502222; Thu, 05 Nov 2020 08:58:22 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id z5sm3350729wrw.87.2020.11.05.08.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 08:58:21 -0800 (PST) From: Wei Liu To: Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Wei Liu , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Daniel Lezcano , Thomas Gleixner Subject: [PATCH v2 05/17] clocksource/hyperv: use MSR-based access if running as root Date: Thu, 5 Nov 2020 16:58:02 +0000 Message-Id: <20201105165814.29233-6-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201105165814.29233-1-wei.liu@kernel.org> References: <20201105165814.29233-1-wei.liu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Wei Liu --- drivers/clocksource/hyperv_timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c index ba04cb381cd3..269a691bd2c4 100644 --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@ -426,6 +426,9 @@ static bool __init hv_init_tsc_clocksource(void) if (!(ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE)) return false; + if (hv_root_partition) + return false; + hv_read_reference_counter = read_hv_clock_tsc; phys_addr = virt_to_phys(hv_get_tsc_page()); -- 2.20.1