Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4876353pxu; Wed, 21 Oct 2020 07:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbi1vcV1cTMaAI9yMvVdb5rMJS2TYpiJ+deDahjObYYI+YniMjDYC7i+1I3tli6/JGdPNS X-Received: by 2002:a17:907:20d9:: with SMTP id qq25mr3713408ejb.149.1603290654175; Wed, 21 Oct 2020 07:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603290654; cv=none; d=google.com; s=arc-20160816; b=caSSn6Zq0XDnls43oLWEjh6t5tmc9AI0+/imj6+skLSOOM48f1pgJ9E26zC9aIwVqD 558c+0ze9KmI0Um43/JlIZ0wD52iwA1IpdZQ7V1kzFZZSirEak6mRKetCAdk+7nmnSrz LNQnz+w005IByw+JZtj+f+AadyCwlVwEN0oCExzoa57iR89Zgq9dzH416h2XgqdBmmxj A4n6OeIkfF1MMJZXkcPAPgWror5ZIylAkAuVSYp6ESISLIZONvoNa0Ep4YuK6feA/iz/ q882xy4hqPyUPcVpsKTauyH1lZHfcjuHF6pa9I7/TX5scBm3cyY6w6CWYLFJIzLDFz0e P5Qw== 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:dkim-signature; bh=KNjLuE+NLkfGPbq1lu/To3yOPZPN2B2pNyqLHOolRRE=; b=l8Q4JsWXZzlz0HR4UBFLwuYmZehkdf9/1fruL0yp0HLdYdbvjgJsfpcblM+zZYDBPg q8HZInaljmEATWTtXLOJaPi7/eRkE45D9UT/P3luH1FvRRwE91lccrmEyxAUYKlKhmjG OhzFDbxOcu5RJ39lILqEFdeEkQP9/cxmSxDRf7yJd3mnR1oZ7I5q09iP+vEfDNznG0fY HoEz5WzvS77XVaaZLcW457mZKvCjZax5beJJHg3EnhDiLfXzltDl2GLGbWMJz2zeWvMg ohBYKy7r0/AD6FzetWCB2KR2X3ZajEGejgeQS65rLxMWg1RjOsikMdkUy7VrXQ7MtQkg HMKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jpm9Ut78; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si1482550edf.377.2020.10.21.07.30.32; Wed, 21 Oct 2020 07:30:54 -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=@infradead.org header.s=casper.20170209 header.b=jpm9Ut78; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441536AbgJUNYw (ORCPT + 99 others); Wed, 21 Oct 2020 09:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441531AbgJUNYv (ORCPT ); Wed, 21 Oct 2020 09:24:51 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8997AC0613CE for ; Wed, 21 Oct 2020 06:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KNjLuE+NLkfGPbq1lu/To3yOPZPN2B2pNyqLHOolRRE=; b=jpm9Ut78bP+z8IZy7hhv9lPDjj +u0TZX6ynhTZ16ryDXa1eFRPeAol5c/2piLqoi+vttL524MzbavLgv3i+FlQvJR5wrjuql+F73Xu6 MAerW0fo93osvxcJJlAiBbF7s06tu0Gshtflz3ng+CccXSZwweBj3+95dYsRGh/kj+/UWfwtNNJZs yPcTDBsQqdwjA/LHNKucLTO382Kr+8lYD1TjzhseoXHJqlRt9+SSAzeZvugPP2qnlYTJ+gWdD9ugP F7lpmsKf5KgpU+UZrYONND+w4v+7WSwwJhwTrKMGr/bEFiRYCpBxFlq81yu1N3pleurFCUXWHoMfW aC7aEK2w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVE6X-0000xK-MF; Wed, 21 Oct 2020 13:24:38 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EDD5930377D; Wed, 21 Oct 2020 15:24:33 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3450F203CC4BF; Wed, 21 Oct 2020 15:24:33 +0200 (CEST) Date: Wed, 21 Oct 2020 15:24:33 +0200 From: Peter Zijlstra To: Srinivas Pandruvada Cc: Borislav Petkov , Sultan Alsawaf , "Jason A. Donenfeld" , kitsunyan , "Brown, Len" , X86 ML , LKML , Linus Torvalds Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX Message-ID: <20201021132433.GI2628@hirez.programming.kicks-ass.net> References: <20200908172558.GG25236@zn.tnic> <20200908173656.GI25236@zn.tnic> <20200908180112.GK25236@zn.tnic> <20200908191838.GA2014@sultan-box.localdomain> <20200908193029.GM25236@zn.tnic> <20201019171539.GF24325@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 10:21:48AM -0700, Srinivas Pandruvada wrote: > On Mon, 2020-10-19 at 19:15 +0200, Borislav Petkov wrote: > These command id are model specific. There is no guarantee that even > meaning changes. So I don't think we should write any code in kernel > which can't stick. > > > > In any case, my point is that we could have a sysfs interface for > > those userspace-suppliable values like the undervolt value at > > [31:21], > > dunno if the index can be inferred by the kernel automatically or > > enumerated and the commands we should issue ourselves depending on > > the > > functionality, etc. Why not have a full undervolt driver. That is, don't expose OC_MAILBOX _at_all_, but have a model specific driver that provides undervolt capabilities. Someone is now maintaining this thing in userspace, might as well do it as a kernel driver and keep all the icky bits inside.