All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: speck@linutronix.de
Subject: Re: [PATCH v2 4/4] L1TF KVM ARCH_CAPABILITIES #4
Date: Tue, 31 Jul 2018 09:59:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1807310958500.1725@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1639d83d-58a5-6c4f-8df5-0e4582c96b75@redhat.com>

y1;5202;0cOn Tue, 31 Jul 2018, speck for Paolo Bonzini wrote:
> On 30/07/2018 23:36, speck for Thomas Gleixner wrote:
> >> +u64 kvm_get_arch_capabilities(void)
> >> +{
> >> +	u64 data;
> >> +
> >> +	rdmsrl_safe(MSR_IA32_ARCH_CAPABILITIES, &data);
> >> +	if (l1tf_vmx_mitigation != VMENTER_L1D_FLUSH_NEVER)
> >> +		data |= ARCH_CAP_SKIP_VMENTRY_L1DFLUSH;
> > 
> > That really wants a comment explaining the magic here.
> 
> Something like:
> 
> 	/*
> 	 * If we're doing cache flushes (either "always" or "cond")
> 	 * we will do one whenever the guest does a vmlaunch/vmresume.
> 	 * If an outer hypervisor is doing the cache flush for us
> 	 * (VMENTER_L1D_FLUSH_NESTED_VM), we can safely pass that
> 	 * capability to the guest too, and if EPT is disabled we're not
> 	 * vulnerable.  Overall, only VMENTER_L1D_FLUSH_NEVER will
> 	 * require a nested hypervisor to do a flush of its own.
> 	 */
> 
> ?

Works for me.

  reply	other threads:[~2018-07-31  7:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 14:30 [MODERATED] [PATCH v2 0/4] L1TF KVM ARCH_CAPABILITIES #0 Paolo Bonzini
2018-07-25 14:30 ` [MODERATED] [PATCH v2 1/4] L1TF KVM ARCH_CAPABILITIES #1 Paolo Bonzini
2018-07-25 19:43   ` [MODERATED] " Andrew Cooper
2018-07-26  8:15     ` Paolo Bonzini
2018-07-25 14:30 ` [MODERATED] [PATCH v2 2/4] L1TF KVM ARCH_CAPABILITIES #2 Paolo Bonzini
2018-07-30 21:27   ` Thomas Gleixner
2018-07-31  8:22     ` [MODERATED] " Paolo Bonzini
2018-07-31  9:15       ` Thomas Gleixner
2018-07-31  9:35         ` [MODERATED] " Paolo Bonzini
2018-07-25 14:30 ` [MODERATED] [PATCH v2 3/4] L1TF KVM ARCH_CAPABILITIES #3 Paolo Bonzini
2018-07-25 14:31 ` [MODERATED] [PATCH v2 4/4] L1TF KVM ARCH_CAPABILITIES #4 Paolo Bonzini
2018-07-30 21:36   ` Thomas Gleixner
2018-07-31  7:39     ` [MODERATED] " Paolo Bonzini
2018-07-31  7:59       ` Thomas Gleixner [this message]
2018-07-25 15:52 ` [MODERATED] Re: [PATCH v2 0/4] L1TF KVM ARCH_CAPABILITIES #0 Greg KH
2018-07-26  8:12   ` Paolo Bonzini
2018-07-26 10:04     ` Greg KH
2018-07-26 10:41       ` Paolo Bonzini
2018-07-30 21:40         ` Thomas Gleixner
2018-08-02  2:51 ` [MODERATED] " Konrad Rzeszutek Wilk
2018-08-02 12:07   ` Paolo Bonzini

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=alpine.DEB.2.21.1807310958500.1725@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --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.