[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] hw/smbios: use qapi for SMBIOS entry point type enum
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 4/5] hw/smbios: use qapi for SMBIOS entry point type enum |
Date: |
Tue, 8 Sep 2020 20:37:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/8/20 6:54 PM, Daniel P. Berrangé wrote:
> This refactoring prepares for exposing the SMBIOS entry point type as a
> machine property on x86.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/arm/virt.c | 2 +-
> hw/i386/pc_piix.c | 2 +-
> hw/i386/pc_q35.c | 2 +-
> hw/smbios/smbios.c | 9 +++++----
> include/hw/firmware/smbios.h | 9 ++-------
> qapi/machine.json | 12 ++++++++++++
> 6 files changed, 22 insertions(+), 14 deletions(-)
>
[...]
> diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
> index 02a0ced0a0..cb1299ad7a 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-machine.h"
Actually to reduce the churn pulled in ...
> +
> /*
> * SMBIOS Support
> *
> @@ -23,13 +25,6 @@ struct smbios_phys_mem_area {
> uint64_t length;
> };
>
> -/*
> - * SMBIOS spec defined tables
> - */
> -typedef enum SmbiosEntryPointType {
> - SMBIOS_ENTRY_POINT_21,
> - SMBIOS_ENTRY_POINT_30,
> -} SmbiosEntryPointType;
>
> /* SMBIOS Entry Point
> * There are two types of entry points defined in the SMBIOS specification
> diff --git a/qapi/machine.json b/qapi/machine.json
> index abc6fd0477..a58cf2694f 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -937,3 +937,15 @@
> 'data': 'NumaOptions',
> 'allow-preconfig': true
> }
> +
> +##
> +# @SmbiosEntryPointType:
> +#
> +# @2_1: SMBIOS version 2.1
> +#
> +# @3_0: SMBIOS version 3.0
> +#
> +# Since: 5.2
> +##
> +{ 'enum': 'SmbiosEntryPointType',
> + 'data': [ '2_1', '3_0' ] }
>
... this could be a good opportunity to add a new
qapi/firmware-smbios.json (or firmware.json?) and eventually
update docs/interop/firmware.json.
[PATCH 4/5] hw/smbios: use qapi for SMBIOS entry point type enum, Daniel P . Berrangé, 2020/09/08
[PATCH 5/5] hw/i386: expose a "smbios_ep" PC machine property, Daniel P . Berrangé, 2020/09/08
[PATCH 3/5] qemu-options: document SMBIOS type 11 settings, Daniel P . Berrangé, 2020/09/08
Re: [PATCH 0/5] Add support for loading SMBIOS OEM strings from a file, Laszlo Ersek, 2020/09/09