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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 116A8C433E0 for ; Mon, 1 Mar 2021 15:43:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99E7964E04 for ; Mon, 1 Mar 2021 15:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237435AbhCAPnI (ORCPT ); Mon, 1 Mar 2021 10:43:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237406AbhCAPmu (ORCPT ); Mon, 1 Mar 2021 10:42:50 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B73E4C06178B for ; Mon, 1 Mar 2021 07:42:07 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id n22so4014135wmc.2 for ; Mon, 01 Mar 2021 07:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TuyEPq+OKYhM5djtv+OIrlO0NdrnxuMD/gDW97dakUc=; b=vw0/US/Oqmu9LDZDKsgb9Nrq7hDcRFD6Do0/UJSayXej4KkjsuUZSWfLKHOWMEC2MN YuafppUR4rWrR3e1a/dOgdw8MUd8wSD5nCw+Nj6Q/OfAiVlmKT137vpr+DpVVDebfr67 cWjzAb8H8xkpkeXtHHPeetzhRjaS1+JrLxwqRHcmtIkGBnJxkfQL8Q49HbJYJo99YHIS NzVAj/xnd0jKuXDCHdZEQTGBuj9M1DFKpFmRVXM4snN7D1D03Mi5kstG3CKJV8JGFglg 1TgDdSU8QnDex9lFiQ/ky1SVF+vo0vdh2eUZJfCL6dNgYMkMADR0wQfWbLc04CUCMYB3 YEyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TuyEPq+OKYhM5djtv+OIrlO0NdrnxuMD/gDW97dakUc=; b=gx83I/J1XLAUcotcYwIMRuXorZ8zbRaTR8dL5qX+POPJj/VCc1duxnG3Dhtw0OxHe7 vKShFroezA+irlyuMB6sI/7eahyuIDb/yoJ/fsqIt0CvXqQwGGCA506+cStJTregDlDJ 0UDbD7sih0p1bR0EcvD7m0AGmHWbkphF0frOgT1x7N0GyAzxJycLzpC26SedJ8xM4JRb XtW3SnRrXQfU3nSf8os3dBe5X82i/yqN11cyHWQBe0SMnRXC0/Qh+ozodAZ+piP+REmw UU3I4cMOR1IuP3xuE/Wa/vTP33Yj2HsSMEfF1BNQR9KVbPgJEvt/lMzgwYUwldVVc9dl 8Zag== X-Gm-Message-State: AOAM533VR2arulRfbwcLmiqilx+AqF9D6uekDlbvO4hF7vrDUkfYpOiV mROVvpBEhhAPe9w1UNM5pMk8ps41SdnfNQ== X-Google-Smtp-Source: ABdhPJzwJLYKHuwJLPr1iYEZbIkNeXbm9Pe8LUYKejti/ummafqwZBzHeTxRzdRMk+vqU5bD3eL6bA== X-Received: by 2002:a1c:f409:: with SMTP id z9mr16239716wma.141.1614613326166; Mon, 01 Mar 2021 07:42:06 -0800 (PST) Received: from [192.168.0.41] (lns-bzn-59-82-252-144-192.adsl.proxad.net. [82.252.144.192]) by smtp.googlemail.com with ESMTPSA id a6sm7572577wmm.0.2021.03.01.07.42.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Mar 2021 07:42:05 -0800 (PST) Subject: Re: [PATCH v2 09/10] clocksource/drivers/hyper-v: Set clocksource rating based on Hyper-V feature To: Michael Kelley , sthemmin@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, arnd@arndb.de, linux-hyperv@vger.kernel.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-arch@vger.kernel.org References: <1614561332-2523-1-git-send-email-mikelley@microsoft.com> <1614561332-2523-10-git-send-email-mikelley@microsoft.com> From: Daniel Lezcano Message-ID: Date: Mon, 1 Mar 2021 16:42:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1614561332-2523-10-git-send-email-mikelley@microsoft.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/03/2021 02:15, Michael Kelley wrote: > On x86/x64, the TSC clocksource is available in a Hyper-V VM only if > Hyper-V provides the TSC_INVARIANT flag. The rating on the Hyper-V > Reference TSC page clocksource is currently set so that it will not > override the TSC clocksource in this case. Alternatively, if the TSC > clocksource is not available, then the Hyper-V clocksource is used. > > But on ARM64, the Hyper-V Reference TSC page clocksource should > override the ARM arch counter, since the Hyper-V clocksource provides > scaling and offsetting during live migrations that is not provided > for the ARM arch counter. > > To get the needed behavior for both x86/x64 and ARM64, tweak the > logic by defaulting the Hyper-V Reference TSC page clocksource > rating to a large value that will always override. If the Hyper-V > TSC_INVARIANT flag is set, then reduce the rating so that it will not > override the TSC. > > While the logic for getting there is slightly different, the net > result in the normal cases is no functional change. > > Signed-off-by: Michael Kelley Acked-by: Daniel Lezcano [ ... ] -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog