All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH 2/2] Guest L1D flush
Date: Wed, 8 Aug 2018 17:21:31 -0400	[thread overview]
Message-ID: <20180808212131.GC17507@char.us.oracle.com> (raw)
In-Reply-To: <CALMp9eQJhU-Nv6WZh9_Q0JFTXWHTBfJ4KHSomMiF8+CEvx27vw@mail.gmail.com>

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 <jmattson@google.com>
> Reviewed-by: Ben Serebrin <serebrin@google.com>
> Reviewed-by: Peter Shier <pshier@google.com>
> ---
>  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
> 
> 

  reply	other threads:[~2018-08-08 21:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 19:15 [MODERATED] [PATCH 2/2] Guest L1D flush Jim Mattson
2018-08-08 21:21 ` Konrad Rzeszutek Wilk [this message]
2018-08-08 22:20   ` [MODERATED] " Jim Mattson
2018-08-08 23:04     ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180808212131.GC17507@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=speck@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.