conf: Introduce pstore device

The aim of pstore device is to provide a bit of NVRAM storage for
guest kernel to record oops/panic logs just before the it
crashes. Typical usage includes usage in combination with a
watchdog so that the logs can be inspected after the watchdog
rebooted the machine. While Linux kernel (and possibly Windows
too) support many backends, in QEMU there's just 'acpi-erst'
device so stick with that for now. The device must be attached to
a PCI bus and needs two additional values (well, corresponding
memory-backend-file needs them): size and path. Despite using
memory-backend-file this does NOT add any additional RAM to the
guest and thus I've decided to expose it as another device type
instead of memory model.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
This commit is contained in:
Michal Privoznik
2024-06-04 17:45:48 +02:00
parent 4a9c2d9bbe
commit 90e50e67c6
23 changed files with 419 additions and 0 deletions

View File

@@ -8659,6 +8659,38 @@ The optional attribute ``backend`` is required if the ``type`` is ``qemu``, the
...
Pstore
~~~~~~~~~
Pstore is an oops/panic logger that writes its logs to a block device and
non-block device before the system crashes. Currently only ACPI Error Record
Serialization Table, ERST, is supported. This feature is designed for storing
error records in persistent storage for future reference and/or debugging.
:since:`Since v10.6.0`
::
...
<pstore backend='acpi-erst'>
<path>/tmp/guest_acpi_esrt</path>
<size unit='KiB'>8</size>
<address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
</pstore>
...
The ``pstore`` element has one mandatory attribute ``backend`` which selects
desired backend (only ``acpi-erst`` is accepted for now). Then it has the
following child elements:
``path``
Represents a path in the host that backs the pstore device in the guest. It
is mandatory.
``size``
Configures the size of the persistent storage available to the guest. It is
mandatory.
Security label
--------------