blob: 7c3960054e8b2e7252157edf11e3015d745c1a59 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
performance: 0.853
graphic: 0.772
other: 0.762
semantic: 0.752
network: 0.716
device: 0.688
socket: 0.582
PID: 0.576
files: 0.558
boot: 0.527
vnc: 0.518
permissions: 0.453
debug: 0.444
KVM: 0.382
x86_64 and i386 return 0 when reading MSR_TSC
Running NetBSD 6.1 (i386 and amd64) under QEMU (from git - 1.5.50 is the version it shows) results in an incorrectly set
TSC frequency (set to 0), because NetBSD uses rdmsr(TSC_MSR) for its serializing CPU counter.
To reproduce the problem, you can run an install ISO of NetBSD 6.1 (either i386 or amd64, depending on which qemu). Quit out of the installer, and you're left at a root prompt:
# sysctl machdep.tsc_freq
machdep.tsc_freq = 0
...on real hardware, it will return the TSC frequency:
# sysctl machdep.tsc_freq
machdep.tsc_freq = 3292685070
...this causes problems with a number of applications.
The NetBSD code which reads the MSR is here:
http://nxr.netbsd.org/xref/src/sys/arch/x86/x86/tsc.c#262
... the "rdmsr(MSR_TSC)" call in cpu_counter_serializing() always returns 0 when run under QEMU.
I should mention, the NetBSD 6.1 ISO I used for testing is here:
http://iso.netbsd.org/pub/NetBSD/iso/6.1/NetBSD-6.1-amd64.iso
The NetBSD problem report where this issue was raised:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=47967
a workaround has been put in place for now, but it would be good to fix this in QEMU.
Looking through old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays?
[Expired for QEMU because there has been no activity for 60 days.]
|