Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp808165lko; Tue, 13 Jul 2021 10:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGaqeChDmD5l4CKBPrrK+h/gyE2r7De5R7hg4FuCmzqslit24G+LyVfdtrJ8srR5o+mje3 X-Received: by 2002:a05:6638:3819:: with SMTP id i25mr5083540jav.44.1626197687459; Tue, 13 Jul 2021 10:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626197687; cv=none; d=google.com; s=arc-20160816; b=LGs9qiDwQl3ItN92L5Xf5Kwj2RK3daEJpKjILZaSru4bvAg90Kwgl2kipLiJqV821D H/I11VxAnlQ5GKy4XylM721Lperm35nxubl1slNz12iAqYsoMdlUsbMdLxbey4TxcVTf 6RmEC/8II7ZzkOZL0ixstfE70dOhvyn7jm9tt5L0xvbTwNb4qyuP3YeTb0H5vIhXBbkR y1MWJerS6bPY86yftZaLVD3oyAtjyqF4uI5cnvhy4GrrUeBQ32LO8pZMwadvlvRt/BiO UkTqCGVpxHsfXkJlJK2C3wjJ5drhesbH4j8kJSTR+h1VIIz9va/lWgRDW/Fs8tm5dTQw fLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wzNkp23Updmo+9Qa3OwjPC2MPeOgka9V1Y3hAYMOtks=; b=EGYlpIYBy70laDGqfw2VPWphZXyEGonpTJOnR94LZwckzKt8rpAuzrXRjisXpaNcyd 2Un0W1jGlpjHgoqXT8l5gblbvhIz6JY2LNrThQSEX47cf1q3x3qt7iuX7HCU5hZXxS8q LPIJMK1/JJNuTVqkFCUjWlmpWhk7rmSWl74PnuqjLtGGf7nfxEe4hdMNHjswo9EOCrIF zm4eaBVl3YpoYQC6GcomdVyyJbeSP5P9axj7aewFN+j0eYP7IIgd9CXYOMCR2rp/ZFLC YcHIKNxXL1KICwloJUPJvHxj/ZfSMCtPw8sfSMV1LM2yQgDx293gPtPktjES72RgKyY/ PCrw== 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 d21si4948362jam.9.2021.07.13.10.34.35; Tue, 13 Jul 2021 10:34:47 -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; 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 S230145AbhGMRft (ORCPT + 99 others); Tue, 13 Jul 2021 13:35:49 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:41786 "EHLO mail-wr1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbhGMRft (ORCPT ); Tue, 13 Jul 2021 13:35:49 -0400 Received: by mail-wr1-f49.google.com with SMTP id k4so25207537wrc.8; Tue, 13 Jul 2021 10:32:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wzNkp23Updmo+9Qa3OwjPC2MPeOgka9V1Y3hAYMOtks=; b=X6KycBiI1QodUgRNw4GFhLSCziydmR29sQKIoW+A9SRtgmNVeIpyzZvwD9PbuI08Ly RXC47R3I8WPCePS+vqyDCiMLICyPoAej+u1F+MxqdBNdR9cVaRMt80adm0cHBrWgszJg ObIAlYPaqfbxmqA+6Mxr8MG2kRu6YHEwfy5VySX1y/7HeixauS/Q1Y4+PbjHxvPJPCRj SFpf+x/x3YyM8RsbxPS2Pn3AtrwkH/zDlMutN3u1Oh9oDSMZawvq9PL5X6csDJ3ZHgIc f8EJKz11oS8NVF34+IljKphhU2iBl8zLWCBkMR1XK5HTkO3VLVwg6N3kpd8dLe/7UUGa 7kMA== X-Gm-Message-State: AOAM530i/ytZl5xfkoW0NCNdoKZp8AJP7E+L/ZQThoj7EEovI88KPjlV WhAjv3YRB6YrsBPJnvimBcE= X-Received: by 2002:adf:c5d2:: with SMTP id v18mr7200261wrg.386.1626197577942; Tue, 13 Jul 2021 10:32:57 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id c15sm2287056wmr.28.2021.07.13.10.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 10:32:57 -0700 (PDT) Date: Tue, 13 Jul 2021 17:32:56 +0000 From: Wei Liu To: Michael Kelley Cc: Ani Sinha , "linux-kernel@vger.kernel.org" , "anirban.sinha@nokia.com" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" , "H. Peter Anvin" , "linux-hyperv@vger.kernel.org" Subject: Re: [PATCH] Hyper-V: fix for unwanted manipulation of sched_clock when TSC marked unstable Message-ID: <20210713173256.f4guohutujyvfste@liuwe-devbox-debian-v2> References: <20210713030522.1714803-1-ani@anisinha.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 05:25:59PM +0000, Michael Kelley wrote: > From: Ani Sinha Sent: Monday, July 12, 2021 8:05 PM [...] > > /* > > @@ -432,6 +430,12 @@ static void __init ms_hyperv_init_platform(void) > > /* Register Hyper-V specific clocksource */ > > hv_init_clocksource(); > > #endif > > + /* TSC should be marked as unstable only after Hyper-V > > + * clocksource has been initialized. This ensures that the > > + * stability of the sched_clock is not altered. > > + */ > > For multi-line comments like the above, the first comment line > should just be "/*". So: > > /* > * TSC should be marked as unstable only after Hyper-V > * clocksource has been initialized. This ensures that the > * stability of the sched_clock is not altered. > */ > > > > + if (!(ms_hyperv.features & HV_ACCESS_TSC_INVARIANT)) > > + mark_tsc_unstable("running on Hyper-V"); > > } > > > > static bool __init ms_hyperv_x2apic_available(void) > > -- > > 2.25.1 > > Modulo the comment format, > I can fix this while committing. No need to resend. > Reviewed-by: Michael Kelley > Tested-by: Michael Kelley Thanks Michael. Wei.