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

[Xen-devel] [PATCH v7 00/10] x86: indirect call overhead reduction



While indirect calls have always been more expensive than direct ones,
their cost has further increased with the Spectre v2 mitigations. In a
number of cases we simply pointlessly use them in the first place. In
many other cases the indirection solely exists to abstract from e.g.
vendor specific hardware details, and hence the pointers used never
change once set. Here we can use alternatives patching to get rid of
the indirection.

Further areas where indirect calls could be eliminated (and that I've put
on my todo list in case the general concept here is deemed reasonable)
are vPMU and XSM. For the latter, the Arm side would need dealing
with as well - I'm not sure whether replacing indirect calls by direct ones
is worthwhile there; if not, the wrappers would simply need to become
function invocations in the Arm case (as is already done in the IOMMU
case).

01: x86: reduce general stack alignment to 8
02: x86: clone Linux'es ASM_CALL_CONSTRAINT
03: x86: infrastructure to allow converting certain indirect calls to direct 
ones
04: x86/HVM: patch indirect calls through hvm_funcs to direct ones
05: x86/HVM: patch vINTR indirect calls through hvm_funcs to direct ones
06: x86: patch ctxt_switch_masking() indirect call to direct one
07: x86/genapic: patch indirect calls to direct ones
08: x86/cpuidle: patch some indirect calls to direct ones
09: cpufreq: patch target() indirect call to direct one
10: IOMMU: patch certain indirect calls to direct ones

v7: Just some re-basing and a minor tweak (see patches 3 and 10).

Given for how long this has been pending, I'm intending to commit this
(if necessary without any further tags) as soon as staging is fully open
again, unless (of course) I hear back otherwise by that time.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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