Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp98034pxb; Tue, 2 Mar 2021 20:40:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF/BLGruibeR97Z/CWXlw1ZsDijlpif4dAIJEl8fWNg8LG2QxFr2zaTopCmwmUbCCzpQrv X-Received: by 2002:a17:906:a0d3:: with SMTP id bh19mr24475541ejb.199.1614746426020; Tue, 02 Mar 2021 20:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614746426; cv=none; d=google.com; s=arc-20160816; b=JwDs4I3t4CxEepsSSRZw587qKs36cN+5fAzM0TZoETNiDoZUIk7sENVoSHjTufkDcM HOVU5I9e3I4F89++UYUwl3lVV4Z7JL4BBmgxCkZLca8tO7fiJfDfwc2BRvpgGb4iTIU5 BpLwBGuJcRGR6bXPNK5CtlIx1nUw/BGTylZgTuUNMOU0kcDPfp5nMn/+1NGdWDPAwmm9 H4PNziq77rHGZlaqZReObXr+sXZC6Azk+pDfB9KQMwNAssVfQ8w/sX0hGt2Sdi0SnINi 2pvhc4f4qwZcozTB4vCRutWOU25lKF/7GGA5S0kCdyeDVtE7iU0LQM/9/l3Ndozh8SC8 8hdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TuyEPq+OKYhM5djtv+OIrlO0NdrnxuMD/gDW97dakUc=; b=v9ZyCHE4lOnXdGJyp1CR//yD9Jutq4G0b8LXX+leZhW5vQY8C6o2AdyjX3bvdam5jN 1ouqmScGpfVM/KGWOZeZZCOrSyeJY5Klp28lpiC5Jmo5fheV4evOyPQ6hgwQKpwy4H9n Ejruj8YUW/JR5oWBFqRJ3bXZrq7c9HUgHsKA7oWf4PKyWLKcR74lOWgM/n/jPk7ZfAln At2gMaqHmvbPMUHJMZNURlJf6CS2acEu/vj2vFIvaYYDUmZI9/pQDEjMKvWAeYYPA5Za yjM8pSHXAwkB5wzlmd5ztQ6X/wHvS5R1mcgPyFg/ymp/HJ6LvCDbWwt9II3XjyS+CQ6N qOCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="vw0/US/O"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw8si14586475ejc.218.2021.03.02.20.40.03; Tue, 02 Mar 2021 20:40:25 -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; dkim=pass header.i=@linaro.org header.s=google header.b="vw0/US/O"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237427AbhCAPnH (ORCPT + 99 others); Mon, 1 Mar 2021 10:43:07 -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-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