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_CORE_PERF_GLOBAL_STATUS, core2_vpmu_cxt->global_status); > /* Save MSR to private context to make it fork-friendly */ > - else if ( mem_sharing_enabled(v->domain) ) > + else if ( is_vmx_vcpu(v) && mem_sharing_enabled(v->domain) ) ... why this further change? > @@ -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) ) > { > wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, > core2_vpmu_cxt->global_ovf_ctrl); > core2_vpmu_cxt->global_ovf_ctrl = 0; > wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, core2_vpmu_cxt->global_ctrl); > } > /* Restore MSR from context when used with a fork */ > - else if ( mem_sharing_is_fork(v->domain) ) > + else if ( is_vmx_vcpu(v) && mem_sharing_is_fork(v->domain) ) > vmx_write_guest_msr(v, MSR_CORE_PERF_GLOBAL_CTRL, > core2_vpmu_cxt->global_ctrl); > } Same here. With those dropped (I could do so while committing, as long as you agree): Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan