Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1749139rwl; Wed, 12 Apr 2023 18:29:42 -0700 (PDT) X-Google-Smtp-Source: AKy350aVpt/cOlN/lIkW5ZCiG6DnpFxKQ2HKWd1LnaeotUMIiXgfK0bb+R4qXPwicGP4beM/Q9aO X-Received: by 2002:a05:6a20:c119:b0:db:c54a:bf53 with SMTP id bh25-20020a056a20c11900b000dbc54abf53mr426903pzb.7.1681349382064; Wed, 12 Apr 2023 18:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681349382; cv=none; d=google.com; s=arc-20160816; b=Z424+wrkdjFmM0zn6t7tJYCCiPihBaMFM2y4KhmvjkOac8aPN3J6GfVKtHja7J/1fD 7qyQuUyIEm+oZEV1+lfPCU0b+KfoVE8QEItLPk06Vv1axYpExyBnbXBVtvmLKxo59mTj F3gEIJI1SBvnq1YXcep20+WF3WcfGitOCvLXdUYoxrOZgVsIM4qMxuf1MqHmqZW3bXTu erNW53WxKwrj0SXjHeo/UcK3KdyHBpW7XrqgWbh/YSnxlr0MllU8DDJUgShdq35vsQ87 CMP4i7yKTeK/iC0c/W+BpfFijv1o/DNsnuH43+j2fvpqgfhWiSK/ElTWwOWFsrlxOm+i Xl1g== 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=aLNvC46YUMmRd95OiEAIyCSkRHuN7St4j0IhJcSJ0oI=; b=gKkTyIvLUYHv1uqvt1BRcaimdcSMwX0IGxr33H1m7n1M/4Ch3Dwuwixb7vMsoLUajD 9X1jJ4maGYltq48eFr8Ay2ib/BZuCXJI9c1ftyTm1SNi92Gj2vU+8s7NA+H7fNx1vmeS Dzdjp8Pd2RC6L7Haa7PqHPmwaBwiGVeEnS3jB51HUQMDcvNQkgF5V6yVDsCz5ng4PugB 9mcW40KojJwPsHvzD+BZIbkgXByouGT7iBQwfCXsTUdraY/WSi+RIRzFHReNNWNwy8a+ /2rQTrTP6F5GPsi20XRI1ZSPniyZmc8zbYiG5S6dHFtJSgjdyrXCmfSRMgmfHMVwaRW1 ux1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c21-20020a621c15000000b0063b227e61e3si359198pfc.2.2023.04.12.18.29.30; Wed, 12 Apr 2023 18:29:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229640AbjDMB2m (ORCPT + 99 others); Wed, 12 Apr 2023 21:28:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjDMB2l (ORCPT ); Wed, 12 Apr 2023 21:28:41 -0400 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33D32D73; Wed, 12 Apr 2023 18:28:39 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id d28so183763wra.6; Wed, 12 Apr 2023 18:28:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681349318; x=1683941318; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aLNvC46YUMmRd95OiEAIyCSkRHuN7St4j0IhJcSJ0oI=; b=Qq/qCxhqCBT0l+fU8ChdZTsyNnokKsVtqMgheTeqFegUANmr/GbR26467cPJk1gE9J 6GdoqoCdUfwEOh6QUyx5iawuKlGVRRr9mYPfZK5I1ErqC5kkIh5nqH0g8Mgf5juBKGSZ s5fYyBfrS39PPz0WtKk4mEG/37hW5gqjPC/qz5qtRwGkdFFSZiQJBIa5us0SCjKiFL3r Nne1BnVX4mMWFxEJntLskbZInSj+Uy2dLEW/6vDi75bJKLbgzRZkmtKWf4ik4P5jIsFm R/1DN8V6I6HnDdClCemJKqaG6qRzeodofIzkI8SuWMy8Ml6DKxkjgGH8TCSaW9rKA2Vj cuWQ== X-Gm-Message-State: AAQBX9d1CcZ9VKNqY5PEXpye79qTi0t9NR48ewX9ctSCzVBG+bBtkOh/ 7snUPU/IGDSUrK8Ou3Ot1yk= X-Received: by 2002:adf:f9d0:0:b0:2ce:a93d:41a7 with SMTP id w16-20020adff9d0000000b002cea93d41a7mr141572wrr.40.1681349318366; Wed, 12 Apr 2023 18:28:38 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id k16-20020adff290000000b002f53fa16239sm110697wro.103.2023.04.12.18.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 18:28:37 -0700 (PDT) Date: Thu, 13 Apr 2023 01:28:33 +0000 From: Wei Liu To: "Li,Rongqing" Cc: Sean Christopherson , "Michael Kelley (LINUX)" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] clockevents/drivers/i8253: Do not zero timer counter in shutdown Message-ID: References: <1675732476-14401-1-git-send-email-lirongqing@baidu.com> <3b8496c071214bda9e5ecfa048f18ab9@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b8496c071214bda9e5ecfa048f18ab9@baidu.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 12, 2023 at 12:02:04PM +0000, Li,Rongqing wrote: > > > > -----Original Message----- > > From: Sean Christopherson > > Sent: Wednesday, February 8, 2023 11:04 PM > > To: Michael Kelley (LINUX) > > Cc: Li,Rongqing ; KY Srinivasan ; > > Haiyang Zhang ; wei.liu@kernel.org; Dexuan Cui > > ; tglx@linutronix.de; mingo@redhat.com; > > bp@alien8.de; dave.hansen@linux.intel.com; x86@kernel.org; > > linux-hyperv@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: Re: [PATCH] clockevents/drivers/i8253: Do not zero timer counter in > > shutdown > > > > On Wed, Feb 08, 2023, Michael Kelley (LINUX) wrote: > > > From: lirongqing@baidu.com Sent: Monday, > > > February 6, 2023 5:15 PM > > > > > > > > Zeroing the counter register in pit_shutdown() isn't actually > > > > supposed to stop it from counting, will causes the PIT to start > > > > running again, From the spec: > > > > > > > > The largest possible initial count is 0; this is equivalent to 216 for > > > > binary counting and 104 for BCD counting. > > > > > > > > The Counter does not stop when it reaches zero. In Modes 0, 1, 4, and 5 > > the > > > > Counter "wraps around" to the highest count, either FFFF hex for binary > > > > count- ing or 9999 for BCD counting, and continues counting. > > > > > > > > Mode 0 is typically used for event counting. After the Control Word is > > > > written, OUT is initially low, and will remain low until the Counter > > > > reaches zero. OUT then goes high and remains high until a new count or a > > > > new Mode 0 Control Word is written into the Counter. > > > > > > > > Hyper-V and KVM follow the spec, the issue that 35b69a42 > > > > "(clockevents/drivers/ > > > > i8253: Add support for PIT shutdown quirk") fixed is in i8253 > > > > drivers, not Hyper-v, so delete the zero timer counter register in > > > > shutdown, and delete PIT shutdown quirk for Hyper-v > > > > > > From the standpoint of Hyper-V, I'm good with this change. But > > > there's a risk that old hardware might not be compliant with the spec, > > > and needs the zero'ing for some reason. The experts in the x86 space > > > will be in the best position to assess the risk. > > > > Yep, my feeling exactly. My input is purely from reading those crusty old specs. > > > > Ping I guess you want Thomas Gleixner and Daniel Lezcano's attention. > > Thanks > > -Li