[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/3] x86/perfc: fold HVM's VM-exit counter arrays
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 22 Feb 2022 10:59:04 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BIuneDHh5RZByOlHybUEbZOMV0xtuh2BkQFO0M0WPII=; b=cJ3w5mGB7w/b3/j1mGUdpSjZ9Lt2vc8VJLYBWNfHYHpuSzquvGAXV6ABF3x73kau9/BZ1JzLLRoD9w/MIF3AMmTAbpbM5/5HwJk9c1spd0/STmCV/0V4YaCM8jEj1lJe0/0Cxf0aMRvBcJIW5kUCa9yk/2b3SELFEBFvtiQbJw9T0EnibFUQbsP8oQzA4BsSj0Gp6N/lw5Ako8D7ITyrC0YJEp3xPaHfRxcDhLpDpbPR4fJ/w7frJ7CaJr7UtV6zG7LX1sK8PcOtXjdkqU8zPUsyTauNPO6CHMRBKYUoKjB/rAS3z+mXAzezWgBoT28uffAdo1vlWbAx8VMutRplDw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bjfBmtCPoXXKd/O3hs9KhVKm9bpdHvtL4LqyKoSBWzy1Qp/+3Wz0QONuY4PMf/ozDuryb8zdVrGQseTaQjQLXBA6O4EGZr1+hWBlhMrBksduRySoCy0YfeTgf8Q1cSbZHhUHypApO2x/3wDqsWyq+ewkEkxmnR0y8ZcerQuoam5kwGKRoDAFYn2CqMuFdbA3ofLpri3sRJ+HrAIKm5LqemODWTZkaa3zojdhLj3W5H9Wmsp0mX0/3YGhtNr4xs2Mfh10oe90e2ljuN0ZfQgh7MCQq/9RY4kyjdAcSWE0Wzbv3QtK0Ube0aL0ZAj9Wg2bZEJ8jXN1pO/1IOKL4fK97g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 22 Feb 2022 09:59:18 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22.02.2022 10:40, Roger Pau Monné wrote:
> On Wed, Jan 05, 2022 at 02:59:03PM +0100, Jan Beulich wrote:
>> Only one of them can be in use at a time, so make the whole set union-
>> like. While doing the rename in SVM code, combine the two perf_incra(),
>> generalizing the range upwards of VMEXIT_NPF.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks.
>> --- a/xen/arch/x86/hvm/svm/svm.c
>> +++ b/xen/arch/x86/hvm/svm/svm.c
>> @@ -2644,7 +2644,10 @@ void svm_vmexit_handler(struct cpu_user_
>> goto out;
>> }
>>
>> - perfc_incra(svmexits, exit_reason);
>> + perfc_incra(vmexits,
>> + exit_reason < VMEXIT_NPF
>> + ? exit_reason
>> + : exit_reason - VMEXIT_NPF + VMEXIT_NPF_PERFC);
>
> Should we assert that the index used here < SVM_PERF_EXIT_REASON_SIZE?
>
> Just so that adding new exit reasons without increasing
> SVM_PERF_EXIT_REASON_SIZE is not likely to go unnoticed?
But that's what the comments are for that the previous patch adds.
Jan
|