Skip to content
  • Jinhua Cao's avatar
    9e744990
    ipmi/sim: fix watchdog_expired data type error in IPMIBmcSim struct · 9e744990
    Jinhua Cao authored
    
    
    1) watchdog_expired is set bool which value could only be 0 or 1,
    but watchdog_expired every bit mean different Timer Use.
    
    2) Use the command  -ipmitool mc get watchdog-  to query
    ipmi-watchdog status in guest.
    ...
    [root@localhost ~]# ipmitool mc watchdog get
    Watchdog Timer Use:     SMS/OS (0x44)
    Watchdog Timer Is:      Started/Running
    Watchdog Timer Actions: Hard Reset (0x01)
    Pre-timeout interval:   0 seconds
    Timer Expiration Flags: 0x00
    Initial Countdown:      60 sec
    Present Countdown:      57 sec
    ...
    bool for watchdog_expired results -Timer Expiration Flags- always
    be 0x00 or 0x01, but the -Timer Expiration Flags- indicts the Timer Use
    after timeout. So change watchdog_expired data type from bool to uint8_t
    to fix this problem.
    
    Signed-off-by: default avatarJinhua Cao <caojinhua1@huawei.com>
    Message-Id: <20210625021232.73614-1-caojinhua1@huawei.com>
    [I checked, a bool and uint8 are the same size for the vmstate transfer,
     so this should be fine.]
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    9e744990
    ipmi/sim: fix watchdog_expired data type error in IPMIBmcSim struct
    Jinhua Cao authored
    
    
    1) watchdog_expired is set bool which value could only be 0 or 1,
    but watchdog_expired every bit mean different Timer Use.
    
    2) Use the command  -ipmitool mc get watchdog-  to query
    ipmi-watchdog status in guest.
    ...
    [root@localhost ~]# ipmitool mc watchdog get
    Watchdog Timer Use:     SMS/OS (0x44)
    Watchdog Timer Is:      Started/Running
    Watchdog Timer Actions: Hard Reset (0x01)
    Pre-timeout interval:   0 seconds
    Timer Expiration Flags: 0x00
    Initial Countdown:      60 sec
    Present Countdown:      57 sec
    ...
    bool for watchdog_expired results -Timer Expiration Flags- always
    be 0x00 or 0x01, but the -Timer Expiration Flags- indicts the Timer Use
    after timeout. So change watchdog_expired data type from bool to uint8_t
    to fix this problem.
    
    Signed-off-by: default avatarJinhua Cao <caojinhua1@huawei.com>
    Message-Id: <20210625021232.73614-1-caojinhua1@huawei.com>
    [I checked, a bool and uint8 are the same size for the vmstate transfer,
     so this should be fine.]
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Loading