[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/65] hw/acpi: Make storage of node id uint32_t to reduce fragili
From: |
Michael S. Tsirkin |
Subject: |
[PULL 13/65] hw/acpi: Make storage of node id uint32_t to reduce fragility |
Date: |
Mon, 4 Nov 2024 16:06:21 -0500 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>From review of generic port introduction.
The value is handled as a uint32_t so store it in that type.
The value cannot in reality exceed MAX_NODES which is currently
128 but if the types are matched there is no need to rely on that
restriction.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240916174237.1843213-1-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/acpi/aml-build.h | 2 +-
hw/acpi/aml-build.c | 2 +-
hw/acpi/pci.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 47a4692a7d..4fd5da49e7 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -486,7 +486,7 @@ Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set,
uint32_t io_offset,
void build_srat_memory(GArray *table_data, uint64_t base,
uint64_t len, int node, MemoryAffinityFlags flags);
-void build_srat_pci_generic_initiator(GArray *table_data, int node,
+void build_srat_pci_generic_initiator(GArray *table_data, uint32_t node,
uint16_t segment, uint8_t bus,
uint8_t devfn);
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 7a06ffec5a..6a76626177 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1972,7 +1972,7 @@ static void build_append_srat_acpi_device_handle(GArray
*table_data,
* 5.2.16.6 Generic Initiator Affinity Structure
* With PCI Device Handle.
*/
-void build_srat_pci_generic_initiator(GArray *table_data, int node,
+void build_srat_pci_generic_initiator(GArray *table_data, uint32_t node,
uint16_t segment, uint8_t bus,
uint8_t devfn)
{
diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c
index d7a0e91f01..a4835ce563 100644
--- a/hw/acpi/pci.c
+++ b/hw/acpi/pci.c
@@ -72,7 +72,7 @@ typedef struct AcpiGenericInitiator {
/* public */
char *pci_dev;
- uint16_t node;
+ uint32_t node;
} AcpiGenericInitiator;
typedef struct AcpiGenericInitiatorClass {
--
MST
- [PULL 05/65] hw/acpi: Move AML building code for Generic Initiators to aml_build.c, (continued)
- [PULL 05/65] hw/acpi: Move AML building code for Generic Initiators to aml_build.c, Michael S. Tsirkin, 2024/11/04
- [PULL 06/65] hw/acpi: Rename build_all_acpi_generic_initiators() to build_acpi_generic_initiator(), Michael S. Tsirkin, 2024/11/04
- [PULL 07/65] hw/pci: Add a busnr property to pci_props and use for acpi/gi, Michael S. Tsirkin, 2024/11/04
- [PULL 08/65] acpi/pci: Move Generic Initiator object handling into acpi/pci.*, Michael S. Tsirkin, 2024/11/04
- [PULL 09/65] hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS, Michael S. Tsirkin, 2024/11/04
- [PULL 10/65] hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT, Michael S. Tsirkin, 2024/11/04
- [PULL 11/65] hw/pci-host/gpex-acpi: Use acpi_uid property., Michael S. Tsirkin, 2024/11/04
- [PULL 12/65] hw/acpi: Generic Port Affinity Structure support, Michael S. Tsirkin, 2024/11/04
- [PULL 13/65] hw/acpi: Make storage of node id uint32_t to reduce fragility,
Michael S. Tsirkin <=
- [PULL 14/65] hw/acpi: Generic Initiator - add missing object class property descriptions., Michael S. Tsirkin, 2024/11/04
- [PULL 15/65] hw/pci-bridge/cxl_root_port: Provide x-speed and x-width properties., Michael S. Tsirkin, 2024/11/04
- [PULL 16/65] hw/pci-bridge/cxl_upstream: Provide x-speed and x-width properties., Michael S. Tsirkin, 2024/11/04
- [PULL 17/65] hw/pcie: Factor out PCI Express link register filling common to EP., Michael S. Tsirkin, 2024/11/04
- [PULL 18/65] hw/pcie: Provide a utility function for control of EP / SW USP link, Michael S. Tsirkin, 2024/11/04
- [PULL 19/65] hw/mem/cxl-type3: Add properties to control link speed and width, Michael S. Tsirkin, 2024/11/04
- [PULL 20/65] hw/pci-bridge/cxl-upstream: Add properties to control link speed and width, Michael S. Tsirkin, 2024/11/04
- [PULL 21/65] qdev-monitor: add option to report GenericError from find_device_state, Michael S. Tsirkin, 2024/11/04
- [PULL 22/65] vhost-user-blk: split vhost_user_blk_sync_config(), Michael S. Tsirkin, 2024/11/04
- [PULL 23/65] qapi: introduce device-sync-config, Michael S. Tsirkin, 2024/11/04