All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-arm@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Laszlo Ersek" <lersek@redhat.com>
Subject: [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType
Date: Mon, 14 Dec 2020 15:50:28 -0500	[thread overview]
Message-ID: <20201214205029.2991222-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20201214205029.2991222-1-ehabkost@redhat.com>

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>
---
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',
-- 
2.28.0



  parent reply	other threads:[~2020-12-14 20:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 20:50 [PATCH v2 0/3] pc: Support configuration of SMBIOS entry point type Eduardo Habkost
2020-12-14 20:50 ` [PATCH v2 1/3] smbios: Rename SMBIOS_ENTRY_POINT_* enums Eduardo Habkost
2020-12-29 13:20   ` Igor Mammedov
2020-12-14 20:50 ` Eduardo Habkost [this message]
2020-12-29 13:21   ` [PATCH v2 2/3] hw/smbios: Use qapi for SmbiosEntryPointType Igor Mammedov
2020-12-14 20:50 ` [PATCH v2 3/3] hw/i386: expose a "smbios-ep" PC machine property Eduardo Habkost
2021-01-04 22:44   ` Igor Mammedov
2021-01-05 11:02   ` Michael S. Tsirkin
2020-12-29 13:20 ` [PATCH v2 0/3] pc: Support configuration of SMBIOS entry point type Igor Mammedov
2021-01-04 22:10   ` Eduardo Habkost
2020-12-29 15:10 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201214205029.2991222-3-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.