From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, mtosatti@redhat.com
Subject: Re: [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator
Date: Thu, 19 Jul 2012 15:54:23 +0300 [thread overview]
Message-ID: <20120719125423.GC26120@redhat.com> (raw)
In-Reply-To: <500802FF.3030909@redhat.com>
On Thu, Jul 19, 2012 at 03:52:15PM +0300, Avi Kivity wrote:
> On 07/19/2012 01:51 PM, Gleb Natapov wrote:
>
> >> > +int x86_linearize(struct x86_linearize_params *p, ulong *linear)
> >> > {
> >> > - struct desc_struct desc;
> >> > - bool usable;
> >> > ulong la;
> >> > u32 lim;
> >> > - u16 sel;
> >> > unsigned cpl, rpl;
> >> >
> >> > - la = seg_base(ctxt, addr.seg) + addr.ea;
> >> > - switch (ctxt->mode) {
> >> > + la = get_desc_base(&p->desc) + p->ea;
> >>
> >> This makes 64-bit mode slower, since before the patch it avoided reading
> >> the segment base for non-fs/gs segments, and only read the segment base
> >> for fs/gs. After the patch we always execute 4 VMREADs (and decode the
> >> results).
> >>
> > That's easy to fix by making caller prepare fake desc if mode is 64-bit
> > and segment is non-fs/gs. The question is if this even measurable?
>
> I'm sure it will be measurable, esp. on older processors. Why not
> measure it?
>
>
It is easier to just fix it :) Will do and resend if you are agree with
general approach.
--
Gleb.
next prev parent reply other threads:[~2012-07-19 12:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 7:40 [PATCHv4 0/5] improve speed of "rep ins" emulation Gleb Natapov
2012-07-19 7:40 ` [PATCHv4 1/5] Provide userspace IO exit completion callback Gleb Natapov
2012-07-19 7:40 ` [PATCHv4 2/5] KVM: emulator: make x86 emulation modes enum instead of defines Gleb Natapov
2012-07-19 7:40 ` [PATCHv4 3/5] KVM: emulator: move some address manipulation function out of emulator code Gleb Natapov
2012-07-19 10:42 ` Avi Kivity
2012-07-19 10:49 ` Gleb Natapov
2012-07-19 13:34 ` Avi Kivity
2012-07-19 13:43 ` Gleb Natapov
2012-07-19 7:40 ` [PATCHv4 4/5] KVM: emulator: make linearize() callable from outside of emulator Gleb Natapov
2012-07-19 10:32 ` Avi Kivity
2012-07-19 10:51 ` Gleb Natapov
2012-07-19 12:52 ` Avi Kivity
2012-07-19 12:54 ` Gleb Natapov [this message]
2012-07-19 7:40 ` [PATCHv4 5/5] KVM: Provide fast path for "rep ins" emulation if possible Gleb Natapov
2012-07-19 10:37 ` Avi Kivity
2012-07-19 11:09 ` Gleb Natapov
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=20120719125423.GC26120@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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