diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-02-12 10:56:26 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-02-16 14:33:39 +0100 |
| commit | 4ec96630f93ec2a1fd8bf9c9150cdae330531de8 (patch) | |
| tree | 2e7bc4a4f1b1c8560618c5a3470de47b612b8af5 /include/hw/qdev-properties-system.h | |
| parent | 788369f477a3c89023f5ab19590baee4239623bb (diff) | |
| download | focaccia-qemu-4ec96630f93ec2a1fd8bf9c9150cdae330531de8.tar.gz focaccia-qemu-4ec96630f93ec2a1fd8bf9c9150cdae330531de8.zip | |
hw/qdev-properties-system: Introduce EndianMode QAPI enum
Introduce the EndianMode type and the DEFINE_PROP_ENDIAN() macros. Endianness can be BIG, LITTLE or unspecified (default). Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250213122217.62654-2-philmd@linaro.org>
Diffstat (limited to 'include/hw/qdev-properties-system.h')
| -rw-r--r-- | include/hw/qdev-properties-system.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/qdev-properties-system.h b/include/hw/qdev-properties-system.h index 7ec37f6316..ead4dfc2f0 100644 --- a/include/hw/qdev-properties-system.h +++ b/include/hw/qdev-properties-system.h @@ -30,6 +30,7 @@ extern const PropertyInfo qdev_prop_pcie_link_speed; extern const PropertyInfo qdev_prop_pcie_link_width; extern const PropertyInfo qdev_prop_cpus390entitlement; extern const PropertyInfo qdev_prop_iothread_vq_mapping_list; +extern const PropertyInfo qdev_prop_endian_mode; #define DEFINE_PROP_PCI_DEVFN(_n, _s, _f, _d) \ DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_pci_devfn, int32_t) @@ -97,4 +98,10 @@ extern const PropertyInfo qdev_prop_iothread_vq_mapping_list; DEFINE_PROP(_name, _state, _field, qdev_prop_iothread_vq_mapping_list, \ IOThreadVirtQueueMappingList *) +#define DEFINE_PROP_ENDIAN(_name, _state, _field, _default) \ + DEFINE_PROP_UNSIGNED(_name, _state, _field, _default, \ + qdev_prop_endian_mode, EndianMode) +#define DEFINE_PROP_ENDIAN_NODEFAULT(_name, _state, _field) \ + DEFINE_PROP_ENDIAN(_name, _state, _field, ENDIAN_MODE_UNSPECIFIED) + #endif |