[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v5 10/13] x86/vpmu: guard calls to vmx/svm functions
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
- Date: Mon, 5 Aug 2024 14:21:36 +0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IQGh/N2W0lmiqf6q1V5qC0271Vixl035rbiqXEuqGYU=; b=Gn3giWeoErbwCd3CLDnh9L6d6pylx19L9+Vyn93dw2QbpvpBxBjc+l3478i/efmIGZgDzgULHIn6PkFHIb51H7sC3rQ1Mo77PoGAo0zNIJhzKjLUETjstpRm/EEP4dzgRl8loZ8w7A1f9FcWV45AAdtqllRoG+UbZnaydp5weBxttzkRznhRq5Sg2/uKzqe2mm73Tb+qquMET7wB7YAoEIyUzD7RNBwCZr8PXkPYX2Xvs+agZ/+i2gZ5JggI/B09rWtbZTLs5gY0G5iVp3YWtU2gMiHm9lpjdKIe3Gf/QuFV8Qd6CJbOgOMdCdGYswO00yzs0UBYYzwzBJ0NpU5L+w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CjqQ7aot27l3dJjKdXMiJjkc1tSuO2BZybsGqUeDzWvr+c5LPhKkihZslLuQU35+R2ZhUvVfo8Sa7/SfDqYUMO1ahdOjlCrbB/p6E7hKLAd4/CGJtY5A2jK5yYFM1VXlY8Pg8yE0OH4TIJcR+L97d+yxmpEF8EwPmbmZxWQzCZqeAURB2mKdSHCSqyiKJe12FTlP9Qob1o/SRg1mASm8sKesJ09QP4rlLw/TNzFTghGsyI1tpBNdUjCWjPiBFeqjBGrSMVw0h0aDdHTeAM1589/PxMUEYJF84n8JehtzEJA2TiOQ70vm3hx9yeiIFPYkbPnZomDMS3ECGoOI2TNqcw==
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 05 Aug 2024 11:22:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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) )
{
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<jbeulich@xxxxxxxx>
oops, these are leftovers from prev. patch versions, not needed anymore ofc.
As there'll be v6 of this patch series I'll fix it then.
-Sergiy
|