xen/pv: add fault recovery control to pmu msr accesses
authorJuergen Gross <jgross@suse.com>
Mon, 26 Sep 2022 06:23:51 +0000 (08:23 +0200)
committerJuergen Gross <jgross@suse.com>
Tue, 11 Oct 2022 08:50:51 +0000 (10:50 +0200)
commit8714f7bcd3c20d36890f43cc6a8e0c3c17b843aa
treeee323125ca1747c841781668e97f3a31c5bd5151
parent61367688f1fb07678b1d865a0ce9364f5267a896
xen/pv: add fault recovery control to pmu msr accesses

Today pmu_msr_read() and pmu_msr_write() fall back to the safe variants
of read/write MSR in case the MSR access isn't emulated via Xen. Allow
the caller to select that faults should not be recovered from by passing
NULL for the error pointer.

Restructure the code to make it more readable.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/pmu.c