Author: markj
Date: Thu Apr  4 02:07:24 2019
New Revision: 345868
URL: https://svnweb.freebsd.org/changeset/base/345868

Log:
  MFC r345359, r345384:
  Don't attempt to measure TSC skew when running as a VM guest.
  
  PR:   218452

Modified:
  stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==============================================================================
--- stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c   Thu Apr  4 02:05:50 
2019        (r345867)
+++ stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c   Thu Apr  4 02:07:24 
2019        (r345868)
@@ -318,6 +318,9 @@ dtrace_gethrtime_init(void *arg)
        int i;
 #endif
 
+       if (vm_guest != VM_GUEST_NO)
+               return;
+
        /* The current CPU is the reference one. */
        sched_pin();
        tsc_skew[curcpu] = 0;

Modified: stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==============================================================================
--- stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c    Thu Apr  4 02:05:50 
2019        (r345867)
+++ stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c    Thu Apr  4 02:07:24 
2019        (r345868)
@@ -320,6 +320,9 @@ dtrace_gethrtime_init(void *arg)
        int i;
 #endif
 
+       if (vm_guest != VM_GUEST_NO)
+               return;
+
        /* The current CPU is the reference one. */
        sched_pin();
        tsc_skew[curcpu] = 0;


_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to