]> git.proxmox.com Git - mirror_qemu.git/commitdiff
include: Move hardware version declarations to new qemu/hw-version.h
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Feb 2022 20:08:56 +0000 (20:08 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 21 Feb 2022 13:30:20 +0000 (13:30 +0000)
The "hardware version" machinery (qemu_set_hw_version(),
qemu_hw_version(), and the QEMU_HW_VERSION define) is used by fewer
than 10 files.  Move it out from osdep.h into a new
qemu/hw-version.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220208200856.3558249-6-peter.maydell@linaro.org

hw/arm/nseries.c
hw/ide/core.c
hw/scsi/megasas.c
hw/scsi/scsi-bus.c
hw/scsi/scsi-disk.c
include/qemu/hw-version.h [new file with mode: 0644]
include/qemu/osdep.h
softmmu/vl.c
target/i386/cpu.c
target/s390x/cpu_models.c
util/osdep.c

index af3164c5519ec9991cf4d9a8ea9ca0da5478ff01..9c1cafae86bed036ad33ae40e6ec452d49e1d110 100644 (file)
@@ -24,6 +24,7 @@
 #include "chardev/char.h"
 #include "qemu/cutils.h"
 #include "qemu/bswap.h"
+#include "qemu/hw-version.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
index e28f8aad6111f080b1aa9fec16c7b8d1d3d93cd0..33463d9b8f2e652e8c6ec8bdae9b404233db8232 100644 (file)
@@ -29,6 +29,7 @@
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "qemu/timer.h"
+#include "qemu/hw-version.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
index cd43945827c7ec5a2656524d6c2745cd16475a6f..d5dfb412bac4251c9fa06eb416b4596ffdff4dcd 100644 (file)
@@ -28,6 +28,7 @@
 #include "hw/pci/msix.h"
 #include "qemu/iov.h"
 #include "qemu/module.h"
+#include "qemu/hw-version.h"
 #include "hw/scsi/scsi.h"
 #include "scsi/constants.h"
 #include "trace.h"
index 4057e04ce8917be9bd332f85183dd3f85056f1f7..b2e2bc3c96c5e168162d93fb87ba156d9e5897cc 100644 (file)
@@ -3,6 +3,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
+#include "qemu/hw-version.h"
 #include "hw/qdev-properties.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
index 9c0dc7b9468b77279c0cec36928dc17ba13277cb..3666b8d94687ff97f481f6e49127ec0737b08371 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
+#include "qemu/hw-version.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
 #include "migration/vmstate.h"
diff --git a/include/qemu/hw-version.h b/include/qemu/hw-version.h
new file mode 100644 (file)
index 0000000..730a8c9
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * QEMU "hardware version" machinery
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_HW_VERSION_H
+#define QEMU_HW_VERSION_H
+
+/*
+ * Starting on QEMU 2.5, qemu_hw_version() returns "2.5+" by default
+ * instead of QEMU_VERSION, so setting hw_version on MachineClass
+ * is no longer mandatory.
+ *
+ * Do NOT change this string, or it will break compatibility on all
+ * machine classes that don't set hw_version.
+ */
+#define QEMU_HW_VERSION "2.5+"
+
+/* QEMU "hardware version" setting. Used to replace code that exposed
+ * QEMU_VERSION to guests in the past and need to keep compatibility.
+ * Do not use qemu_hw_version() in new code.
+ */
+void qemu_set_hw_version(const char *);
+const char *qemu_hw_version(void);
+
+#endif
index 61808edc69f22ba22b3b1f2bf6a5924da236ab1f..7bcce3bceb0f89f7f2cca3cf15630063ca8e68b7 100644 (file)
@@ -534,22 +534,6 @@ static inline void qemu_timersub(const struct timeval *val1,
 
 void qemu_set_cloexec(int fd);
 
-/* Starting on QEMU 2.5, qemu_hw_version() returns "2.5+" by default
- * instead of QEMU_VERSION, so setting hw_version on MachineClass
- * is no longer mandatory.
- *
- * Do NOT change this string, or it will break compatibility on all
- * machine classes that don't set hw_version.
- */
-#define QEMU_HW_VERSION "2.5+"
-
-/* QEMU "hardware version" setting. Used to replace code that exposed
- * QEMU_VERSION to guests in the past and need to keep compatibility.
- * Do not use qemu_hw_version() in new code.
- */
-void qemu_set_hw_version(const char *);
-const char *qemu_hw_version(void);
-
 void fips_set_state(bool requested);
 bool fips_get_state(void);
 
index 5e1b35ba489561c2e800309fc15a2766b687e3df..1fe028800fdf19d576d59e5541bfb89956e9dd9a 100644 (file)
@@ -36,6 +36,7 @@
 #include "qemu-version.h"
 #include "qemu/cutils.h"
 #include "qemu/help_option.h"
+#include "qemu/hw-version.h"
 #include "qemu/uuid.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
index aa9e6368004c7490ea63cc28ee3f9fe498771899..c9954df4a743d4adfa6ed19263f25a54e482cde5 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/units.h"
 #include "qemu/cutils.h"
 #include "qemu/qemu-print.h"
+#include "qemu/hw-version.h"
 #include "cpu.h"
 #include "tcg/helper-tcg.h"
 #include "sysemu/reset.h"
index 11e06cc51fab915e70e588372457c53e448591a6..17ae771939b4e60f1d631c9b1c392f0af9a3e81c 100644 (file)
@@ -19,6 +19,7 @@
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qemu/module.h"
+#include "qemu/hw-version.h"
 #include "qemu/qemu-print.h"
 #ifndef CONFIG_USER_ONLY
 #include "sysemu/sysemu.h"
index 5181f86b82f526f6c8d0af93b4b53f4b84159218..723cdcb004fef6e023fccd4937b34b6ec3c9e8f6 100644 (file)
@@ -40,6 +40,7 @@ extern int madvise(char *, size_t, int);
 #include "qemu/error-report.h"
 #include "qemu/madvise.h"
 #include "qemu/mprotect.h"
+#include "qemu/hw-version.h"
 #include "monitor/monitor.h"
 
 static bool fips_enabled = false;