Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4084009pxk; Tue, 8 Sep 2020 10:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs32BfOr0hZStAjiaaJuN/lkllNOFzi5ZpeNhh9rQ+hdOnB6jGsubZ6zwT3g4IkIttNjxp X-Received: by 2002:a05:6402:164d:: with SMTP id s13mr27688691edx.222.1599585241524; Tue, 08 Sep 2020 10:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599585241; cv=none; d=google.com; s=arc-20160816; b=HsM+HtZDQV4TfSfUeB7gEWiuQBVScP/MqLL7v8Pcr8UuXywwGiMOHAXBHJYswh3Hrw DqlGmhVYbJn8snrjlAwAj9GmF3sSt5nEJvDx+8hdliwagq8nXU8ldA0HU04rbjxdjSxg diflmZ0gww0uHlOt11jwf4AF10HymP+JXt1FSvyn534CzzDDJyoOJF5m/rzr0AvoFwJp UVxbOJ/vZezGeEHRsSM7Uh1TRRGhH5VHd6SnfOXdQehnrT7g9mJQ3yQgfRKdxRSCrr6M Gb3ytzCgicrLXYKmHxnYpFvmAsqm9iXDSit+yGAMNkvjxVBd7RtYUUqfPupgaGMnny6h wkOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=3q/s89g0XaDkKP4akRIYlWvoJoO09XWKYYf7oAq/nxI=; b=yqekRL+kqjqCstRg4D4imkqBqPpzkKHKr8dyVmtExZZsnL3MiG8Stvbs8HXSMIWKrG YwnHAlyQwdZ72ZFRLzCPxOBsfXafTravMikJZ6hRWyTb9H5T5sfH/cIV9cO8Jr+oBtop O+Tz8L1l8Y/7vTXaiBMIg+sl+09qPZAOdU6neaXbNMA1m5od6BnI2/EoP8HbpRlTyZxw ozCPHU+thVwh9NFAt1WLFUc2FCjBqNNuaqgq5uYjxstZkAYJz22BAjttqSd5pFEqKL3Q QTUJm963SLEW2q6VRdwXhFk4kwYLcZAY8poNUiB5Z/uPCCyUwTTbZwf91fnlL6nqbTvE Vs1A== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si3955860edr.507.2020.09.08.10.13.38; Tue, 08 Sep 2020 10:14:01 -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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731640AbgIHRK3 (ORCPT + 99 others); Tue, 8 Sep 2020 13:10:29 -0400 Received: from mga01.intel.com ([192.55.52.88]:11104 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731825AbgIHRKT (ORCPT ); Tue, 8 Sep 2020 13:10:19 -0400 IronPort-SDR: 6JxiHnR5zvlemI1pTtekuGiEdiFvhzZhCWIMebUUI0rxXkg3lgk5I3o3xAkqjTS9o1mwRht+Lg 5JlverwLfLRg== X-IronPort-AV: E=McAfee;i="6000,8403,9738"; a="176239158" X-IronPort-AV: E=Sophos;i="5.76,406,1592895600"; d="scan'208";a="176239158" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 10:10:18 -0700 IronPort-SDR: xb3TOCto97k46V4T6BNX6Fv450dNj7J2LPuzAxhub5KUBHXPOeDrrOFcNHqXJE7f888KT2MY6I 0KrDL5DOuj0w== X-IronPort-AV: E=Sophos;i="5.76,406,1592895600"; d="scan'208";a="480110130" Received: from spandruv-mobl.amr.corp.intel.com ([10.254.127.119]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 10:10:17 -0700 Message-ID: <22617e57e541e460fac09db04fdb370f8e96e8ef.camel@linux.intel.com> Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX From: Srinivas Pandruvada To: Borislav Petkov , "Jason A. Donenfeld" , kitsunyan , "Brown, Len" Cc: x86@kernel.org, linux-kernel@vger.kernel.org Date: Tue, 08 Sep 2020 10:10:17 -0700 In-Reply-To: <20200907100647.GB10657@zn.tnic> References: <20200907094843.1949-1-Jason@zx2c4.com> <20200907100647.GB10657@zn.tnic> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-09-07 at 12:06 +0200, Borislav Petkov wrote: > + Srinivas. > + kitsunyan. > > On Mon, Sep 07, 2020 at 11:48:43AM +0200, Jason A. Donenfeld wrote: > > Popular tools, like intel-undervolt, use MSR 0x150 to control the > > CPU > > voltage offset. In fact, evidently the intel_turbo_max_3 driver in- > > tree > > also uses this MSR. So, teach the kernel's MSR list about this, so > > that > > intel-undervolt and other such tools don't spew warnings to dmesg, > > while > > unifying the constant used throughout the kernel. > > [...] > > - if (reg == MSR_IA32_ENERGY_PERF_BIAS) > > + switch (reg) { > > + case MSR_IA32_ENERGY_PERF_BIAS: There is already sysfs interface for it. > > + case MSR_IA32_OC_MAILBOX: > > return 0; > > + } > > [...] > Actually, we added the filtering to catch exactly such misuses and, > lemme check what is the proper word now... /me checks, aha, adding > new > MSRs to the "passlist" is the wrong thing to do. > > Srinivas, can you pls convert this in-tree driver to use a proper > sysfs > interface for that mailbox MSR and also work with the intel-undervolt > author - I hope I have the right person CCed from the git repo on > github > - to come up with a proper interface so that we can drop this MSR use > too. Overclocking is not architectural I/F and is supported by some special CPU skews. I can't find any public document to specify the commands which can be used via this OC mailbox. I have to check internally to see if there is any. To add a proper sysfs interface we have to make sure that we are not allowing some random commands to hardware and crash the system. Thanks, Srinivas