On 19/11/2018 15:25, Jan Beulich wrote: >>>> On 15.11.18 at 22:47, <[email protected]> wrote: >> For more historical context, see >> c/s c17b36d5dc792cfdf59b6de0213b168bec0af8e8 >> c/s 04656384a1b9714e43db850c51431008e23450d8 >> >> PVRDTSCP was an attempt to provide Xen-aware userspace with a stable >> monotonic >> clock, and enough information for said userspace to cope with frequency >> changes across migrate. However, the PVRDTSCP infrastructure has resulted in >> very tangled code, and non-architectural behaviour even in non-PVRDTSCP >> cases. >> >> Seeing as the functionality has been replaced entirely by improvements in PV >> clocks (including being plumbed into the VDSO nowadays), or alternatively by >> hardware TSC scaling features, and no-one is aware of any remaining users of >> this mode, take the opportunity to remove it. > With "remaining" suitably replaced to express that none are known to > ever have existed in the wild ... > >> For now, introduce an upper range check on the toolstack setting to >> XEN_DOMCTL_settscinfo, and exclude TSC_MODE_PVRDTSCP from selection. >> (Arguably, its a bug that this hypercall previously accepted any value and >> turned into a nop). This will catch and cleanly reject attempts to migrate >> in >> a VM configured to use PVRDTSCP, rather than letting it run and have the >> wrong >> timing mode. >> >> Signed-off-by: Andrew Cooper <[email protected]> > Acked-by: Jan Beulich <[email protected]> > albeit I think this ... > >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -970,7 +970,8 @@ long arch_do_domctl( >> break; >> >> case XEN_DOMCTL_settscinfo: >> - if ( d == currd ) /* no domain_pause() */ >> + if ( d == currd || /* no domain_pause() */ >> + domctl->u.tsc_info.tsc_mode > TSC_MODE_NEVER_EMULATE ) > ... would better be left to tsc_set_info().
I think I'll do a separate prerequisite patch which causes tsc_set_info() not to be void. ~Andrew _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
