Konstantin Belousov
2018-Jul-05 13:35 UTC
Ryzen issues on FreeBSD ? (with sort of workaround)
On Thu, Jul 05, 2018 at 02:23:15PM +0100, Pete French wrote:> > > On 05/07/2018 11:47, Konstantin Belousov wrote: > > Why do you state that they are saved/restored ? What is the evidence ? > > > https://software.intel.com/en-us/blogs/2009/06/25/virtualization-and-performance-understanding-vm-exits > > specificly... > > 3) "Save MSRs in the VM-exit MSR-store area." > > and > > 5) "Load MSRs from the VM-exit MSR-load area." > > but maybe thats not actyually true, I assumed it was given its an Intel > document, but admittedly its not an actual specification.This is true, but absolutely irrelevant. Modern CPUs have hundreds, if not thousands, MSR registers. Only some of them define architectural state, and saved/restored on the context switches. Chicken bits are global knobs not relevant to the vmm entry.> > > > On VM the patch should be NOP, testing it is a waste of time IMO. > > > OK, will ignore that then. I am running the new patch on my workstation > now - I still need the old patch for the other files, yes ?Which other files ?
> This is true, but absolutely irrelevant. > > Modern CPUs have hundreds, if not thousands, MSR registers. Only some of > them define architectural state, and saved/restored on the context switches. > Chicken bits are global knobs not relevant to the vmm entry.That actually makes far more sense. I was kind of puzzled as to how it would work if they were per VM :-)> Which other files ?sys/x86/include/specialreg.h and sys/x86/x86/cpu_machdep.c Those are in your original patch as well as the change to sys/amd64/amd64/initcpu.c, but your email earlier only patches sys/amd64/amd64/initcpu.c and not the others. So I assumed I would keep the changes to the other two files ? -pete.