Re: [PATCH v4 3/3] selftests: KVM: SVM: Add vmcall test

From: Paolo Bonzini
Date: Wed Feb 12 2020 - 06:45:05 EST


On 06/02/20 23:46, Krish Sadhukhan wrote:
>>
>> +
>> +static inline void l2_vmcall(struct svm_test_data *svm)
>> +{
>> +ÂÂÂ __asm__ __volatile__("vmcall");
> Is it possible to re-use the existing vmcall() function ?

Technically the AMD opcode is "vmmcall". Using vmcall() still makes
sense as it tests KVM's emulation of the Intel opcode.

> Also, we should probably re-name the function to 'l2_guest_code' which
> is used in the existing code and also it matches with 'l1_guest_code'
> naming.

Ok. I also removed the "inline" which is really not used since we take
the address of the function.

Paolo