lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250530080120-mutt-send-email-mst@kernel.org>
Date: Fri, 30 May 2025 08:01:28 -0400
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Igor Mammedov <imammedo@...hat.com>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Shiju Jose <shiju.jose@...wei.com>, qemu-arm@...gnu.org,
	qemu-devel@...gnu.org,
	Philippe Mathieu-Daudé <philmd@...aro.org>,
	Ani Sinha <anisinha@...hat.com>,
	Eduardo Habkost <eduardo@...kost.net>,
	Marcel Apfelbaum <marcel.apfelbaum@...il.com>,
	Peter Maydell <peter.maydell@...aro.org>,
	Shannon Zhao <shannon.zhaosl@...il.com>,
	Yanan Wang <wangyanan55@...wei.com>, Zhao Liu <zhao1.liu@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 12/20] acpi/generic_event_device: add logic to detect
 if HEST addr is available

On Wed, May 28, 2025 at 05:42:12PM +0200, Igor Mammedov wrote:
> On Tue, 20 May 2025 08:41:31 +0200
> Mauro Carvalho Chehab <mchehab+huawei@...nel.org> wrote:
> 
> > Create a new property (x-has-hest-addr) and use it to detect if
> > the GHES table offsets can be calculated from the HEST address
> > (qemu 10.0 and upper) or via the legacy way via an offset obtained
> > from the hardware_errors firmware file.
> 
> 
> it doesn't apply to current master anymore

indeed. Mauro?

> 
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> > Reviewed-by: Igor Mammedov <imammedo@...hat.com>
> > ---
> >  hw/acpi/generic_event_device.c |  2 ++
> >  hw/arm/virt-acpi-build.c       | 18 ++++++++++++++++--
> >  hw/core/machine.c              |  5 ++++-
> >  3 files changed, 22 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> > index d292f61b4e41..3cf9dab0d01a 100644
> > --- a/hw/acpi/generic_event_device.c
> > +++ b/hw/acpi/generic_event_device.c
> > @@ -318,6 +318,8 @@ static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
> >  
> >  static const Property acpi_ged_properties[] = {
> >      DEFINE_PROP_UINT32("ged-event", AcpiGedState, ged_event_bitmap, 0),
> > +    DEFINE_PROP_BOOL("x-has-hest-addr", AcpiGedState,
> > +                     ghes_state.use_hest_addr, false),
> >  };
> >  
> >  static const VMStateDescription vmstate_memhp_state = {
> > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> > index da3ebf403ef9..3126234e657d 100644
> > --- a/hw/arm/virt-acpi-build.c
> > +++ b/hw/arm/virt-acpi-build.c
> > @@ -893,6 +893,10 @@ static const AcpiNotificationSourceId hest_ghes_notify[] = {
> >      { ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA },
> >  };
> >  
> > +static const AcpiNotificationSourceId hest_ghes_notify_10_0[] = {
> > +    { ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA },
> > +};
> > +
> >  static
> >  void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> >  {
> > @@ -947,15 +951,25 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> >  
> >      if (vms->ras) {
> >          AcpiGedState *acpi_ged_state;
> > +        static const AcpiNotificationSourceId *notify;
> > +        unsigned int notify_sz;
> >          AcpiGhesState *ags;
> >  
> >          acpi_ged_state = ACPI_GED(vms->acpi_dev);
> >          ags = &acpi_ged_state->ghes_state;
> >          if (ags) {
> >              acpi_add_table(table_offsets, tables_blob);
> > +
> > +            if (!ags->use_hest_addr) {
> > +                notify = hest_ghes_notify_10_0;
> > +                notify_sz = ARRAY_SIZE(hest_ghes_notify_10_0);
> > +            } else {
> > +                notify = hest_ghes_notify;
> > +                notify_sz = ARRAY_SIZE(hest_ghes_notify);
> > +            }
> > +
> >              acpi_build_hest(ags, tables_blob, tables->hardware_errors,
> > -                            tables->linker, hest_ghes_notify,
> > -                            ARRAY_SIZE(hest_ghes_notify),
> > +                            tables->linker, notify, notify_sz,
> >                              vms->oem_id, vms->oem_table_id);
> >          }
> >      }
> > diff --git a/hw/core/machine.c b/hw/core/machine.c
> > index b8ae155dfa11..dfd36cf063c7 100644
> > --- a/hw/core/machine.c
> > +++ b/hw/core/machine.c
> > @@ -35,9 +35,12 @@
> >  #include "hw/virtio/virtio-pci.h"
> >  #include "hw/virtio/virtio-net.h"
> >  #include "hw/virtio/virtio-iommu.h"
> > +#include "hw/acpi/generic_event_device.h"
> >  #include "audio/audio.h"
> >  
> > -GlobalProperty hw_compat_10_0[] = {};
> > +GlobalProperty hw_compat_10_0[] = {
> > +    { TYPE_ACPI_GED, "x-has-hest-addr", "false" },
> > +};
> >  const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
> >  
> >  GlobalProperty hw_compat_9_2[] = {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