x86/hvm: Remove callback from paging->flush_tlb() hook
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 17 Nov 2021 17:45:21 +0000 (17:45 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
commit11d9e114b53045e5f2009a26dad1d0d0f7df441e
treeec455a5be5ffaa4d42004f173d3993aa9e28cdc0
parent245a320ce22752562c2143d0fb406aeb2e334dfb
x86/hvm: Remove callback from paging->flush_tlb() hook

TLB flushing is a hotpath, and function pointer calls are
expensive (especially under retpoline) for what amounts to an identity
transform on the data.  Just pass the vcpu_bitmap bitmap directly.

As we use NULL for all rather than none, introduce a flush_vcpu() helper to
avoid the risk of logical errors from opencoding the expression.  This also
means the viridian callers can avoid writing an all-ones bitmap for the
flushing logic to consume.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/viridian/viridian.c
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/private.h
xen/include/asm-x86/paging.h