Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp613314ybt; Fri, 19 Jun 2020 09:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSz/dVJonUEjrPcJ0t02y8SKLO3cEaNanoNFtgrVk+G+4VnbA/3m8EJXynUCF/iSw38+lY X-Received: by 2002:a50:8e16:: with SMTP id 22mr4178118edw.273.1592583662575; Fri, 19 Jun 2020 09:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592583662; cv=none; d=google.com; s=arc-20160816; b=T5dAvREgEKjk7Tyo0fvQwXKwyOd9Sl0JiTK+Nxo3dCYL8DKO9/kRcqawXW5fq63OqJ XY/AwyJFqqFmrwvHrV9qHE/rIjTCjjN73ygLGZJ8KOiGwJmUDG0zWxpN6Ifx3aTjeE2e gUX4NdnLncjH03/LHNHoNc4MgN0+IJTyaygkAamSjNmWnc7onFcFvSmGapHrN2I7CBQe bFJ0ee/D0KQ1hutCes1KA/EOj80flk2NzDCBNj+ZdL0JzG4pvHrJPUHtGedzEiJECOOA wJGQRRW5U/TKIFsB6DBpUBlihCrNKHGNJua0AJgdFFo6YOxB0ibVVcRWNC2o2ZEmPbJ/ kpIg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oPWzOPUAYvnkXbuBTGUDVQqq6X+OUqRfxYb0CIRI0L4=; b=Or+iQsVhXXnoB5O38vJwPT629T1xiMoy9ffYgAzyJm2fPx0IzG3Cx9tJWxqTRpMpIy bYDG2F7ZKiLWmdrKfXzfAiZrVPUgtV5sKdleJ6ydApeEeqTru2ihcmHGEKS0cNcwt1ko X55cUdMNVh1HPYZdt/Qtif4nszd/ORZDcFYZN51Bob6Fd/KX4eTgpWb9vJa1BesfZyV+ wNu79ZiL6xexxZnTUKA/DteI/NAod59Lj1N7ONfcpFw0j2JUUPy03nwYt8vp38CTvi3P 4O7Rt/Z8fhIzP8phS66v2caaGNlg07pboiWHROGT/7OJ7Pirqse+MnVyh1f3R609LWsv Yrug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="o/ZeO8Fm"; 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 rn10si4309344ejb.680.2020.06.19.09.20.40; Fri, 19 Jun 2020 09:21:02 -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="o/ZeO8Fm"; 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 S2394533AbgFSQSA (ORCPT + 99 others); Fri, 19 Jun 2020 12:18:00 -0400 Received: from mail.skyhub.de ([5.9.137.197]:50584 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394530AbgFSQRz (ORCPT ); Fri, 19 Jun 2020 12:17:55 -0400 Received: from zn.tnic (p200300ec2f0bac00b008f297983004b5.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:ac00:b008:f297:9830:4b5]) (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 7BDF11EC02AC; Fri, 19 Jun 2020 18:17:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1592583474; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oPWzOPUAYvnkXbuBTGUDVQqq6X+OUqRfxYb0CIRI0L4=; b=o/ZeO8Fmj8Yun6hHjkFtMOFkTbv0PhORp021YwzZrPDwbx/rtT9D5+vrRZxb7hl3WVZz8U EMLWfNuBilB1c4WHqva+tTL1wIBZQHdE1skOQfgOOKYhXlJ+VLRZgO/9e0Eea64WNwMIse X7JBIxA1hNCG7NnHPUjapyeKNh//vZk= Date: Fri, 19 Jun 2020 18:17:52 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: Richard Hughes , Daniel Gutson , Dave Hansen , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Greg Kroah-Hartman , Peter Zijlstra , "David S. Miller" , Rob Herring , Tony Luck , Rahul Tanwar , Xiaoyao Li , Sean Christopherson , Dave Hansen , linux-kernel Subject: Re: [PATCH] Ability to read the MKTME status from userspace Message-ID: <20200619161752.GG32683@zn.tnic> References: <0DD7FAE4-3976-4835-8090-80B84B737F3E@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0DD7FAE4-3976-4835-8090-80B84B737F3E@amacapital.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 08:48:47AM -0700, Andy Lutomirski wrote: > Boris, it wouldn’t be totally crazy for cpuinfo to learn to > distinguish between “your platform has this feature but Linux > isn’t using it” and “your platform doesn’t have this feature > in the first place”. And I suppose there’s this extra silly state > “your platform has this feature, but your firmware didn’t enable > it”. This would be a big job. Well, I believe all the kernel can do is supply bits of information - just like MSRs - and depending on the settings of those bits, userspace can decide what the situation is. For example: bit 0 - CPUID support bit 1 - BIOS enabled bit 2 - quirk applied bit 3 - microcode fixes present ... and so on. It needs a proper definition though and userspace to say, yes, we want that and that is useful for us. Where it ends up is then beside the point - /proc/cpuinfo, /sys/devices/system/cpu, whatever... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette