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 <jbeul...@suse.com>
> 
> Reviewed-by: Roger Pau Monné <roger....@citrix.com>

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


Reply via email to