[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 37/48] acpi/ghes: don't crash QEMU if ghes GED is not found
From: |
Michael S. Tsirkin |
Subject: |
[PULL 37/48] acpi/ghes: don't crash QEMU if ghes GED is not found |
Date: |
Wed, 15 Jan 2025 13:10:25 -0500 |
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Make error handling within ghes_record_cper_errors() consistent,
i.e. instead abort just print a error in case ghes GED is not found.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id:
<c7e1665ba46df321f0ce161d60dfd681ab827535.1736945236.git.mchehab+huawei@kernel.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/ghes.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c
index 66bd98337a..6843ddf64b 100644
--- a/hw/acpi/ghes.c
+++ b/hw/acpi/ghes.c
@@ -371,7 +371,10 @@ void ghes_record_cper_errors(const void *cper, size_t len,
acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED,
NULL));
- g_assert(acpi_ged_state);
+ if (!acpi_ged_state) {
+ error_setg(errp, "Can't find ACPI_GED object");
+ return;
+ }
ags = &acpi_ged_state->ghes_state;
start_addr = le64_to_cpu(ags->ghes_addr_le);
--
MST
- [PULL 32/48] acpi/ghes: Remove a duplicated out of bounds check, (continued)
- [PULL 32/48] acpi/ghes: Remove a duplicated out of bounds check, Michael S. Tsirkin, 2025/01/15
- [PULL 15/48] intel_iommu: Flush stage-1 cache in iotlb invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 16/48] intel_iommu: Process PASID-based iotlb invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 40/48] acpi/ghes: move offset calculus to a separate function, Michael S. Tsirkin, 2025/01/15
- [PULL 21/48] intel_iommu: Set default aw_bits to 48 starting from QEMU 9.2, Michael S. Tsirkin, 2025/01/15
- [PULL 22/48] tests/acpi: q35: Update host address width in DMAR, Michael S. Tsirkin, 2025/01/15
- [PULL 41/48] acpi/ghes: Change ghes fill logic to work with only one source, Michael S. Tsirkin, 2025/01/15
- [PULL 46/48] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`, Michael S. Tsirkin, 2025/01/15
- [PULL 28/48] acpi/ghes: simplify acpi_ghes_record_errors() code, Michael S. Tsirkin, 2025/01/15
- [PULL 25/48] tests/qtest: Add intel-iommu test, Michael S. Tsirkin, 2025/01/15
- [PULL 37/48] acpi/ghes: don't crash QEMU if ghes GED is not found,
Michael S. Tsirkin <=
- [PULL 30/48] acpi/ghes: better handle source_id and notification, Michael S. Tsirkin, 2025/01/15
- [PULL 44/48] pci: acpi: Windows 'PCI Label Id' bug workaround, Michael S. Tsirkin, 2025/01/15
- [PULL 48/48] virtio-net: vhost-user: Implement internal migration, Michael S. Tsirkin, 2025/01/15
- [PULL 36/48] acpi/ghes: better name GHES memory error function, Michael S. Tsirkin, 2025/01/15
- [PULL 35/48] acpi/ghes: make the GHES record generation more generic, Michael S. Tsirkin, 2025/01/15
- [PULL 39/48] acpi/ghes: better name the offset of the hardware error firmware, Michael S. Tsirkin, 2025/01/15
- [PULL 38/48] acpi/ghes: rename etc/hardware_error file macros, Michael S. Tsirkin, 2025/01/15
- [PULL 42/48] docs: acpi_hest_ghes: fix documentation for CPER size, Michael S. Tsirkin, 2025/01/15
- [PULL 47/48] vhost: Add stubs for the migration state transfer interface, Michael S. Tsirkin, 2025/01/15
- [PULL 43/48] tests: acpi: whitelist expected blobs, Michael S. Tsirkin, 2025/01/15