From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06F97C35E15 for ; Tue, 25 Feb 2020 21:08:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC47224650 for ; Tue, 25 Feb 2020 21:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728968AbgBYVIo (ORCPT ); Tue, 25 Feb 2020 16:08:44 -0500 Received: from mga07.intel.com ([134.134.136.100]:33592 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbgBYVIo (ORCPT ); Tue, 25 Feb 2020 16:08:44 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 13:08:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,485,1574150400"; d="scan'208";a="256082558" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by orsmga002.jf.intel.com with ESMTP; 25 Feb 2020 13:08:43 -0800 Date: Tue, 25 Feb 2020 13:08:43 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 48/61] KVM: x86: Do host CPUID at load time to mask KVM cpu caps Message-ID: <20200225210843.GI9245@linux.intel.com> References: <20200201185218.24473-1-sean.j.christopherson@intel.com> <20200201185218.24473-49-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Feb 25, 2020 at 04:18:12PM +0100, Paolo Bonzini wrote: > On 01/02/20 19:52, Sean Christopherson wrote: > > +#ifdef CONFIG_KVM_CPUID_AUDIT > > + /* Entry needs to be fully populated when auditing is enabled. */ > > + entry.function = cpuid.function; > > + entry.index = cpuid.index; > > +#endif > > This shows that the audit case is prone to bitrot, which is good reason > to enable it by default. I have no argument against that, especially since I missed this case during development and only caught it when running on a different system that I had happened to configure with CONFIG_KVM_CPUID_AUDIT=y. :-)