All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Jim Mattson <jmattson@google.com>
Cc: "Wanpeng Li" <kernellwp@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"kvm list" <kvm@vger.kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@hotmail.com>
Subject: Re: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory
Date: Wed, 29 Nov 2017 12:56:24 -0800	[thread overview]
Message-ID: <20171129205624.GD3070@tassilo.jf.intel.com> (raw)
In-Reply-To: <CALMp9eSmqa8Wgvcwa=58CvBndfKQ6N_Uf8HTpMPe8WC_gM-iGA@mail.gmail.com>

On Wed, Nov 29, 2017 at 11:05:46AM -0800, Jim Mattson wrote:
> An alternative is to give the L1 guest read permission for this MSR in
> the MSR permission bitmaps. It's still going to be ~80 cycles, but
> that's better than the cost of a VM-exit/VM-entry round-trip.

It's a useful optimization, 80 cycles is 80 cycles.

The cache invalidation could likely be really simple, like:
have a global counter
always check the counter before and after and don't use the cache
if they don't match.
change KDB etc. to increase the counter.

-Andi

  reply	other threads:[~2017-11-29 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  6:07 [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory Wanpeng Li
2017-11-29  8:48 ` Paolo Bonzini
2017-11-29  8:51   ` Wanpeng Li
2017-11-29  9:13     ` Paolo Bonzini
2017-11-29  9:20       ` Wanpeng Li
2017-11-29 18:20 ` Andi Kleen
2017-11-29 19:05   ` Jim Mattson
2017-11-29 20:56     ` Andi Kleen [this message]
2017-11-29 22:26   ` Paolo Bonzini
2017-11-29 22:45     ` Andi Kleen

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=20171129205624.GD3070@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=jmattson@google.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.com \
    /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.