[PATCH 11/19] KVM: PPC: Book3S HV: add support for the XIVE native exploitation mode hcalls
Cédric Le Goater
clg at kaod.org
Wed Jan 23 19:48:31 AEDT 2019
On 1/23/19 7:44 AM, Benjamin Herrenschmidt wrote:
> On Tue, 2019-01-22 at 16:23 +1100, Paul Mackerras wrote:
>>
>> Which ones of these could be implemented in QEMU? Are there any that
>> can't possibly be implemented in QEMU because they need to do things
>> that require calling internal interfaces that userspace doesn't have
>> access to?
>
> Implementing them in qemu doesn't make a lot of sense. Qemu doesn't
> have access to most of the XIVE HW state. There's a XIVE model for full
> emulation but when using the real thing, almost none of it is visible.
> A lot of those hcalls effectively turn into OPAL calls.
>
>> How often do we expect each of these hypercalls to be called?
>
> It depends, I can't tell for AIX. For Linux, not often with one
> exception: H_INT_ESB which will be used whenever you EOI an emulated
> LSI.
yes. This one is only doing loads and stores.
> .../...
>
>> Why do we need to provide real-mode versions of these hypercall
>> handlers? I thought these hypercalls would only get called
>> infrequently, and in any case certainly much less frequently than once
>> per interrupt delivered. If they are infrequent, then let's leave out
>> the real-mode version and just handle them in book3s_hv.c.
>
> Agreed with the exception maybe of H_INT_ESB
ok.
Some of these hcalls are really simple and only getting local info from
the host (h_int_get_*). I thought handling the hcall ASAP was a preferred
practice, even if the hcall is not called frequently. Isn't it ?
>>> @@ -5153,6 +5169,19 @@ static unsigned int default_hcall_list[] = {
>>> H_IPOLL,
>>> H_XIRR,
>>> H_XIRR_X,
>>> +#endif
>>> +#ifdef CONFIG_KVM_XIVE
>>> + H_INT_GET_SOURCE_INFO,
>>> + H_INT_SET_SOURCE_CONFIG,
>>> + H_INT_GET_SOURCE_CONFIG,
>>> + H_INT_GET_QUEUE_INFO,
>>> + H_INT_SET_QUEUE_CONFIG,
>>> + H_INT_GET_QUEUE_CONFIG,
>>> + H_INT_SET_OS_REPORTING_LINE,
>>> + H_INT_GET_OS_REPORTING_LINE,
>>> + H_INT_ESB,
>>> + H_INT_SYNC,
>>> + H_INT_RESET,
>>> #endif
>>
>> The policy is not to add new hcalls to default_hcall_list[]. Is there
>> a strong reason for adding them here?
I don't remember. I will check for v2.
Thanks,
C.
More information about the Linuxppc-dev
mailing list