qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Jingqi Liu <jingqi.liu@intel.com>
Cc: pbonzini@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org,
	wei.w.wang@intel.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] i386: Add support to get/set/migrate MSR (33H)
Date: Wed, 4 Jul 2018 16:43:27 -0300	[thread overview]
Message-ID: <20180704194327.GJ914@localhost.localdomain> (raw)
In-Reply-To: <1530710466-88309-1-git-send-email-jingqi.liu@intel.com>

On Wed, Jul 04, 2018 at 09:21:06PM +0800, Jingqi Liu wrote:
> The MSR (33H) controls support for #AC exception
> for split locked accesses. When bit 29 of the MSR (33H)
> is set, the processor causes an #AC exception to
> be issued instead of suppressing LOCK on bus
> (during split lock access).
> 
> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
[...]
> diff --git a/target/i386/machine.c b/target/i386/machine.c
> index 4d98d36..c82dc0d 100644
> --- a/target/i386/machine.c
> +++ b/target/i386/machine.c
> @@ -935,6 +935,25 @@ static const VMStateDescription vmstate_msr_virt_ssbd = {
>      }
>  };
>  
> +static bool split_lock_ctrl_needed(void *opaque)
> +{
> +    X86CPU *cpu = opaque;
> +    CPUX86State *env = &cpu->env;
> +
> +    return env->split_lock_ctrl != 0;
> +}

Based on the Linux patch at [1], guests may try to detect the
feature by writing to the MSR unconditionally.

If this happens, KVM needs to provide a mechanism to
enable/disable the MSR emulation.  Otherwise users will end up
with VMs that can't be migrated to older hosts even if they are
using older machine-types.

[1] https://lkml.org/lkml/2018/6/29/408

-- 
Eduardo

  parent reply	other threads:[~2018-07-04 19:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 13:21 [Qemu-devel] [PATCH] i386: Add support to get/set/migrate MSR (33H) Jingqi Liu
2018-07-04 13:39 ` Paolo Bonzini
2018-07-06  8:32   ` Liu, Jingqi
2018-07-04 19:43 ` Eduardo Habkost [this message]
2018-07-06  8:38   ` Liu, Jingqi
2018-07-06  8:43   ` Daniel P. Berrangé
2018-07-06  9:31     ` Paolo Bonzini
2018-07-06 11:42       ` Eduardo Habkost

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=20180704194327.GJ914@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=jingqi.liu@intel.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=wei.w.wang@intel.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;
as well as URLs for NNTP newsgroup(s).