Re: [XEN PATCH v5 10/13] x86/vpmu: guard calls to vmx/svm functions

2024-08-05 Thread Sergiy Kibrik
31.07.24 15:29, Jan Beulich: @@ -326,14 +328,14 @@ static inline void __core2_vpmu_load(struct vcpu *v) if ( vpmu_is_set(vcpu_vpmu(v), VPMU_CPU_HAS_DS) ) wrmsrl(MSR_IA32_DS_AREA, core2_vpmu_cxt->ds_area); -if ( !is_hvm_vcpu(v) ) +if ( !is_vmx_vcpu(v) ) {

Re: [XEN PATCH v5 10/13] x86/vpmu: guard calls to vmx/svm functions

2024-07-31 Thread Jan Beulich
On 30.07.2024 12:35, Sergiy Kibrik wrote: > @@ -266,10 +268,10 @@ static inline void __core2_vpmu_save(struct vcpu *v) > rdmsrl(MSR_P6_EVNTSEL(i), xen_pmu_cntr_pair[i].control); > } > > -if ( !is_hvm_vcpu(v) ) > +if ( !is_vmx_vcpu(v) ) With this ... > rdmsrl(MSR_C

[XEN PATCH v5 10/13] x86/vpmu: guard calls to vmx/svm functions

2024-07-30 Thread Sergiy Kibrik
If VMX/SVM disabled in the build, we may still want to have vPMU drivers for PV guests. Yet in such case before using VMX/SVM features and functions we have to explicitly check if they're available in the build. For this purpose (and also not to complicate conditionals) two helpers introduced -- is