Use the first handler available to deliver NMI only once. If anothers handlers are available, no need to keep delivering.
Suggested-by: Peter Maydell <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- hw/core/nmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/nmi.c b/hw/core/nmi.c index 8eea75ad530..4fe5ee75bfc 100644 --- a/hw/core/nmi.c +++ b/hw/core/nmi.c @@ -31,6 +31,8 @@ static int do_nmi(Object *o, void *opaque) if (n) { *handled = true; NMI_GET_CLASS(n)->deliver_nmi(n); + /* We only need to deliver NMI once */ + return 1; } return 0; -- 2.53.0
