Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2818615pxk; Tue, 15 Sep 2020 03:13:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytwzvYuny11M5lxeoQqn/V/8JrvSaKPEJz9JWdIu2r6A4h1h3XHvs8Pd0H25hIBY54KXmc X-Received: by 2002:a50:8e17:: with SMTP id 23mr21202429edw.42.1600164803360; Tue, 15 Sep 2020 03:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600164803; cv=none; d=google.com; s=arc-20160816; b=j8DlXrDRhwfNBpW7B8QHbGzCe6SaqktrLcyltzfWEp8PaVSaJWQus0HA5t+oSU7ZJE 5/h2ickh4szUAjOIx9vsa9I5uhtmwKcbPClN4wRe5rq7c6Fcy8RBmbmLaAokuoC2exee nAfiwmirOVEN2Qw1T3chXI46gCFMxXBs0VV9zHbXwlQcK14FzgFeuZlH2UyzlNop7uDC MtytyQwEl21EkuvUpTf/LfPj2zYVail4NhCSyFBushQKh0qgyZUVgg7pfXfjgCB+hTHX OSXUk/PbzvzN6fBxr97Ry40by0YA04ygtPBgKXqOm1EaOSfwoEfXk4SMGUkt5jd3nY4n NGMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=PW2WSdBrk/XXLs9riC9q1EjPQLc8T5twwn4fVAgRI5I=; b=Qkp3wwC0CmO7pX17gqY3LUwt6+92kKu6qdZtzLr3sz3I0mvb67chfceuphO28WPjCa zQlSmuEcD5vYyKi5W309selWQo06CWhqYV8CboAH179qoDb0XUUIqhPh96Iv4aw3k9bS y91H8Z7kpvI6Zap0snvb5NkXoOtqfHJuF7x7uGqlFy4ocxWj3aKyO+y8M+m4qjmN4zjb By7+vRt8vFvB/4SAGG49yfnsVwj4C4uAB0IeVMohVo6canDuqHTNbk30KqTwQusAnQd2 uX1oGyrOXynjh2Iw3AuwNuc9LK5/lidnfv2KZMuOGeFEK+CLL3qOkcRfysVb9uDR7cG8 Rp2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iqZs7V6L; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si8443091edq.156.2020.09.15.03.13.00; Tue, 15 Sep 2020 03:13:23 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iqZs7V6L; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbgIOKKP (ORCPT + 99 others); Tue, 15 Sep 2020 06:10:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:60120 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726130AbgIOKKM (ORCPT ); Tue, 15 Sep 2020 06:10:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600164611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PW2WSdBrk/XXLs9riC9q1EjPQLc8T5twwn4fVAgRI5I=; b=iqZs7V6Lqh8xMh1sbahLc64QzY3TPXqlYVzw8ucaAl35ktdDNRs0peEuFrowgYCo7FfhAm 3Y4ugTxBu8xFYVTdUGUPeFanyUbv/t3DtHfRfn04AKdPbmpP+BYpZZHIFFV5JlHG1xqmwy xpvuOrj+zCJU8MlP0iOLlZKCOcGwrcg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-0pbAvN3JMb-abQ-xoggubQ-1; Tue, 15 Sep 2020 06:10:08 -0400 X-MC-Unique: 0pbAvN3JMb-abQ-xoggubQ-1 Received: by mail-wr1-f70.google.com with SMTP id n15so1021872wrv.23 for ; Tue, 15 Sep 2020 03:10:08 -0700 (PDT) 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:in-reply-to:references:date :message-id:mime-version; bh=PW2WSdBrk/XXLs9riC9q1EjPQLc8T5twwn4fVAgRI5I=; b=BpFwcOWb7wT4C1YTEj/z2zIDeWPWZz6khvLO2vEYU7F3I0tsTFkj9nyNwYoD3UQKNJ SVPGzNOZY0ZDLp6KT8/0Ggr6r20gj8HvPIxezbgidO12EMzmwK4XlASZnwvQTLIQQPUU 9qH1Whog3v2J2h7PVqXlbIvmMP3PmNlKGmvyt5z9za8gsm/uO4vi0ZmYAQcgXvyzwVbh w+plP5KMgz+/8N6f5Zxorc62Ew9L+G4PenlIEw1fZO20TxroBTZNR6XKNQ76Yh27lIoF rO6YVP8B5CJk+X8If+SjN3iXhOCcJG+RG2tsVqBBwLgjymPWGiRzft2a9hMu9JVMPNlK U6YQ== X-Gm-Message-State: AOAM532DOnRdfWKwRgxJz4FD2H/GNynb9Ose60s1M2GK258hwXSUXjHm 6uDHLBvNs13NvBHGuNmKHDdul/0FUD/FcB8GG1GF5FC7M6QaIqhk6TfD72U8dhpBJnc/KSV/eT+ Ae5yPyNlGtPKQ+/qumyJ+mrij X-Received: by 2002:a1c:7d55:: with SMTP id y82mr3913451wmc.100.1600164607059; Tue, 15 Sep 2020 03:10:07 -0700 (PDT) X-Received: by 2002:a1c:7d55:: with SMTP id y82mr3913430wmc.100.1600164606872; Tue, 15 Sep 2020 03:10:06 -0700 (PDT) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id m2sm16387178wrq.25.2020.09.15.03.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 03:10:06 -0700 (PDT) From: Vitaly Kuznetsov To: Wei Liu , 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: Re: [PATCH RFC v1 05/18] clocksource/hyperv: use MSR-based access if running as root In-Reply-To: <20200914112802.80611-6-wei.liu@kernel.org> References: <20200914112802.80611-1-wei.liu@kernel.org> <20200914112802.80611-6-wei.liu@kernel.org> Date: Tue, 15 Sep 2020 12:10:04 +0200 Message-ID: <874knzl5ab.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei Liu writes: > 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 09aa44cb8a91..fe96082ce85e 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; > + Out of pure curiosity, TSC page clocksource seems to be available to the root partition (as HV_MSR_REFERENCE_TSC_AVAILABLE is set), why don't we use it? (I understand that with TSC scaling support in modern CPUs even migration is a no-issue and we can use raw TSC but this all seems to be independent from root/non-root partition question). > hv_read_reference_counter = read_hv_clock_tsc; > phys_addr = virt_to_phys(hv_get_tsc_page()); -- Vitaly