public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Jim Mattson <jmattson@google.com>,
	Wanpeng Li <wanpeng.li@hotmail.com>
Subject: Re: [PATCH] KVM: vmx: shadow more fields that are read/written on every vmexits
Date: Wed, 13 Dec 2017 16:08:41 -0500 (EST)	[thread overview]
Message-ID: <420706749.26867429.1513199321742.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171213155947.GN10097@char.us.oracle.com>



----- Original Message -----
> From: "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Jim Mattson" <jmattson@google.com>, "Wanpeng Li"
> <wanpeng.li@hotmail.com>
> Sent: Wednesday, December 13, 2017 4:59:47 PM
> Subject: Re: [PATCH] KVM: vmx: shadow more fields that are read/written on every vmexits
> 
> On Wed, Dec 13, 2017 at 01:13:56PM +0100, Paolo Bonzini wrote:
> > Compared to when VMCS shadowing was added to KVM, we are reading/writing
> > a few more fields: the PML index, the interrupt status and the preemption
> > timer value.  The first two are because we are exposing more features
> > to nested guests, the preemption timer is simply because we have grown
> > a new optimization.  Adding them to the shadow VMCS field lists reduces
> > the cost of a vmexit by about 1000 clock cycles for each field that exists
> > on bare metal.
> > 
> > On the other hand, the guest BNDCFGS and TSC offset are not written on
> > fast paths, so remove them.
> 
> Which guest types? Linux? What about Windows Hyper-V /VMWare and such?

Only KVM, but I don't see why any other hypervisor would have to
write them more than once per MSR access.  VMWRITEs do have a (small but
visible) cost.

> Does it hurt to have them retained?

It does cost a little, though another patch I posted decreases that cost.

Paolo

      reply	other threads:[~2017-12-13 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 12:13 [PATCH] KVM: vmx: shadow more fields that are read/written on every vmexits Paolo Bonzini
2017-12-13 15:59 ` Konrad Rzeszutek Wilk
2017-12-13 21:08   ` Paolo Bonzini [this message]

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=420706749.26867429.1513199321742.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox