Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4095876pxk; Tue, 8 Sep 2020 10:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztFc9SNQ7Syeakn4xVYOXoFjqs4W6ibslXmShUYVuRcBgCPWz5lkp+zDheCC0RWWt7sF/a X-Received: by 2002:a17:907:2141:: with SMTP id rk1mr1817902ejb.256.1599586385231; Tue, 08 Sep 2020 10:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599586385; cv=none; d=google.com; s=arc-20160816; b=F7AHzT5W1/xOddBbJcTtl65HEKl7F6IWKbll86iMV+ZQMKSiEPTsPNDwr1uNzOvUF5 312O6qVqBSRcnCwI+fXf9OmwO/9NGxmdPebPVYImIEuNRszXKrEDKqVAvVpHR81fu25j GZ16VolAbclONUuw3iat8PtDVVQ1NWslxBJ2+BISnjwQBbfkzTJeiVclx6gypJuX2M+0 0yNSaA9VEH1hVXLlns3ZSMtu8RaogqMjzVpoewA54UptR1umGrMqL6+SwnrA+reuEAIe JsmrCK705zL+DHcDjmhnTLfCSHszo7I4BNDZHq+8Hu5Hg1C1JfU41HCcbTpROfAfiz6g hUxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=yRtJiQvTLZaPtk+RPwk6k5Jt+rFID7Ns/oQ86UrML8s=; b=N5hBqki81/Z5MY0meeJ2I4qoJrcPbLztowE+dWo8iXavFK3Qp5cLnEU0BpS2wA8EVy alM9tSzuxzIEnO6yIZGxZkHeCvSZMlZsQyzw44vRcyiJ4V9rQ6hosTMMvjlpHGhpT64j W/1TljNzeqNXD9EcYsAiNte0A3EWJulWJydG7WOMMQS8P5Z4bjK73cjJodjHrQEUfLXy /iBsyf2rZ2oAGCcMtSb3N6gI91/mMOk73KvcEcWDbCXeM+I/RWFd3F3DaExqkLLZfBSI ZwKAP+z0asP4fpOn3FXTfM9SZh3rp32y1EJJg2eso1OZgmjK6lMt/069k2V0m1IBYame /aNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=iJP9lcVJ; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si12167736eje.544.2020.09.08.10.32.42; Tue, 08 Sep 2020 10:33:05 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=iJP9lcVJ; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728633AbgIHRcK (ORCPT + 99 others); Tue, 8 Sep 2020 13:32:10 -0400 Received: from mail.skyhub.de ([5.9.137.197]:60392 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729860AbgIHRb3 (ORCPT ); Tue, 8 Sep 2020 13:31:29 -0400 Received: from zn.tnic (p200300ec2f10bf0070b09dfd4356f225.dip0.t-ipconnect.de [IPv6:2003:ec:2f10:bf00:70b0:9dfd:4356:f225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8168D1EC0489; Tue, 8 Sep 2020 19:31:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1599586288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=yRtJiQvTLZaPtk+RPwk6k5Jt+rFID7Ns/oQ86UrML8s=; b=iJP9lcVJcOyHAel/oWkGSXaP0GErNwXl6VSrOEf9ISsvhMmAZGwWpE8/uE7DCXMj7yaqlP lvn26zkv8fYCalX0O+s/4vImZEYbA/zJr1dJoF80yTli8TYPwDm3eoOZhz8ECsF42RtrVQ ewJ//YO+lNX4F/urn2duEr/bcda49Yw= Date: Tue, 8 Sep 2020 19:31:28 +0200 From: Borislav Petkov To: Srinivas Pandruvada Cc: "Jason A. Donenfeld" , kitsunyan , "Brown, Len" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX Message-ID: <20200908173128.GH25236@zn.tnic> References: <20200907094843.1949-1-Jason@zx2c4.com> <20200907100647.GB10657@zn.tnic> <22617e57e541e460fac09db04fdb370f8e96e8ef.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <22617e57e541e460fac09db04fdb370f8e96e8ef.camel@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 08, 2020 at 10:10:17AM -0700, Srinivas Pandruvada wrote: > > > - if (reg == MSR_IA32_ENERGY_PERF_BIAS) > > > + switch (reg) { > > > + case MSR_IA32_ENERGY_PERF_BIAS: > There is already sysfs interface for it. So someone needs to convert all those to it: tools/power/cpupower/utils/helpers/msr.c:14:#define MSR_IA32_ENERGY_PERF_BIAS 0x1b0 tools/power/cpupower/utils/helpers/msr.c:84: ret = read_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, &val); tools/power/cpupower/utils/helpers/msr.c:97: ret = write_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, val); tools/power/x86/turbostat/turbostat.8:222:cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced) tools/power/x86/turbostat/turbostat.c:3652: if (get_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, &msr)) tools/power/x86/turbostat/turbostat.c:3669: fprintf(outf, "cpu%d: MSR_IA32_ENERGY_PERF_BIAS: 0x%08llx (%s)\n", cpu, msr, epb_string); tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.8:25:Policy in MSR_IA32_ENERGY_PERF_BIAS (EPB) tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.8:33:Note that MSR_IA32_ENERGY_PERF_BIAS is defined per CPU, tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:84:unsigned int has_epb; /* MSR_IA32_ENERGY_PERF_BIAS */ tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:755: get_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, &msr); tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:1044: get_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, &msr); tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:1045: put_msr(cpu, MSR_IA32_ENERGY_PERF_BIAS, new_epb); Any takers? If there are none, it could be made into a small kernelnewbies project... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette