x86/vPMU: move vpmu_ops to .init.data
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:22:03 +0000 (11:22 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:22:03 +0000 (11:22 +0100)
commit75a16d4c5f16c611687a4460dfae23909588f3fa
tree0479b200f421613eceb9e08a32151901da01bfbe
parent8c20aca6751bf40f2d385f79d702813eb6a3cb27
x86/vPMU: move vpmu_ops to .init.data

Both vendors' code populates all hooks, so there's no need to have any
NULL checks before invoking the hook functions. With that the only
remaining uses of the object are in alternative_{,v}call(), i.e. none
after alternatives patching.

In vpmu_arch_initialise() the check gets replaced by an opt_vpmu_enabled
one, as I couldn't convince myself that the pre-existing checks would be
sufficient to cover all possible cases.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/vpmu.c