>>> On 20.11.18 at 15:37, <andrew.coop...@citrix.com> wrote: > With PVRDTSCP mode removed, handling of MSR_TSC_AUX can move into the common > code. Move its storage into struct vcpu_msrs (dropping the HVM-specific > msr_tsc_aux), and add an RDPID feature check as this bit also enumerates the > presence of the MSR. > > Introduce cpu_has_rdpid along with the synthesized cpu_has_msr_tsc_aux to > correct the context switch paths, as MSR_TSC_AUX is enumerated by either > RDTSCP or RDPID. > > Drop hvm_msr_tsc_aux() entirely, and use v->arch.msrs->tsc_aux directly. > Update hvm_load_cpu_ctxt() to check that the incoming ctxt.msr_tsc_aux isn't > out of range. In practice, no previous version of Xen ever wrote an > out-of-range value. Add MSR_TSC_AUX to the list of MSRs migrated for PV > guests, but leave the HVM path using the existing space in hvm_hw_cpu. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> >[...] > --- > xen/arch/x86/domain.c | 5 ++--- > xen/arch/x86/domctl.c | 2 ++ > xen/arch/x86/hvm/hvm.c | 22 +++++++++------------- > xen/arch/x86/hvm/svm/svm.c | 6 +++--- > xen/arch/x86/hvm/vmx/vmx.c | 6 +++--- > xen/arch/x86/msr.c | 18 ++++++++++++++++++ > xen/arch/x86/pv/emul-priv-op.c | 4 ---- > xen/include/asm-x86/cpufeature.h | 5 +++++ > xen/include/asm-x86/hvm/hvm.h | 6 ------ > xen/include/asm-x86/hvm/vcpu.h | 1 - > xen/include/asm-x86/msr.h | 9 +++++++++ > 11 files changed, 51 insertions(+), 33 deletions(-)
Btw. by the end of this series wouldn't you agree docs/misc/pvrdtscp.c should be gone? And won't docs/man/xen-tsc-mode.pod.7 need adjustment too? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel