Message ID | 20240203040515.23947-1-ricardo.neri-calderon@linux.intel.com |
---|---|
Headers | show |
Series | thermal: intel: hfi: Prework for the virtualization of HFI | expand |
On Sat, Feb 03, 2024 at 10:40:14AM +0100, Borislav Petkov wrote: > On Fri, Feb 02, 2024 at 08:05:15PM -0800, Ricardo Neri wrote: > > +void reset_hardware_history(void) > > +{ > > + asm_inline volatile (ALTERNATIVE("", __ASM_HRESET, X86_FEATURE_HRESET) > > + : : "a" (hardware_history_features) : "memory"); > > +} > > This thing belongs in the header too, and it should be __always_inline. Thanks a lot for your feedback Boris! Sure, I can move this code to the header ad use __always_inline. BR, Ricardo
On Sat, Feb 03, 2024 at 10:36:22AM +0100, Borislav Petkov wrote: > On Fri, Feb 02, 2024 at 08:05:13PM -0800, Ricardo Neri wrote: > > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h > > index 8104f4791abd..3b42479c049d 100644 > > --- a/arch/x86/include/asm/cpufeatures.h > > +++ b/arch/x86/include/asm/cpufeatures.h > > @@ -326,6 +326,7 @@ > > #define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */ > > #define X86_FEATURE_LKGS (12*32+18) /* "" Load "kernel" (userspace) GS */ > > #define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */ > > +#define X86_FEATURE_HRESET (12*32+22) /* Hardware history reset instruction */ > > #define X86_FEATURE_HRESET (12*32+22) /* "" Hardware history reset instruction */ > > unless this really needs to be visible in /proc/cpuinfo: > > Documentation/arch/x86/cpuinfo.rst Good point. There is no need to expose HRESET in /proc/cpuinfo. I will implement this change.
On Fri, Feb 02, 2024 at 08:05:06PM -0800, Ricardo Neri wrote: > Zhao Liu will soon post a patchset to virtualize the Hardware Feedback > Interface (HFI) and Intel Thread Director (ITD) for the benefit of virtual > machines that make use of ITD for scheduling. His experiments show up to > 14% improvement in performance in some workloads and configurations. This > series lays the foundation for his patchset. I will share Zhao's patchset > when available. Here are Zhao and Zhuocheng's patches: https://lore.kernel.org/lkml/20240203091214.411862-1-zhao1.liu@linux.intel.com/