[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/15] ipmi: Fix watchdog NMI handling
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH 01/15] ipmi: Fix watchdog NMI handling |
Date: |
Fri, 20 Sep 2019 17:45:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 19/09/2019 23:39, address@hidden wrote:
> From: Corey Minyard <address@hidden>
>
> The wrong logic was used for detection (so it wouldn't work at all)
> and the wrong interface was used to inject the NMI if the detection
> logic was correct.
>
> Signed-off-by: Corey Minyard <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
C.
> ---
> hw/ipmi/ipmi.c | 6 +++---
> hw/ipmi/ipmi_bmc_sim.c | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ipmi/ipmi.c b/hw/ipmi/ipmi.c
> index 136c86b7a7..cbe158f815 100644
> --- a/hw/ipmi/ipmi.c
> +++ b/hw/ipmi/ipmi.c
> @@ -28,9 +28,8 @@
> #include "qom/object_interfaces.h"
> #include "sysemu/runstate.h"
> #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> -#include "qapi/visitor.h"
> #include "qemu/module.h"
> +#include "hw/nmi.h"
>
> static uint32_t ipmi_current_uuid = 1;
>
> @@ -60,7 +59,8 @@ static int ipmi_do_hw_op(IPMIInterface *s, enum ipmi_op op,
> int checkonly)
> if (checkonly) {
> return 0;
> }
> - qmp_inject_nmi(NULL);
> + /* We don't care what CPU we use. */
> + nmi_monitor_handle(0, NULL);
> return 0;
>
> case IPMI_SHUTDOWN_VIA_ACPI_OVERTEMP:
> diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
> index 246a6d390c..8f63bb7181 100644
> --- a/hw/ipmi/ipmi_bmc_sim.c
> +++ b/hw/ipmi/ipmi_bmc_sim.c
> @@ -1194,7 +1194,7 @@ static void set_watchdog_timer(IPMIBmcSim *ibs,
> break;
>
> case IPMI_BMC_WATCHDOG_PRE_NMI:
> - if (!k->do_hw_op(s, IPMI_SEND_NMI, 1)) {
> + if (k->do_hw_op(s, IPMI_SEND_NMI, 1)) {
> /* NMI not supported. */
> rsp_buffer_set_error(rsp, IPMI_CC_INVALID_DATA_FIELD);
> return;
>
- [PATCH 05/15] qdev: Add a no default uuid property, (continued)
- [PATCH 05/15] qdev: Add a no default uuid property, minyard, 2019/09/19
- [PATCH 02/15] ipmi: Fix the get watchdog command, minyard, 2019/09/19
- [PATCH 06/15] ipmi: Add a UUID device property, minyard, 2019/09/19
- [PATCH 09/15] ipmi: Allow a size value to be passed for I/O space, minyard, 2019/09/19
- [PATCH 07/15] ipmi: Split out KCS-specific code from ISA KCS code, minyard, 2019/09/19
- [PATCH 11/15] ipmi: Add PCI IPMI interfaces, minyard, 2019/09/19
- [PATCH 14/15] ipmi: Fix SSIF ACPI handling to use the right CRS, minyard, 2019/09/19
- [PATCH 10/15] smbios:ipmi: Ignore IPMI devices with no fwinfo function, minyard, 2019/09/19
- [PATCH 01/15] ipmi: Fix watchdog NMI handling, minyard, 2019/09/19
- Re: [PATCH 01/15] ipmi: Fix watchdog NMI handling,
Cédric Le Goater <=
- [PATCH 08/15] ipmi: Split out BT-specific code from ISA BT code, minyard, 2019/09/19
- [PATCH 15/15] pc: Add an SMB0 ACPI device to q35, minyard, 2019/09/19
- [PATCH 12/15] ipmi: Add an SMBus IPMI interface, minyard, 2019/09/19
- [PATCH 13/15] acpi: Add i2c serial bus CRS handling, minyard, 2019/09/19
- Re: [PATCH 00/15] ipmi: Bug fixes, add new interfaces, Paolo Bonzini, 2019/09/20
- Re: [PATCH 00/15] ipmi: Bug fixes, add new interfaces, Peter Maydell, 2019/09/20