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

[Xen-changelog] [xen master] x86/time: tsc_check_writability() may need to be run a second time



commit 890dc95ca90a643b59a2b67b634f70ea1f2ea3d6
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Feb 13 15:21:24 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Feb 13 15:21:24 2017 +0100

    x86/time: tsc_check_writability() may need to be run a second time
    
    While we shouldn't remove its current invocation, we need to re-run it
    for the case that the X86_FEATURE_TSC_RELIABLE feature flag has been
    cleared, in order to avoid using the TSC rendezvous function in case
    the TSC can't be written.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
---
 xen/arch/x86/time.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 699dfb6..803e154 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1643,6 +1643,14 @@ static int __init verify_tsc_reliability(void)
     }
 
     /*
+     * Re-run the TSC writability check if it didn't run to completion, as
+     * X86_FEATURE_TSC_RELIABLE may have been cleared by now. This is needed
+     * for determining which rendezvous function to use (below).
+     */
+    if ( !disable_tsc_sync )
+        tsc_check_writability();
+
+    /*
      * While with constant-rate TSCs the scale factor can be shared, when TSCs
      * are not marked as 'reliable', re-sync during rendezvous.
      */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.