Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp492866oof; Tue, 25 Sep 2018 00:15:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60I7HxXktO4CBd+7McmZAdUArvuaBEFf3RANRr0xHLENAOSuwhYn5sgGO4Nzj7SgVVzk8Ew X-Received: by 2002:a62:6cc4:: with SMTP id h187-v6mr407428pfc.158.1537859745331; Tue, 25 Sep 2018 00:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537859745; cv=none; d=google.com; s=arc-20160816; b=HuIJv9fbbrAFpc1H5Zi7mIERYf/g1IXnsIpfPhoVeyui57ZIqDD4GMxkOlKlTTyNI5 v3udQniHkFxM6qKK7IcReJsE2eZbWFDyaZVBYCtkEEzC3C4QV6DgNzsNWBwCZmjhlED9 3i051dlY5vo7JUgdCm+rq7EQnJA4f1a8P8T9VuwoAoYfbO/xLEoIAg8ZIoRJ5rRC5fna vMS3mlk0Im3eDOH2d97ofNdr4IrT/rL4vwVOudsaRGzur3WQocei6SspMp1rOIRYLkDY Yc6XowLR1vRMYozEKjQOJeprm38rDmGHHa+H6GP+2n6J/BKDRDuXM/ZcUAVT2Ty8/aJ6 H75g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=goQomo3NqADDAm2X4kPFA0qZMfPcwrohf5dvBiR319Y=; b=jqHHmFmKLm4osXxkLwNPTBhkzl1mnUKrxQCzVcRlAlC783fKXZ1JGuX93x8JCJ7enp xTPy/KItlMMa8HXg+8v68w+DsdSV9Dn4sada4lN+x34EP4s34xsAOzVwQVZWYei4WLvA 6Y6Lv4ANcU+ZKBT8vnaAKbXwyWn7Ol25WPxmwo/4akKPm+2bE3yylH32ummA+/TN2c++ SbbSmnCjzZrjsiu5ZmEKtjzqm+saLmwjVDpQ2BEQkef2ZQHM65RDbQTQ6SM80mH665TA 8sKgMRM7l3p3X9vF61m2p0LA9UuNHWhlrhGoE5NW7nouU0fK8/FQ77Y40wCjxyi0jKoN IAIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8-v6si1585838pfj.88.2018.09.25.00.15.30; Tue, 25 Sep 2018 00:15:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728905AbeIYNUb (ORCPT + 99 others); Tue, 25 Sep 2018 09:20:31 -0400 Received: from mga01.intel.com ([192.55.52.88]:38320 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728893AbeIYNUa (ORCPT ); Tue, 25 Sep 2018 09:20:30 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 00:14:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,301,1534834800"; d="scan'208";a="265474645" Received: from yisun1-ubuntu.bj.intel.com (HELO localhost) ([10.238.156.104]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2018 00:14:18 -0700 Date: Tue, 25 Sep 2018 15:11:43 +0800 From: Yi Sun To: "Michael Kelley (EOSG)" Cc: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "tglx@linutronix.de" , "chao.p.peng@intel.com" , "chao.gao@intel.com" , "isaku.yamahata@intel.com" , Tianyu Lan , KY Srinivasan , Haiyang Zhang , Stephen Hemminger Subject: Re: [PATCH v2 2/2] locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V Message-ID: <20180925071143.GF11769@yi.y.sun> References: <1537514712-62434-1-git-send-email-yi.y.sun@linux.intel.com> <1537514712-62434-3-git-send-email-yi.y.sun@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-09-21 17:02:54, Michael Kelley (EOSG) wrote: > From: Yi Sun Sent: Friday, September 21, 2018 12:25 AM > > + > > +#define pr_fmt(fmt) "hv: " fmt > > Other Hyper-V messages use "Hyper-V: " as the prefix, not "hv: ". Take > a quick look at 'dmesg' output for reference. > Will modify this. Thanks! > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > Some of these #includes look like they might be leftovers from > some other code. Please check and see whether kernel_stat.h, > debugsfs.h, log2.h, and gfp.h are actually needed. > Sure, I will check them. > > +static void hv_qlock_wait(u8 *byte, u8 val) > > +{ > > + unsigned long msr_val; > > + > > + if (READ_ONCE(*byte) != val) > > + return; > > + > > + /* > > + * Read HV_X64_MSR_GUEST_IDLE MSR can trigger the guest's > > + * transition to the idle power state which can be exited > > + * by an IPI even if IF flag is disabled. > > + */ > > + if (ms_hyperv.features & HV_X64_MSR_GUEST_IDLE_AVAILABLE) > > I can't see a case where this test is actually needed. hv_qlock_wait() > can only get called if the flag is set when hv_init_spinlocks() is run, and > the flag value doesn't change after it is set. > Yes, it is redundant. Will remove it. > > + rdmsrl(HV_X64_MSR_GUEST_IDLE, msr_val); > > +} > > Michael