[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/HVM: convert most remaining hvm_funcs hook invocations to alt-call



On 30/11/2021 14:57, Andrew Cooper wrote:
> On 30/11/2021 14:32, Jan Beulich wrote:
>> On 30.11.2021 15:25, Andrew Cooper wrote:
>>> On 30/11/2021 14:03, Jan Beulich wrote:
>>>> On 30.11.2021 14:48, Andrew Cooper wrote:
>>>>> On 29/11/2021 09:04, Jan Beulich wrote:
>>>>>> The aim being to have as few indirect calls as possible (see [1]),
>>>>>> whereas during initial conversion performance was the main aspect and
>>>>>> hence rarely used hooks didn't get converted. Apparently one use of
>>>>>> get_interrupt_shadow() was missed at the time.
>>>>>>
>>>>>> While I've intentionally left alone the cpu_{up,down}() etc hooks for
>>>>>> not being guest reachable, the nhvm_hap_walk_L1_p2m() one can't
>>>>>> currently be converted as the framework supports only up to 6 arguments.
>>>>>> Down the road the three booleans perhaps want folding into a single
>>>>>> parameter/argument.
>>>>> To use __initdata_cf_clobber, all hooks need to use altcall().
>>>> Right, but that's not going to be sufficient: The data members then also
>>>> need to move elsewhere, aiui.
>>> Nope.  It is safe for data members to stay.
>> But then it can't be in .init.data, can it?
> Very good point.  I'll need to reconsider that plan then.

Nope.  It's still fine.

In this scenario, you'd have {vmx,svm}_hvm_funcs in
__initdata_cf_clobber, because they're genuinely not used at runtime.

The embedded data is copied into the main hvm_funcs object, but in
general, the main object wants to be __initdata (if no embedded data and
fully altcall()'d), else __ro_after_init, or in the worst case
__read_mostly.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.