nvmm - More hacks to maintain TSC mp synchronization between cpus nvmm
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Jun 2021 07:43:15 +0000 (00:43 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Jun 2021 07:43:15 +0000 (00:43 -0700)
commit4a63c830f1c653b6b8d6df54ccfbc57b586c23b3
treead514354e83baef3d99da58865c4f0791db830a2
parent2afc849c2a7cc8725ad728339b1ef4e673edeba2
nvmm - More hacks to maintain TSC mp synchronization between cpus

* More hacks to try to discern whether qemu is actually trying to
  update the MSR_TSC in setstate or not.  Updating MSR_TSC completely
  blows up TSC mp synchronization.

  We assume qemu did not intend to update the TSC if it tries to write
  0 or tries to write the value returned in the previous getstate.

* This allows kernels to use the TSC as a clock, which costs nothing,
  verses the ACPI or HPET which have horrible overhead and a global
  mutex in qemu.
sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c