qemu-devel.nongnu.org archive mirror
 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>,
	"Eric Blake" <eblake@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	qemu-arm@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Ani Sinha" <ani@anisinha.ca>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH v3 2/3] hw/smbios: Use qapi for SmbiosEntryPointType
Date: Tue, 26 Oct 2021 11:10:59 -0400	[thread overview]
Message-ID: <20211026151100.1691925-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20211026151100.1691925-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 v2:
* Rename "2_0"/"3_1" to "32"/"64", to
  make the names more QAPI-friendly (as underscores and dots are
  not allowed by QAPI)
* Move definition from smbios.json back to machine.json
  (no need for a separate file just for one enum)

Changes from v1:
* Patch was split in two
* Moved definition to smbios.json
---
 include/hw/firmware/smbios.h | 10 ++--------
 qapi/machine.json            | 12 ++++++++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
index d916baed6a9..4b7ad77a44f 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"
+
 /*
  * 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_32,
-    SMBIOS_ENTRY_POINT_TYPE_64,
-} 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/machine.json b/qapi/machine.json
index 5db54df298f..0a13579275f 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1411,3 +1411,15 @@
      '*cores': 'int',
      '*threads': 'int',
      '*maxcpus': 'int' } }
+
+##
+# @SmbiosEntryPointType:
+#
+# @32: SMBIOS version 2.1 (32-bit) Entry Point
+#
+# @64: SMBIOS version 3.0 (64-bit) Entry Point
+#
+# Since: 6.1
+##
+{ 'enum': 'SmbiosEntryPointType',
+  'data': [ '32', '64' ] }
-- 
2.32.0



  parent reply	other threads:[~2021-10-26 15:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 15:10 [PATCH v3 0/3] pc: Support configuration of SMBIOS entry point type Eduardo Habkost
2021-10-26 15:10 ` [PATCH v3 1/3] smbios: Rename SMBIOS_ENTRY_POINT_* enums Eduardo Habkost
2021-10-26 15:13   ` Philippe Mathieu-Daudé
2021-10-27  7:43   ` Michael S. Tsirkin
2021-10-27 14:23     ` Eduardo Habkost
2021-10-26 15:10 ` Eduardo Habkost [this message]
2021-10-26 15:14   ` [PATCH v3 2/3] hw/smbios: Use qapi for SmbiosEntryPointType Philippe Mathieu-Daudé
2021-11-03 10:03   ` Markus Armbruster
2021-10-26 15:11 ` [PATCH v3 3/3] hw/i386: expose a "smbios-entry-point-type" PC machine property Eduardo Habkost
2021-11-02  8:51   ` Philippe Mathieu-Daudé
2021-11-02 11:25     ` Michael S. Tsirkin
2021-11-10 22:06       ` Eduardo Habkost
2021-11-22  9:08       ` Gerd Hoffmann
2021-11-01 22:32 ` [PATCH v3 0/3] pc: Support configuration of SMBIOS entry point type Michael S. Tsirkin

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=20211026151100.1691925-3-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=imammedo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).