Date: Tue, 11 Jan 2022 11:50:53 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: xen@freebsd.org Cc: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <roger.pau@citrix.com> Subject: VCPUOP_send_nmi returns -38 Message-ID: <3f9f173b-40b9-0180-404d-52fa56dde45f@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Recently I got a report of crashes related to using procstat -k on one of our systems. The system runs FreeBSD 12.2 on an AWS Xen-based instance (can get more specifics about it later). It immediately reminded me of an older issue (Subject: Xen (HVM) and NMI) where the root cause was that NMIs were delivered as regular interrupts. But 12.2 has the newer code that delivers NMIs as NMIs. After some investigation it became evident that NMIs are not delivered at all. I modified send_nmi() in sys/x86/xen/xen_apic.c to capture and report errors from HYPERVISOR_vcpu_op(VCPUOP_send_nmi) calls. That revealed that the call returns -38 which appears to mean ENOSYS. I am not sure what that could mean. Perhaps NMI is somehow disabled in the Xen configuration (for that specific instance type)? I am out of better ideas. P.S. It appears that FreeBSD does not expect that an IPI, including NMI, can fail. So, there is no way to propagate the error to callers. I think that we could either printf it or, perhaps, even panic on such a failure. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3f9f173b-40b9-0180-404d-52fa56dde45f>