Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3371261pxk; Mon, 7 Sep 2020 10:57:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyXpfZsTe8H6ndA0n5UJ3germfO23gHttgErCPdwu014GvTGKA6W37Jx9JGNHM5pwH4b56 X-Received: by 2002:a17:906:644e:: with SMTP id l14mr21701933ejn.60.1599501442559; Mon, 07 Sep 2020 10:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599501442; cv=none; d=google.com; s=arc-20160816; b=CrQVGnHiJdC7k5Iu7JXsbeDeVImgwZJhq2a2Q6tGPO9I8Zr2Li5lX8B51QZZRc6980 44mv/s9/fyB4hXA8r14Mo7aYJx7+Ew7XvuH6uL4ha4QBbTXzpP9+S4YOTT0duUULY7Li C2Sbag9mSItUn7xBsR55jX0WK8J4K1sjJyejBkc96fg3O5Tv3i4AO4/0arfDlhWmkqFZ PDv5v8Gd0V6yYQ1D3Xoi1tlf9zJJ6UTbBixJBdbfwtJon5ovzrrsveko6+ko0tuoD76t +fYx4Nv5+G51juvnKNph3skJ6EnBM9385/Cm0WvzV4+yt+gPaatJjnlBUMTC2102/oQZ Ma0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NN71f3EDvIC1DjZan72vUyR2f9sthVGi+//yxQx7t0A=; b=mj0f2psQw4N4IJ6E6bvzazZ5n7rAfSx+sijvPtwyV9LaAXzsJYigUC28NOTjHPrj63 ADLenFmeEPCdHSZMCw5K/ClAg9LxLXEe63k70N+GDXuQH54PohN+2nQyBNdUzrm+6K5x xsscnixP2Z1S5erY4yNkmd6ay5k/QgOgdENkHs5Qlf4ZFtR1NUx6+V/wtHVITcRWC0nB MkoOHwoYyfnnKJD3LckF9YyxoJuvslmX0JxSxDQXjKx12Unt/USqyNTeKQdCv5p1M87z 7BOeH0q+I1hBssw4RklQLdeICuO/GLhXBLVVRjotAIfBckoPcA0+O60z9M+qt1Gh0T/9 357Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=zRJZs7oU; 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=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si3443972edq.528.2020.09.07.10.57.00; Mon, 07 Sep 2020 10:57:22 -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=@zx2c4.com header.s=mail header.b=zRJZs7oU; 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=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729310AbgIGRzp (ORCPT + 99 others); Mon, 7 Sep 2020 13:55:45 -0400 Received: from mail.zx2c4.com ([192.95.5.64]:54687 "EHLO mail.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728837AbgIGLWJ (ORCPT ); Mon, 7 Sep 2020 07:22:09 -0400 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 4f628d7c for ; Mon, 7 Sep 2020 10:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=UWABFLx4gijMUsV+BmYYHu/Lcyw=; b=zRJZs7 oUMaeEeScrwICugCBu1YfRUqkHjvT9emNZcAU4XVOzOjeraNLMtz5kFGpMSMAf8b O3/Sj0ahXeIQXG8VX2uTzElWBs3vMwcPR4lSZWYpke0oYmRYAWu/VUbRPcwlCHQB MFnxdc9F2Ow4gEuOuva1SKu3GLz/Zv0xQgOFoN0QIhZ7a7L+jZejrSbaVaqxQhPv GG5YIdGszkQhZWKoocLKwkDZAv+Owza8XiX/f/eD20oe82eQXpaTwgEia0njOGIF P6mQtoXgdAQIxpHwt2Y2fYkPv9VIS880A9CRn89eBeSX1xk4Qne6ddFoGR/0z3O3 dRQx8bhiUhnlGPlA== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 17d29926 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 7 Sep 2020 10:46:41 +0000 (UTC) Received: by mail-io1-f43.google.com with SMTP id j2so13554902ioj.7 for ; Mon, 07 Sep 2020 04:15:26 -0700 (PDT) X-Gm-Message-State: AOAM533VBFfVNMotymTlW9/NiH7ojRgjNaHo/o3QqeFTeflCvze73uaQ MANHzBkdLrFkvkG3b0y/G4pQNAvafuHb5gn1Abg= X-Received: by 2002:a6b:b98a:: with SMTP id j132mr16900984iof.67.1599477325901; Mon, 07 Sep 2020 04:15:25 -0700 (PDT) MIME-Version: 1.0 References: <20200907094843.1949-1-Jason@zx2c4.com> <20200907100647.GB10657@zn.tnic> <20200907111109.GB16029@zn.tnic> In-Reply-To: <20200907111109.GB16029@zn.tnic> From: "Jason A. Donenfeld" Date: Mon, 7 Sep 2020 13:15:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX To: Borislav Petkov Cc: Srinivas Pandruvada , kitsunyan , X86 ML , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 7, 2020 at 1:11 PM Borislav Petkov wrote: > > Hi, > > On Mon, Sep 07, 2020 at 12:46:35PM +0200, Jason A. Donenfeld wrote: > > Are you sure that intel-undervolt using OC_MAILBOX from userspace is > > actually a "misuse"? Should the kernel or kernel drivers actually be > > involved with the task of underclocking? This seems pretty squarely in > > the realm of "hobbyists poking and prodding at their CPUs" rather than > > something made for a kernel driver, right? > > The only thing I'm sure is that *if* it makes sense for any driver to > control something in the hardware over MSRs, it should *not* poke at > naked MSRs but use a proper interface. > > I'd leave it to the people who actually need this interface, to explain > why they do. > > > Also, what was the justification for whitelisting > > MSR_IA32_ENERGY_PERF_BIAS? > > That's: > > tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c > > Once that thing gets converted to a proper interface too, that MSR goes > off the allowlist too. Gotcha. So your perspective is that the goal is actually to have no list at all in the end, because all MSR writes should go through sysfs interfaces and such, always? I certainly like that goal -- it'd make a whole lot of CPU functionality a lot more discoverable and easier to tinker with. In practice, it seems like that's a hard goal to accomplish, with different MSRs having different semantics and meanings of different bit offsets, and a great deal of them aren't actually publicly documented by Intel. Were you hoping to just handle these piece by piece, and eventually Linux will have a decent compendium of MSRs? That sure would be nice. Is Intel on board with that plan? Jason