[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType |
Date: |
Tue, 29 Dec 2020 14:21:22 +0100 |
On Mon, 14 Dec 2020 15:50:28 -0500
Eduardo Habkost <ehabkost@redhat.com> wrote:
> This prepares for exposing the SMBIOS entry point type as a
> machine property on x86.
>
> Based on a patch from Daniel P. Berrangé.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> First version of this code was submitted at:
> https://lore.kernel.org/qemu-devel/20200908165438.1008942-5-berrange@redhat.com
>
> Changes from v1:
> * Patch was split in two
> * Declarations were moved to qapi/smbios.json
> * Documentation was updated to use the same terminology used in
> SMBIOS documentation
> * Documentation was updated to "Since: 6.0"
> ---
> qapi/qapi-schema.json | 1 +
> qapi/smbios.json | 11 +++++++++++
> include/hw/firmware/smbios.h | 10 ++--------
> qapi/meson.build | 1 +
> 4 files changed, 15 insertions(+), 8 deletions(-)
> create mode 100644 qapi/smbios.json
>
> diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
> index 0b444b76d2..87a183fb13 100644
> --- a/qapi/qapi-schema.json
> +++ b/qapi/qapi-schema.json
> @@ -86,6 +86,7 @@
> { 'include': 'machine.json' }
> { 'include': 'machine-target.json' }
> { 'include': 'replay.json' }
> +{ 'include': 'smbios.json' }
> { 'include': 'misc.json' }
> { 'include': 'misc-target.json' }
> { 'include': 'audio.json' }
> diff --git a/qapi/smbios.json b/qapi/smbios.json
> new file mode 100644
> index 0000000000..55b3bd2e83
> --- /dev/null
> +++ b/qapi/smbios.json
> @@ -0,0 +1,11 @@
> +##
> +# @SmbiosEntryPointType:
> +#
> +# @2_1: SMBIOS version 2.1 (32-bit) Entry Point
> +#
> +# @3_0: SMBIOS version 3.0 (64-bit) Entry Point
> +#
> +# Since: 6.0
> +##
> +{ 'enum': 'SmbiosEntryPointType',
> + 'data': [ '2_1', '3_0' ] }
> diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
> index 5467ecec78..b3beef1606 100644
> --- a/include/hw/firmware/smbios.h
> +++ b/include/hw/firmware/smbios.h
> @@ -1,6 +1,8 @@
> #ifndef QEMU_SMBIOS_H
> #define QEMU_SMBIOS_H
>
> +#include "qapi/qapi-types-smbios.h"
> +
> /*
> * SMBIOS Support
> *
> @@ -23,14 +25,6 @@ struct smbios_phys_mem_area {
> uint64_t length;
> };
>
> -/*
> - * SMBIOS spec defined tables
> - */
> -typedef enum SmbiosEntryPointType {
> - SMBIOS_ENTRY_POINT_TYPE_2_1,
> - SMBIOS_ENTRY_POINT_TYPE_3_0,
> -} SmbiosEntryPointType;
> -
> /* SMBIOS Entry Point
> * There are two types of entry points defined in the SMBIOS specification
> * (see below). BIOS must place the entry point(s) at a 16-byte-aligned
> diff --git a/qapi/meson.build b/qapi/meson.build
> index 0e98146f1f..f7fb73d41b 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -42,6 +42,7 @@ qapi_all_modules = [
> 'replay',
> 'rocker',
> 'run-state',
> + 'smbios',
> 'sockets',
> 'tpm',
> 'trace',
- [PATCH v2 0/3] pc: Support configuration of SMBIOS entry point type, Eduardo Habkost, 2020/12/14
- [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType, Eduardo Habkost, 2020/12/14
- Re: [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType,
Igor Mammedov <=
- [PATCH v2 1/3] smbios: Rename SMBIOS_ENTRY_POINT_* enums, Eduardo Habkost, 2020/12/14
- [PATCH v2 3/3] hw/i386: expose a "smbios-ep" PC machine property, Eduardo Habkost, 2020/12/14
- Re: [PATCH v2 0/3] pc: Support configuration of SMBIOS entry point type, Igor Mammedov, 2020/12/29
- Re: [PATCH v2 0/3] pc: Support configuration of SMBIOS entry point type, Philippe Mathieu-Daudé, 2020/12/29