On 20/05/2019 12:40, Jan Beulich wrote: >>>> On 20.05.19 at 12:13, <andrew.coop...@citrix.com> wrote: >> Lightweight Profiling was introduced in Bulldozer (Fam15h), but was dropped >> from Zen (Fam17h) processors. Furthermore, LWP was dropped from Fam15/16 >> CPUs >> when IBPB for Spectre v2 was introduced in microcode, owing to LWP not being >> used in practice. >> >> As a result, CPUs which are operating within specification (i.e. with up to >> date microcode) no longer have this feature, and therefore are not using it. >> >> Drop support from Xen. The main motivation here is to remove unnecessary >> complexity from CPUID handling, but it also tidies up the SVM code nicely. >> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com>
Thanks. > >> --- a/xen/include/public/arch-x86/cpufeatureset.h >> +++ b/xen/include/public/arch-x86/cpufeatureset.h >> @@ -176,7 +176,7 @@ XEN_CPUFEATURE(IBS, 3*32+10) /* Instruction >> Based Sampling */ >> XEN_CPUFEATURE(XOP, 3*32+11) /*A extended AVX instructions */ >> XEN_CPUFEATURE(SKINIT, 3*32+12) /* SKINIT/STGI instructions */ >> XEN_CPUFEATURE(WDT, 3*32+13) /* Watchdog timer */ >> -XEN_CPUFEATURE(LWP, 3*32+15) /*S Light Weight Profiling */ >> +XEN_CPUFEATURE(LWP, 3*32+15) /* Light Weight Profiling */ > Strictly speaking this is not permitted (see the other thread on > this being part of the public interface). But of course strictly > speaking it was also not permitted for AMD to remove the > feature in a ucode update (I wonder btw whether the insns > indeed #UD now on Fam15/16). There is nothing "not permitted" about it. AMD can do whatever they want in microcode, as can we with our feature support. It is certainly in their (and our) interest to not break backwards compatibility, which is why there should be a very good reason to regress the customer experience. In this case, LWP had already been dropped from Zen because it wasn't used in practice, and then suddenly Spectre/Meltdown came along and urgently needed a fix. AMD didn't drop LWP lightly, and would have avoided doing so if it was possible. However, given a choice between fixing Spectre, and retaining support for a feature which isn't used, dropping LWP was the correct decision to make, however uncomfortable the decision was to make. As for #UD, I haven't tried but I'd expect so. All the instructions were already specified to #UD anyway when XCR0.LWP was clear. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel