[PATCH v3 04/41] KVM: arm64: Rework hyp_panic for VHE and non-VHE

Julien Grall julien.grall at arm.com
Fri Feb 9 02:55:18 PST 2018


Hi Christoffer,

On 02/08/2018 01:24 PM, Christoffer Dall wrote:
> On Mon, Feb 05, 2018 at 06:04:25PM +0000, Julien Grall wrote:
>> On 12/01/18 12:07, Christoffer Dall wrote:
>>> +
>>>   	panic(__hyp_panic_string,
>>>   	      spsr,  elr,
>>>   	      read_sysreg_el2(esr),   read_sysreg_el2(far),
>>>   	      read_sysreg(hpfar_el2), par, vcpu);
>>>   }
>>> -static hyp_alternate_select(__hyp_call_panic,
>>> -			    __hyp_call_panic_nvhe, __hyp_call_panic_vhe,
>>> -			    ARM64_HAS_VIRT_HOST_EXTN);
>>
>> Out of interest, any specific rather to remove hyp_alternate_select and
>> "open-code" it?
>>
> 
> Not sure I understand your question.
> 
> Are you asking why I replace the hyp alternatives with the has_vhe()?
> If so, has_vhe() uses a static key and should therefore have the same
> performance characteristics, but I find the has_vhe() version below much
> more readable.

That what I was asking. Thank you for the explanation.

Cheers,

-- 
Julien Grall



More information about the linux-arm-kernel mailing list