* [PATCH] x86/vmx: Fixup removals from MSR load-lists
@ 2019-04-04 14:42 Igor Druzhinin
2019-04-04 14:45 ` Andrew Cooper
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Igor Druzhinin @ 2019-04-04 14:42 UTC (permalink / raw)
To: xen-devel
Cc: Igor Druzhinin, kevin.tian, wei.liu2, jbeulich, andrew.cooper3,
jun.nakajima, roger.pau
Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context")
introduced a regression on Harpertown and earlier cores (Gen 1 VT-x)
where as soon as guest EFER becomes equal to Xen EFER
(almost any 64-bit VM) stale version of EFER is incorrectly
loaded into a guest causing almost immediate guest failure.
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
I assume this is a candidate for backporting to stable-4.12.
---
xen/arch/x86/hvm/vmx/vmcs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 74f2a08..45d1849 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -1490,15 +1490,15 @@ int vmx_del_msr(struct vcpu *v, uint32_t msr, enum vmx_msr_list_type type)
switch ( type )
{
case VMX_MSR_HOST:
- __vmwrite(VM_EXIT_MSR_LOAD_COUNT, vmx->host_msr_count--);
+ __vmwrite(VM_EXIT_MSR_LOAD_COUNT, --vmx->host_msr_count);
break;
case VMX_MSR_GUEST:
- __vmwrite(VM_EXIT_MSR_STORE_COUNT, vmx->msr_save_count--);
+ __vmwrite(VM_EXIT_MSR_STORE_COUNT, --vmx->msr_save_count);
/* Fallthrough */
case VMX_MSR_GUEST_LOADONLY:
- __vmwrite(VM_ENTRY_MSR_LOAD_COUNT, vmx->msr_load_count--);
+ __vmwrite(VM_ENTRY_MSR_LOAD_COUNT, --vmx->msr_load_count);
break;
}
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/vmx: Fixup removals from MSR load-lists
2019-04-04 14:42 [PATCH] x86/vmx: Fixup removals from MSR load-lists Igor Druzhinin
@ 2019-04-04 14:45 ` Andrew Cooper
2019-04-04 14:59 ` Jan Beulich
2019-04-09 3:03 ` [Xen-devel] " Tian, Kevin
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2019-04-04 14:45 UTC (permalink / raw)
To: Igor Druzhinin, xen-devel
Cc: kevin.tian, wei.liu2, jun.nakajima, jbeulich, roger.pau
On 04/04/2019 15:42, Igor Druzhinin wrote:
I'd add "entries" to the subject, which can be done on commit.
> Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context")
> introduced a regression on Harpertown and earlier cores (Gen 1 VT-x)
> where as soon as guest EFER becomes equal to Xen EFER
> (almost any 64-bit VM) stale version of EFER is incorrectly
> loaded into a guest causing almost immediate guest failure.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/vmx: Fixup removals from MSR load-lists
2019-04-04 14:42 [PATCH] x86/vmx: Fixup removals from MSR load-lists Igor Druzhinin
2019-04-04 14:45 ` Andrew Cooper
@ 2019-04-04 14:59 ` Jan Beulich
2019-04-09 3:03 ` [Xen-devel] " Tian, Kevin
2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2019-04-04 14:59 UTC (permalink / raw)
To: Igor Druzhinin
Cc: Kevin Tian, Wei Liu, Andrew Cooper, Jun Nakajima, xen-devel,
Roger Pau Monne
>>> On 04.04.19 at 16:42, <igor.druzhinin@citrix.com> wrote:
> Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context")
> introduced a regression on Harpertown and earlier cores (Gen 1 VT-x)
> where as soon as guest EFER becomes equal to Xen EFER
> (almost any 64-bit VM) stale version of EFER is incorrectly
> loaded into a guest causing almost immediate guest failure.
I'm afraid this is not an overly helpful description, considering the
actual fix. It's definitely not that commit which has introduced the
bug - vmx_del_msr() has been there before. Hence the bug was
only uncovered by the referenced commit.
With a reference to the actual faulty commit added
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/vmx: Fixup removals from MSR load-lists
@ 2019-04-09 3:03 ` Tian, Kevin
0 siblings, 0 replies; 5+ messages in thread
From: Tian, Kevin @ 2019-04-09 3:03 UTC (permalink / raw)
To: Igor Druzhinin, xen-devel
Cc: andrew.cooper3, wei.liu2, Nakajima, Jun, jbeulich, roger.pau
> From: Igor Druzhinin [mailto:igor.druzhinin@citrix.com]
> Sent: Thursday, April 4, 2019 10:42 PM
>
> Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context")
> introduced a regression on Harpertown and earlier cores (Gen 1 VT-x)
> where as soon as guest EFER becomes equal to Xen EFER
> (almost any 64-bit VM) stale version of EFER is incorrectly
> loaded into a guest causing almost immediate guest failure.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xen-devel] [PATCH] x86/vmx: Fixup removals from MSR load-lists
@ 2019-04-09 3:03 ` Tian, Kevin
0 siblings, 0 replies; 5+ messages in thread
From: Tian, Kevin @ 2019-04-09 3:03 UTC (permalink / raw)
To: Igor Druzhinin, xen-devel
Cc: andrew.cooper3, wei.liu2, Nakajima, Jun, jbeulich, roger.pau
> From: Igor Druzhinin [mailto:igor.druzhinin@citrix.com]
> Sent: Thursday, April 4, 2019 10:42 PM
>
> Commit fd32dcfe ("x86/vmx: Don't leak EFER.NXE into guest context")
> introduced a regression on Harpertown and earlier cores (Gen 1 VT-x)
> where as soon as guest EFER becomes equal to Xen EFER
> (almost any 64-bit VM) stale version of EFER is incorrectly
> loaded into a guest causing almost immediate guest failure.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-09 3:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 14:42 [PATCH] x86/vmx: Fixup removals from MSR load-lists Igor Druzhinin
2019-04-04 14:45 ` Andrew Cooper
2019-04-04 14:59 ` Jan Beulich
2019-04-09 3:03 ` Tian, Kevin
2019-04-09 3:03 ` [Xen-devel] " Tian, Kevin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.