All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/10] acpi: Error Record Serialization Table, ERST, support for QEMU
@ 2021-06-30 19:07 Eric DeVolder
  2021-06-30 19:07 ` [PATCH v5 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Eric DeVolder
                   ` (11 more replies)
  0 siblings, 12 replies; 58+ messages in thread
From: Eric DeVolder @ 2021-06-30 19:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: ehabkost, mst, konrad.wilk, pbonzini, imammedo, boris.ostrovsky, rth

=============================
I believe I have corrected for all feedback on v4, but with
responses to certain feedback below.

In patch 1/6, Igor asks:
"you are adding empty template files here
but the later matching bios-tables-test is nowhere to be found
Was testcase lost somewhere along the way?

also it seems you add ERST only to pc/q35,
so why tests/data/acpi/microvm/ERST is here?"

I did miss setting up microvm. That has been corrected.

As for the question about lost test cases, if you are referring
to the new binary blobs for pc,q35, those were in patch
6/6. There is a qtest in patch 5/6. If I don't understand the
question, please indicate as such.


In patch 3/6, Igor asks:
"Also spec (ERST) is rather (maybe intentionally) vague on specifics,
so it would be better that before a patch that implements hw part
were a doc patch describing concrete implementation. As model
you can use docs/specs/acpi_hest_ghes.rst or other docs/specs/acpi_* files.
I'd start posting/discussing that spec within these thread
to avoid spamming list until doc is settled up."

I'm thinking that this cover letter is the bulk of the spec? But as
you say, to avoid spamming the group, we can use this thread to make
suggested changes to this cover letter which I will then convert
into a spec, for v6.


In patch 3/6, in many places Igor mentions utilizing the hostmem
mapped directly in the guest in order to avoid need-less copying.

It is true that the ERST has an "NVRAM" mode that would allow for
all the simplifications Igor points out, however, Linux does not
support this mode. This mode puts the burden of managing the NVRAM
space on the OS. So this implementation, like BIOS, is the non-NVRAM
mode.

I did go ahead and separate the registers from the exchange buffer,
which would facilitate the support of NVRAM mode.

 linux/drivers/acpi/apei/erst.c:
 /* NVRAM ERST Error Log Address Range is not supported yet */
 static void pr_unimpl_nvram(void)
 {
    if (printk_ratelimit())
        pr_warn("NVRAM ERST Log Address Range not implemented yet.\n");
 }

 static int __erst_write_to_nvram(const struct cper_record_header *record)
 {
    /* do not print message, because printk is not safe for NMI */
    return -ENOSYS;
 }

 static int __erst_read_to_erange_from_nvram(u64 record_id, u64 *offset)
 {
    pr_unimpl_nvram();
    return -ENOSYS;
 }

 static int __erst_clear_from_nvram(u64 record_id)
 {
    pr_unimpl_nvram();
    return -ENOSYS;
 }

=============================

This patchset introduces support for the ACPI Error Record
Serialization Table, ERST.

For background and implementation information, please see
docs/specs/acpi_erst.txt, which is patch 2/10.

Suggested-by: Konrad Wilk <konrad.wilk@oracle.com>
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>

---
v5: 30jun2021
 - Create docs/specs/acpi_erst.txt, per Igor
 - Separate PCI BARs for registers and memory, per Igor
 - Convert debugging to use trace infrastructure, per Igor
 - Various other fixups, per Igor

v4: 11jun2021
 - Converted to a PCI device, per Igor.
 - Updated qtest.
 - Rearranged patches, per Igor.

v3: 28may2021
 - Converted to using a TYPE_MEMORY_BACKEND_FILE object rather than
   internal array with explicit file operations, per Igor.
 - Changed the way the qdev and base address are handled, allowing
   ERST to be disabled at run-time. Also aligns better with other
   existing code.

v2: 8feb2021
 - Added qtest/smoke test per Paolo Bonzini
 - Split patch into smaller chunks, per Igor Mammedov
 - Did away with use of ACPI packed structures, per Igor Mammedov

v1: 26oct2020
 - initial post

---

