Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Penalize TSC on VirtualBox because it is no...
details: https://anonhg.NetBSD.org/src/rev/f668694d38fd
branches: trunk
changeset: 959562:f668694d38fd
user: christos <christos%NetBSD.org@localhost>
date: Fri Feb 19 02:15:58 2021 +0000
description:
Penalize TSC on VirtualBox because it is not accurate enough.
diffstat:
sys/arch/x86/x86/tsc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 3a5b21d9f22a -r f668694d38fd sys/arch/x86/x86/tsc.c
--- a/sys/arch/x86/x86/tsc.c Fri Feb 19 02:15:24 2021 +0000
+++ b/sys/arch/x86/x86/tsc.c Fri Feb 19 02:15:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsc.c,v 1.53 2021/02/17 06:33:47 rillig Exp $ */
+/* $NetBSD: tsc.c,v 1.54 2021/02/19 02:15:58 christos Exp $ */
/*-
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.53 2021/02/17 06:33:47 rillig Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.54 2021/02/19 02:15:58 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -224,6 +224,8 @@
invariant = false;
} else if (vm_guest == VM_GUEST_NO) {
delay_func = tsc_delay;
+ } else if (vm_guest == VM_GUEST_VIRTUALBOX) {
+ tsc_timecounter.tc_quality = -100;
}
if (tsc_freq != 0) {
Home |
Main Index |
Thread Index |
Old Index