[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] x86/traps: Collect PERFC_exceptions stats for IST vectors too
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 19 Nov 2021 18:21:02 +0000
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Fri, 19 Nov 2021 18:21:38 +0000
- Ironport-data: A9a23:xHHOxqBXMMqsDBVW/+Tkw5YqxClBgxIJ4kV8jS/XYbTApD900jQHy jBMXW6Pa/6ONGejKtlzOdu0/EkHscXdyN5jQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMo/u1Si6FatANl1ElvU2zbue6WLGs1hxZH1c+EX540EM7wYbVv6Yz6TSHK1LV0 T/Ni5W31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eH/5UhN7oNJLnZEpfNatI88thW5 Qr05OrREmvxp3/BAz4++1rxWhVirrX6ZWBihpfKMkQLb9crSiEai84G2PQghUh/tXapr9BP8 cx0v4WrcFt2BJPHwepeekwNe81+FfUuFL7vJHG+tYqYzlHccmuqyPJrZK00FdRGoKAtWzgIr KFGbmBWBvyAr7veLLaTY+9gnMk8auLsO5sSoCpIxjDFF/c2B5vERs0m4PcFjG1o2pAfRJ4yY eI8UhdNUCqDPCRBFUkMBbY4wOL4pEvgJmgwRFW9+vNsvjm7IBZK+KfpGMrYfJqNX8o9tmSyq 3/C/m/5KgoHL9HZwj2Amlq8i+mKkS7lVYY6ELyj6uUskFCV3nYUChAdSR28u/bRt6Klc4sBc QpOoHNo9PVsshzwJjXgY/GmiEDHni4cZeNJKucj8zjRlZDq6F+XRUFRG1at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dr: eD/0pI9T+NW7zY5q+V3UeGmeC2/CofjBgRM0hFDsMkZFfS51lFi57VTFYBAS88+7OtecbD027R PbGEafFWYxClsqu2wKWlY7vHNT2bIG9cAMDGybsEOFazTsR1SpzAHJeEkkiKOg178yG73TBS54 aLWmvvkYVhO6KoyZIi6SHxd3yKprX9xw3mc3/Qk2MHsQsFY+rZ/HvERBcy4LgA7l6ydDB7Iesw dLzm6HXGf4RSnOEnFYHPoRdhDNeEUTrLrpOiLnETlT4dQSV1+XYYduTxE2nV5LY4vr4aSpo35U GTSmsOc+lLFyLrU8vfb6KNrf
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This causes NMIs, #DB and #MC to be counted, rather than being reported as 0.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
xen/arch/x86/x86_64/entry.S | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index d5998acf8806..3caa5654768d 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -1005,6 +1005,13 @@ handle_ist_exception:
#endif
movq %rsp,%rdi
movzbl UREGS_entry_vector(%rsp),%eax
+
+#ifdef CONFIG_PERF_COUNTERS
+ lea per_cpu__perfcounters(%rip), %rcx
+ add STACK_CPUINFO_FIELD(per_cpu_offset)(%r14), %rcx
+ incl ASM_PERFC_exceptions * 4(%rcx, %rax, 4)
+#endif
+
leaq exception_table(%rip),%rdx
mov (%rdx, %rax, 8), %rdx
INDIRECT_CALL %rdx
--
2.11.0
|