From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 08 Aug 2018 21:21:42 -0000 Received: from userp2120.oracle.com ([156.151.31.85]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fnVtj-00069M-Sz for speck@linutronix.de; Wed, 08 Aug 2018 23:21:41 +0200 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w78LIcXO047388 for ; Wed, 8 Aug 2018 21:21:33 GMT Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2kn4spyhcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 08 Aug 2018 21:21:33 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w78LLWQQ029346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 8 Aug 2018 21:21:32 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w78LLWBe008460 for ; Wed, 8 Aug 2018 21:21:32 GMT Date: Wed, 8 Aug 2018 17:21:31 -0400 From: Konrad Rzeszutek Wilk Subject: [MODERATED] Re: [PATCH 2/2] Guest L1D flush Message-ID: <20180808212131.GC17507@char.us.oracle.com> References: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Wed, Aug 08, 2018 at 12:15:06PM -0700, speck for Jim Mattson wrote: > [patch 2/2] kvm: x86: Expose X86_FEATURE_FLUSH_L1D to kvm guests > > If this feature is available on the host, it can be exposed to a kvm > guest. Are you sure? I was reading the docs and nothing in it said to do this. In fact the doc suggests that this should not be done in the first place and instead the ARCH_CAPABILITIES Bit 3 is to be exposed. > > Signed-off-by: Jim Mattson > Reviewed-by: Ben Serebrin > Reviewed-by: Peter Shier > --- > arch/x86/kvm/cpuid.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > index 7e042e3d47fd5..2a62270d82b69 100644 > --- a/arch/x86/kvm/cpuid.c > +++ b/arch/x86/kvm/cpuid.c > @@ -411,7 +411,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, > /* cpuid 7.0.edx*/ > const u32 kvm_cpuid_7_0_edx_x86_features = > F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | > - F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES); > + F(SPEC_CTRL_SSBD) | F(FLUSH_L1D) | F(ARCH_CAPABILITIES); > > /* all calls to cpuid_count() should be made on the same cpu */ > get_cpu(); > -- > 2.18.0.597.ga71716f1ad-goog > >