qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] i386: Add support to get/set/migrate MSR (33H)


From: Liu, Jingqi
Subject: Re: [Qemu-devel] [PATCH] i386: Add support to get/set/migrate MSR (33H)
Date: Fri, 6 Jul 2018 08:38:22 +0000

On 05/07/2018 03:43, Eduardo Habkost wrote:
> 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 <address@hidden>
> [...]
> > 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.
> 
Hi Eduardo,
Thanks for your review, will provide the mechanism in next version.
Jingqi

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]