qemu-e2k/target
Paolo Bonzini 5286c36622 target/i386: properly reset TSC on reset
Some versions of Windows hang on reboot if their TSC value is greater
than 2^54.  The calibration of the Hyper-V reference time overflows
and fails; as a result the processors' clock sources are out of sync.

The issue is that the TSC _should_ be reset to 0 on CPU reset and
QEMU tries to do that.  However, KVM special cases writing 0 to the
TSC and thinks that QEMU is trying to hot-plug a CPU, which is
correct the first time through but not later.  Thwart this valiant
effort and reset the TSC to 1 instead, but only if the CPU has been
run once.

For this to work, env->tsc has to be moved to the part of CPUArchState
that is not zeroed at the beginning of x86_cpu_reset.

Reported-by: Vadim Rozenfeld <vrozenfe@redhat.com>
Supersedes: <20220324082346.72180-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-24 18:30:46 +01:00
..
alpha target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
arm target/arm: Make rvbar settable after realize 2022-03-18 11:19:19 +00:00
avr target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
cris target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
hexagon target/hexagon: remove unused variable 2022-03-12 09:14:22 -08:00
hppa target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
i386 target/i386: properly reset TSC on reset 2022-03-24 18:30:46 +01:00
m68k m68k/nios2-semi: fix gettimeofday() result check 2022-03-22 14:39:06 +04:00
microblaze target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
mips MIPS patches queue 2022-03-09 09:13:39 +00:00
nios2 m68k/nios2-semi: fix gettimeofday() result check 2022-03-22 14:39:06 +04:00
openrisc target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
ppc target/ppc: Replicate Double->Single-Precision result 2022-03-20 23:35:27 +01:00
riscv target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
rx target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
s390x Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
sh4 target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
sparc target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
tricore target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
xtensa target: Use ArchCPU as interface to target CPU 2022-03-06 22:23:09 +01:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
meson.build Drop the deprecated unicore32 target 2021-05-12 18:20:52 +02:00