public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Andrew Honig <ahonig@google.com>, kvm <kvm@vger.kernel.org>,
	Eric Northup <digitaleric@google.com>
Subject: Re: KVM: x86: drop alignment checks from KVM_MSR_SYSTEM_TIME address
Date: Thu, 11 Apr 2013 13:05:45 -0300	[thread overview]
Message-ID: <20130411160544.GA20855@amt.cnet> (raw)
In-Reply-To: <20130323141211.GA26995@redhat.com>

On Sat, Mar 23, 2013 at 04:12:11PM +0200, Gleb Natapov wrote:
> On Fri, Mar 22, 2013 at 05:17:38PM -0700, Andrew Honig wrote:
> > kvm_write_guest would work, but it will hurt performance a bit because
> > it'll be doing the address translation each time the time is updated,
> > which happens on most guest enters.
> > 
> Time updates are rare, so this should no be an issue. Marcelo?

Yes, performance is not an issue at this level.

> > Another possibility would be to change kvm_gfn_to_hva_cache_init to
> > accept a size parameter.  If the requested range is all on one page
> > then it operates the same as it currently does.  If the address range
> > is on more than one page then it falls back to kvm_write_guest.  This
> > preserves the good performance for all cases that currently work,
> > while still supporting the unlikely case of page straddling requests.
> > It also makes it harder to write a security bugs for other callers of
> > kvm_gfn_to_hva_cache_init by explicitly requiring a size parameter.
> > 
> > I can write a patch if you like the idea.
> Nice idea. Send a patch please.
> 

      reply	other threads:[~2013-04-11 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 19:14 KVM: x86: relax MSR_KVM_SYSTEM_TIME alignment check Marcelo Tosatti
2013-03-22 19:21 ` Gleb Natapov
2013-03-22 19:47   ` Marcelo Tosatti
2013-03-22 21:19     ` KVM: x86: drop alignment checks from KVM_MSR_SYSTEM_TIME address Marcelo Tosatti
2013-03-22 21:57       ` Gleb Natapov
2013-03-23  0:17         ` Andrew Honig
2013-03-23 14:12           ` Gleb Natapov
2013-04-11 16:05             ` Marcelo Tosatti [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=20130411160544.GA20855@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=ahonig@google.com \
    --cc=digitaleric@google.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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