public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <namit@cs.technion.ac.il>
Cc: joro@8bytes.org, kvm@vger.kernel.org, nadav.amit@gmail.com
Subject: Re: [PATCH 2/2] KVM: vmx: Reflect misc_enables in real CPU
Date: Thu, 21 Aug 2014 13:51:07 +0200	[thread overview]
Message-ID: <53F5DD2B.6080808@redhat.com> (raw)
In-Reply-To: <1408543109-30687-3-git-send-email-namit@cs.technion.ac.il>

Il 20/08/2014 15:58, Nadav Amit ha scritto:
> IA32_MISC_ENABLE MSR has two bits that affect the actual results which can be
> observed by the guest: fast string enable, and FOPCODE compatibility.  Guests
> may wish to change the default settings of these bits.
> 
> Linux usually enables fast-string by default. However, when "fast string" is
> enabled data breakpoints are only recognized on boundaries between data-groups.
> On some old CPUs enabling fast-string also resulted in single-step not
> occurring upon each iteration.
> 
> FOPCODE compatibility can be used to analyze program performance by recording
> the last instruction executed before FSAVE/FSTENV/FXSAVE.
> 
> This patch saves and restores these bits in IA32_MISC_ENABLE if they are
> supported upon entry to guest and exit to userspace respectively.  To avoid
> possible issues, fast-string can only be enabled by the guest if the host
> enabled them. The physical CPU version is checked to ensure no shared bits are
> reconfigured in the process.

Maybe I'm dense :) but why are you saying upon exit to userspace?  It is
switched upon VM exit simply.  In fact I was thinking you'd use
kvm_set_shared_msr for this, but it looks like you aren't doing that.

Paolo

  reply	other threads:[~2014-08-21 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 13:58 [PATCH 0/2] KVM: vmx: Supporting IA32_MISC_ENABLE MSR Nadav Amit
2014-08-20 13:58 ` [PATCH 1/2] KVM: x86: update cpuid according to IA32_MISC_ENABLE Nadav Amit
2014-08-20 13:58 ` [PATCH 2/2] KVM: vmx: Reflect misc_enables in real CPU Nadav Amit
2014-08-21 11:51   ` Paolo Bonzini [this message]
2014-08-21 12:28     ` Nadav Amit
2014-08-20 14:00 ` [PATCH] x86: Test debug exceptions with disabled fast-string Nadav Amit

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=53F5DD2B.6080808@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=namit@cs.technion.ac.il \
    /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