Eric DeVolder (10):
  ACPI ERST: bios-tables-test.c steps 1 and 2
  ACPI ERST: specification for ERST support
  ACPI ERST: PCI device_id for ERST
  ACPI ERST: header file for ERST
  ACPI ERST: support for ACPI ERST feature
  ACPI ERST: build the ACPI ERST table
  ACPI ERST: trace support
  ACPI ERST: create ACPI ERST table for pc/x86 machines.
  ACPI ERST: qtest for ERST
  ACPI ERST: step 6 of bios-tables-test.c

 docs/specs/acpi_erst.txt     | 152 +++++++
 hw/acpi/erst.c               | 918 +++++++++++++++++++++++++++++++++++++++++++
 hw/acpi/meson.build          |   1 +
 hw/acpi/trace-events         |  14 +
 hw/i386/acpi-build.c         |   9 +
 hw/i386/acpi-microvm.c       |   9 +
 include/hw/acpi/erst.h       |  84 ++++
 include/hw/pci/pci.h         |   1 +
 tests/data/acpi/microvm/ERST | Bin 0 -> 976 bytes
 tests/data/acpi/pc/ERST      | Bin 0 -> 976 bytes
 tests/data/acpi/q35/ERST     | Bin 0 -> 976 bytes
 tests/qtest/erst-test.c      | 129 ++++++
 tests/qtest/meson.build      |   2 +
 13 files changed, 1319 insertions(+)
 create mode 100644 docs/specs/acpi_erst.txt
 create mode 100644 hw/acpi/erst.c
 create mode 100644 include/hw/acpi/erst.h
 create mode 100644 tests/data/acpi/microvm/ERST
 create mode 100644 tests/data/acpi/pc/ERST
 create mode 100644 tests/data/acpi/q35/ERST
 create mode 100644 tests/qtest/erst-test.c

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2021-08-05  9:06 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 19:07 [PATCH v5 00/10] acpi: Error Record Serialization Table, ERST, support for QEMU Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 01/10] ACPI ERST: bios-tables-test.c steps 1 and 2 Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 02/10] ACPI ERST: specification for ERST support Eric DeVolder
2021-06-30 19:26   ` Eric DeVolder
2021-07-19 15:02     ` Igor Mammedov
2021-07-21 15:42       ` Eric DeVolder
2021-07-26 10:06         ` Igor Mammedov
2021-07-26 19:52           ` Eric DeVolder
2021-07-27 11:45             ` Igor Mammedov
2021-07-28 15:16               ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 03/10] ACPI ERST: PCI device_id for ERST Eric DeVolder
2021-07-19 15:06   ` Igor Mammedov
2021-07-21 15:42     ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 04/10] ACPI ERST: header file " Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature Eric DeVolder
2021-07-20 12:17   ` Igor Mammedov
2021-07-21 16:07     ` Eric DeVolder
2021-07-26 10:42       ` Igor Mammedov
2021-07-26 20:01         ` Eric DeVolder
2021-07-27 12:52           ` Igor Mammedov
2021-08-04 22:13             ` Eric DeVolder
2021-08-05  9:05               ` Igor Mammedov
2021-07-21 17:36     ` Eric DeVolder
2021-07-26 10:13       ` Igor Mammedov
2021-06-30 19:07 ` [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table Eric DeVolder
2021-07-20 13:16   ` Igor Mammedov
2021-07-20 14:59     ` Igor Mammedov
2021-07-21 16:12     ` Eric DeVolder
2021-07-26 11:00       ` Igor Mammedov
2021-07-26 20:02         ` Eric DeVolder
2021-07-27 12:01           ` Igor Mammedov
2021-07-28 15:18             ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 07/10] ACPI ERST: trace support Eric DeVolder
2021-07-20 13:15   ` Igor Mammedov
2021-07-21 16:14     ` Eric DeVolder
2021-07-26 11:08       ` Igor Mammedov
2021-07-26 20:03         ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines Eric DeVolder
2021-07-20 13:19   ` Igor Mammedov
2021-07-21 16:16     ` Eric DeVolder
2021-07-26 11:30       ` Igor Mammedov
2021-07-26 20:03         ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 09/10] ACPI ERST: qtest for ERST Eric DeVolder
2021-07-20 13:38   ` Igor Mammedov
2021-07-21 16:18     ` Eric DeVolder
2021-07-26 11:45       ` Igor Mammedov
2021-07-26 20:06         ` Eric DeVolder
2021-06-30 19:07 ` [PATCH v5 10/10] ACPI ERST: step 6 of bios-tables-test.c Eric DeVolder
2021-07-20 13:24   ` Igor Mammedov
2021-07-21 16:19     ` Eric DeVolder
2021-07-13 20:38 ` [PATCH v5 00/10] acpi: Error Record Serialization Table, ERST, support for QEMU Michael S. Tsirkin
2021-07-21 15:23   ` Eric DeVolder
2021-07-20 14:57 ` Igor Mammedov
2021-07-21 15:26   ` Eric DeVolder
2021-07-23 16:26   ` Eric DeVolder
2021-07-27 12:55   ` Igor Mammedov
2021-07-28 15:19     ` Eric DeVolder
2021-07-29  8:07       ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.