On 16/04/2024 7:35 am, Sergiy Kibrik wrote: > diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile > index 35561fe51d..d3d7b8fb2e 100644 > --- a/xen/arch/x86/cpu/Makefile > +++ b/xen/arch/x86/cpu/Makefile > @@ -10,4 +10,6 @@ obj-y += intel.o > obj-y += intel_cacheinfo.o > obj-y += mwait-idle.o > obj-y += shanghai.o > -obj-y += vpmu.o vpmu_amd.o vpmu_intel.o > +obj-y += vpmu.o > +obj-$(CONFIG_SVM) += vpmu_amd.o > +obj-$(CONFIG_VMX) += vpmu_intel.o
I'm afraid this breaks perf counters on PV guests. These files are joint guest-type implementations. Seeing as you leave vpmu.o alone, I guess that all you're actually wanting to do is compile out vpmu_intel.o? In which case, use CONFIG_{AMD,INTEL} rather than CONFIG_{SVM,VMX} please. ~Andrew