[PATCH v3 0/5] ipmi: bmc-sim improvements

Nicholas Piggin posted 5 patches 8 months, 3 weeks ago
Failed in applying to current master (apply log)
include/hw/ipmi/ipmi.h     |  15 ++++++
hw/acpi/ipmi.c             |   3 +-
hw/ipmi/ipmi_bmc_sim.c     | 104 ++++++++++++++++++++++++++++++++-----
hw/ipmi/ipmi_bt.c          |   2 +
hw/ipmi/ipmi_kcs.c         |   1 +
hw/ipmi/isa_ipmi_bt.c      |   1 +
hw/ipmi/isa_ipmi_kcs.c     |   1 +
hw/ipmi/pci_ipmi_bt.c      |  50 +++++++++++-------
hw/ipmi/pci_ipmi_kcs.c     |  11 ++++
hw/smbios/smbios_type_38.c |   7 ++-
10 files changed, 162 insertions(+), 33 deletions(-)
[PATCH v3 0/5] ipmi: bmc-sim improvements
Posted by Nicholas Piggin 8 months, 3 weeks ago
These little things came up when looking at behaviour of IPMI with
the bmc-sim implementation running the ppc powernv machine, and
trying to clean up error messages and missing features.

Since v1 (thanks to Corey for review and suggestions):
- Added fwinfo to PCI devices
- Report interrupt number in Get Channel Info for ISA, PCI, and
  unknown/unassigned.
- Fix error reporting for Get Channel Info unsupported channels.
  Verify it is the correct error code that ipmitool looks for
  https://github.com/ipmitool/ipmitool/blob/master/lib/ipmi_channel.c#L256C16-L256C45
- Change _CH_ to _CHANNEL_ in some defines names.
- Also avoid adding event logs with watchdog don't log flag.

Since v2:
- Don't log watchog flag should not apply to watchdog expiry
  field.
- Moved protocol type field from class to IPMIFwInfo.
- Rename new FwInfo member irq to irq_source.
- Add comments about handling PCI devices to  existing callers
  of ->fwinfo

Thanks,
Nick


Nicholas Piggin (5):
  ipmi/pci-ipmi-bt: Rename copy-paste variables
  ipmi: add fwinfo to pci ipmi devices
  ipmi/bmc-sim: Add 'Get Channel Info' command
  ipmi/bmc-sim: implement watchdog dont log flag
  ipmi/bmc-sim: add error handling for 'Set BMC Global Enables' command

 include/hw/ipmi/ipmi.h     |  15 ++++++
 hw/acpi/ipmi.c             |   3 +-
 hw/ipmi/ipmi_bmc_sim.c     | 104 ++++++++++++++++++++++++++++++++-----
 hw/ipmi/ipmi_bt.c          |   2 +
 hw/ipmi/ipmi_kcs.c         |   1 +
 hw/ipmi/isa_ipmi_bt.c      |   1 +
 hw/ipmi/isa_ipmi_kcs.c     |   1 +
 hw/ipmi/pci_ipmi_bt.c      |  50 +++++++++++-------
 hw/ipmi/pci_ipmi_kcs.c     |  11 ++++
 hw/smbios/smbios_type_38.c |   7 ++-
 10 files changed, 162 insertions(+), 33 deletions(-)

-- 
2.47.1
Re: [PATCH v3 0/5] ipmi: bmc-sim improvements
Posted by Corey Minyard 8 months, 3 weeks ago
On Wed, Apr 02, 2025 at 12:01:47AM +1000, Nicholas Piggin wrote:
> These little things came up when looking at behaviour of IPMI with
> the bmc-sim implementation running the ppc powernv machine, and
> trying to clean up error messages and missing features.

This all looks good to me.  Thanks to Philippe for reviewing, too.

I can give you an

Acked-by: Corey Minyard <cminyard@mvista.com>

if you are working on this for your own tree, or I can take it into
mine.

-corey

