Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp833270ybt; Wed, 8 Jul 2020 12:52:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweMsRThOCWLEXKsa2a/uudT83cMY1aX0+aqEMBWOYp0je1kybes+9OIgLCRTypPG1D4i0e X-Received: by 2002:aa7:c887:: with SMTP id p7mr55171155eds.240.1594237967374; Wed, 08 Jul 2020 12:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594237967; cv=none; d=google.com; s=arc-20160816; b=g0+v5rNsZK1yxvnibN2uRD826TyIddjEk3JPtmzFAbG7hnU4N/aRTKf2Mk5DVENzt/ THFmVH4zWx6dL4q0a3wkCS/R0CaYHkN/pqt2UKRSDXjYvCcLSSrmBOtEUjDiROQWeCxz xA7XmXkolRi8lPFqBQPFoQW9SrqHKu944b9EVE3dYBETyhIDBeA7B0MCg3rEyzLBIDnF wJ7dn3dqFYVtU15yE09oWVjBKDBwzvVBvH00bdSRAz/mHExP6uV3GRz+vnCwbH9iViVF 2BdH9kkADuJxI3s77dC/mF3DkiLthZPyCBlwve8jc2aJo2p7chCwSARBH9IK0tSXIi3h 35pA== 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=I9bO2SvLDKet0zC0FnvNLQImEbF2fhapt4H2nUguyC4=; b=TrbqPJKjP35XRVPOUJFKaEADB+xrgFsQLtRhnXproIA8PZ+2BvkvIsfgnrttufCh1Z egSFqT6/NDYIETH8BXM6EH21t8IlEiQZFWvVGi7Ie99pqx3HV+4UGzdtL5zeW/2QdEga oHqhzAwtSWpxyR6dEpbKVqbjl+9MaX4mtevY8uVKeDhLJX/cwqOv8FIgMfwYMfxNmQPJ XM761D5dPRUnO3afueBtrt4hoo74c62xNoTUl5DTZMmE747TEcckpeWI4Avg12Lco/l6 epeGhadAZdxw0wFYvGXs3jukp5CiXlY41IHzRGQbaOiBDXiVYb69tZhTOMiFvCBH9fAs KarA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VQMutR39; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si476197ejq.296.2020.07.08.12.52.23; Wed, 08 Jul 2020 12:52:47 -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=@google.com header.s=20161025 header.b=VQMutR39; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726122AbgGHTt5 (ORCPT + 99 others); Wed, 8 Jul 2020 15:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgGHTt4 (ORCPT ); Wed, 8 Jul 2020 15:49:56 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72AF1C061A0B for ; Wed, 8 Jul 2020 12:49:56 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id h16so5120ilj.11 for ; Wed, 08 Jul 2020 12:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I9bO2SvLDKet0zC0FnvNLQImEbF2fhapt4H2nUguyC4=; b=VQMutR39qCwX+rzcpy2tnhenXy7JQ8m0tuhbilG4X7au0sVK1MdJWPjVT1I6rFd/6W LpKtfFBaByCEYDWOL2MDdF9Zyd7eeeORwzRTzNepJvCCMyDv9T7TZRGDNwtRE5DS9ouU aWKzFsbyiwBaAGEKDO2+5uy1AYd8ZkMuQaIYc9d/yUdQoJKhtbGmSGKpDzHWkxkZS9AP r90hG4a6m9XEZMi0Iz8yHPEs00oqG4JYNAMRgNKIC+lW7VShiPEn0JOgrhBLMinkSDHf JkdNPXBIzQmQJfnkq0X+y30oG6/81fjweNvbjVXrd+8OsllzRICCvoyI9bTxiJueNfPG BWEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I9bO2SvLDKet0zC0FnvNLQImEbF2fhapt4H2nUguyC4=; b=NIT8et2A3g+prmmQfbqWjAHJe+D1MvtKlIa0GZDZQ4T6F7Y7tmGVDIv6cEBQ/Wt//u BSFITOwOgxtQJ72WJI7rn7FJ91MvWJfhL83kBxTnol0AalVJSWEFN34jSBPUIxHuJ+Pr n2Oy5rM0al+3sqO1MIcz7qpdHMVpSDy+NQU2tu5C2ygr8GUOpq3GdO9FuVJ06kA8rKs/ b53PfAvCOeHxCWswmU1OQHeFx3VOzC9rthkb8XbrzIFuw5/qaLqvyA0DwyUo0QHB4Sly 0HPzZGDNF6qC+0VlPp1s02W54gT6EoqgOeWTLejt2RBdaxxItrbAK1xavpfqyqg/vazP b36w== X-Gm-Message-State: AOAM533uJeGgtnbnFTfmycVJk3fmbPfGHdOL53zFGX3Q+ukswJSEiyve 3HbRvMLzbUAKxv634YfNAx3/wNnNNtDtQEX8jZilaA== X-Received: by 2002:a92:b685:: with SMTP id m5mr43580715ill.118.1594237794192; Wed, 08 Jul 2020 12:49:54 -0700 (PDT) MIME-Version: 1.0 References: <20200708192546.4068026-1-abhishekbh@google.com> <06f15327-f346-fb8d-cc8e-8e12c398324d@infradead.org> In-Reply-To: <06f15327-f346-fb8d-cc8e-8e12c398324d@infradead.org> From: Abhishek Bhardwaj Date: Wed, 8 Jul 2020 12:49:17 -0700 Message-ID: Subject: Re: [PATCH v4] x86/speculation/l1tf: Add KConfig for setting the L1D cache flush mode To: Randy Dunlap Cc: LKML , Anthony Steinhauser , Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Mark Gross , Mike Rapoport , Paolo Bonzini , Pawan Gupta , Peter Zijlstra , Sean Christopherson , Thomas Gleixner , Tony Luck , Vitaly Kuznetsov , Waiman Long , Wanpeng Li , kvm@vger.kernel.org, x86 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 Wed, Jul 8, 2020 at 12:34 PM Randy Dunlap wrote: > > Hi again, > > On 7/8/20 12:25 PM, Abhishek Bhardwaj wrote: > > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > > index b277a2db62676..1f85374a0b812 100644 > > --- a/arch/x86/kvm/Kconfig > > +++ b/arch/x86/kvm/Kconfig > > @@ -107,4 +107,17 @@ config KVM_MMU_AUDIT > > This option adds a R/W kVM module parameter 'mmu_audit', which allows > > auditing of KVM MMU events at runtime. > > > > +config KVM_VMENTRY_L1D_FLUSH > > + int "L1D cache flush settings (1-3)" > > + range 1 3 > > + default "2" > > + depends on KVM && X86_64 > > + help > > + This setting determines the L1D cache flush behavior before a VMENTER. > > + This is similar to setting the option / parameter to > > + kvm-intel.vmentry_l1d_flush. > > + 1 - Never flush. > > + 2 - Conditionally flush. > > + 3 - Always flush. > > + > > endif # VIRTUALIZATION > > If you do a v5, the help text lines (under "help") should be indented > with one tab + 2 spaces according to Documentation/process/coding-style.rst. Apologies for missing this. Fixed in v5 - https://lkml.org/lkml/2020/7/8/1369 > > -- > ~Randy > -- Abhishek