* [PATCH] VMX: relax incoming BNDCFGS check
@ 2016-05-30 10:05 Jan Beulich
2016-05-31 10:12 ` Andrew Cooper
2016-06-03 2:14 ` Tian, Kevin
0 siblings, 2 replies; 4+ messages in thread
From: Jan Beulich @ 2016-05-30 10:05 UTC (permalink / raw)
To: xen-devel; +Cc: Kevin Tian, Wei Liu, Jun Nakajima
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
Accepting zero here even when !cpu_has_mpx makes the restore side
symmetric to the save logic (which avoids saving the value if zero),
i.e. makes either side independent of the logic on the other side.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -824,7 +824,7 @@ static int vmx_load_msr(struct vcpu *v,
case MSR_IA32_BNDCFGS:
if ( cpu_has_mpx )
__vmwrite(GUEST_BNDCFGS, ctxt->msr[i].val);
- else
+ else if ( ctxt->msr[i].val )
err = -ENXIO;
break;
case MSR_IA32_XSS:
[-- Attachment #2: VMX-restore-allow-zero-BNDCFGS.patch --]
[-- Type: text/plain, Size: 695 bytes --]
VMX: relax incoming BNDCFGS check
Accepting zero here even when !cpu_has_mpx makes the restore side
symmetric to the save logic (which avoids saving the value if zero),
i.e. makes either side independent of the logic on the other side.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -824,7 +824,7 @@ static int vmx_load_msr(struct vcpu *v,
case MSR_IA32_BNDCFGS:
if ( cpu_has_mpx )
__vmwrite(GUEST_BNDCFGS, ctxt->msr[i].val);
- else
+ else if ( ctxt->msr[i].val )
err = -ENXIO;
break;
case MSR_IA32_XSS:
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] VMX: relax incoming BNDCFGS check
2016-05-30 10:05 [PATCH] VMX: relax incoming BNDCFGS check Jan Beulich
@ 2016-05-31 10:12 ` Andrew Cooper
2016-06-03 2:14 ` Tian, Kevin
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2016-05-31 10:12 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Kevin Tian, Wei Liu, Jun Nakajima
On 30/05/16 11:05, Jan Beulich wrote:
> Accepting zero here even when !cpu_has_mpx makes the restore side
> symmetric to the save logic (which avoids saving the value if zero),
> i.e. makes either side independent of the logic on the other side.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] VMX: relax incoming BNDCFGS check
2016-05-30 10:05 [PATCH] VMX: relax incoming BNDCFGS check Jan Beulich
2016-05-31 10:12 ` Andrew Cooper
@ 2016-06-03 2:14 ` Tian, Kevin
2016-06-03 13:07 ` Wei Liu
1 sibling, 1 reply; 4+ messages in thread
From: Tian, Kevin @ 2016-06-03 2:14 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Wei Liu, Nakajima, Jun
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Monday, May 30, 2016 6:06 PM
>
> Accepting zero here even when !cpu_has_mpx makes the restore side
> symmetric to the save logic (which avoids saving the value if zero),
> i.e. makes either side independent of the logic on the other side.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
Acked-by: Kevin Tian <kevin.tian@intel.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] VMX: relax incoming BNDCFGS check
2016-06-03 2:14 ` Tian, Kevin
@ 2016-06-03 13:07 ` Wei Liu
0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-06-03 13:07 UTC (permalink / raw)
To: Tian, Kevin; +Cc: xen-devel, Wei Liu, Nakajima, Jun, Jan Beulich
On Fri, Jun 03, 2016 at 02:14:06AM +0000, Tian, Kevin wrote:
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: Monday, May 30, 2016 6:06 PM
> >
> > Accepting zero here even when !cpu_has_mpx makes the restore side
> > symmetric to the save logic (which avoids saving the value if zero),
> > i.e. makes either side independent of the logic on the other side.
> >
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >
>
> Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-03 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30 10:05 [PATCH] VMX: relax incoming BNDCFGS check Jan Beulich
2016-05-31 10:12 ` Andrew Cooper
2016-06-03 2:14 ` Tian, Kevin
2016-06-03 13:07 ` Wei Liu
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).