> 
> Since v1 (thanks to Corey for review and suggestions):
> - Added fwinfo to PCI devices
> - Report interrupt number in Get Channel Info for ISA, PCI, and
>   unknown/unassigned.
> - Fix error reporting for Get Channel Info unsupported channels.
>   Verify it is the correct error code that ipmitool looks for
>   https://github.com/ipmitool/ipmitool/blob/master/lib/ipmi_channel.c#L256C16-L256C45
> - Change _CH_ to _CHANNEL_ in some defines names.
> - Also avoid adding event logs with watchdog don't log flag.
> 
> Since v2:
> - Don't log watchog flag should not apply to watchdog expiry
>   field.
> - Moved protocol type field from class to IPMIFwInfo.
> - Rename new FwInfo member irq to irq_source.
> - Add comments about handling PCI devices to  existing callers
>   of ->fwinfo
> 
> Thanks,
> Nick
> 
> 
> Nicholas Piggin (5):
>   ipmi/pci-ipmi-bt: Rename copy-paste variables
>   ipmi: add fwinfo to pci ipmi devices
>   ipmi/bmc-sim: Add 'Get Channel Info' command
>   ipmi/bmc-sim: implement watchdog dont log flag
>   ipmi/bmc-sim: add error handling for 'Set BMC Global Enables' command
> 
>  include/hw/ipmi/ipmi.h     |  15 ++++++
>  hw/acpi/ipmi.c             |   3 +-
>  hw/ipmi/ipmi_bmc_sim.c     | 104 ++++++++++++++++++++++++++++++++-----
>  hw/ipmi/ipmi_bt.c          |   2 +
>  hw/ipmi/ipmi_kcs.c         |   1 +
>  hw/ipmi/isa_ipmi_bt.c      |   1 +
>  hw/ipmi/isa_ipmi_kcs.c     |   1 +
>  hw/ipmi/pci_ipmi_bt.c      |  50 +++++++++++-------
>  hw/ipmi/pci_ipmi_kcs.c     |  11 ++++
>  hw/smbios/smbios_type_38.c |   7 ++-
>  10 files changed, 162 insertions(+), 33 deletions(-)
> 
> -- 
> 2.47.1
>
Re: [PATCH v3 0/5] ipmi: bmc-sim improvements
Posted by Nicholas Piggin 8 months, 1 week ago
On Wed Apr 2, 2025 at 5:17 AM AEST, Corey Minyard wrote:
> On Wed, Apr 02, 2025 at 12:01:47AM +1000, Nicholas Piggin wrote:
>> These little things came up when looking at behaviour of IPMI with
>> the bmc-sim implementation running the ppc powernv machine, and
>> trying to clean up error messages and missing features.
>
> This all looks good to me.  Thanks to Philippe for reviewing, too.
>
> I can give you an
>
> Acked-by: Corey Minyard <cminyard@mvista.com>
>
> if you are working on this for your own tree, or I can take it into
> mine.

Hey Corey,

Thanks for all the review, and sorry I missed your question...

I don't have anything further in my tree, I don't have an
immediate need for it, it was just tidying up a few errors
and warnings I noticed.

I'd be happy for you to take it in your tree and send it up
when it suits you.

Thanks,
Nick
Re: [PATCH v3 0/5] ipmi: bmc-sim improvements
Posted by Corey Minyard 8 months, 1 week ago
On Fri, Apr 11, 2025 at 04:25:10PM +1000, Nicholas Piggin wrote:
> On Wed Apr 2, 2025 at 5:17 AM AEST, Corey Minyard wrote:
> > On Wed, Apr 02, 2025 at 12:01:47AM +1000, Nicholas Piggin wrote:
> >> These little things came up when looking at behaviour of IPMI with
> >> the bmc-sim implementation running the ppc powernv machine, and
> >> trying to clean up error messages and missing features.
> >
> > This all looks good to me.  Thanks to Philippe for reviewing, too.
> >
> > I can give you an
> >
> > Acked-by: Corey Minyard <cminyard@mvista.com>
> >
> > if you are working on this for your own tree, or I can take it into
> > mine.
> 
> Hey Corey,
> 
> Thanks for all the review, and sorry I missed your question...
> 
> I don't have anything further in my tree, I don't have an
> immediate need for it, it was just tidying up a few errors
> and warnings I noticed.
> 
> I'd be happy for you to take it in your tree and send it up
> when it suits you.

Ok, it's in my tree.  I had to fix up pci_ipmi_kcs.c, it defined
pci_ipmi_bt_get_fwinfo, not pci_ipmi_kcs_get_fwinfo.

-corey

> 
> Thanks,
> Nick
Re: [PATCH v3 0/5] ipmi: bmc-sim improvements
Posted by Nicholas Piggin 8 months, 1 week ago
On Sat Apr 12, 2025 at 4:20 AM AEST, Corey Minyard wrote:
> On Fri, Apr 11, 2025 at 04:25:10PM +1000, Nicholas Piggin wrote:
>> On Wed Apr 2, 2025 at 5:17 AM AEST, Corey Minyard wrote:
>> > On Wed, Apr 02, 2025 at 12:01:47AM +1000, Nicholas Piggin wrote:
>> >> These little things came up when looking at behaviour of IPMI with
>> >> the bmc-sim implementation running the ppc powernv machine, and
>> >> trying to clean up error messages and missing features.
>> >
>> > This all looks good to me.  Thanks to Philippe for reviewing, too.
>> >
>> > I can give you an
>> >
>> > Acked-by: Corey Minyard <cminyard@mvista.com>
>> >
>> > if you are working on this for your own tree, or I can take it into
>> > mine.
>> 
>> Hey Corey,
>> 
>> Thanks for all the review, and sorry I missed your question...
>> 
>> I don't have anything further in my tree, I don't have an
>> immediate need for it, it was just tidying up a few errors
>> and warnings I noticed.
>> 
>> I'd be happy for you to take it in your tree and send it up
>> when it suits you.
>
> Ok, it's in my tree.  I had to fix up pci_ipmi_kcs.c, it defined
> pci_ipmi_bt_get_fwinfo, not pci_ipmi_kcs_get_fwinfo.

Thanks, I noiced that just now too I thought I'd had a config
that built it but clearly not :( Sorry.

Thanks,
Nick