[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME
|
From: |
Thomas Huth |
|
Subject: |
[PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME in common code |
|
Date: |
Mon, 15 May 2023 15:02:26 +0200 |
In some spots, it would be helpful to be able to use TARGET_NAME
in common (target independent) code, too. Thus introduce a wrapper
that can be called from common code, too, just like we already
have one for target_words_bigendian().
Message-Id: <20230424160434.331175-3-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/hw/core/cpu.h | 2 ++
cpu.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 5a019a27bc..39150cf8f8 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1013,6 +1013,8 @@ void cpu_exec_unrealizefn(CPUState *cpu);
*/
bool target_words_bigendian(void);
+const char *target_name(void);
+
void page_size_init(void);
#ifdef NEED_CPU_H
diff --git a/cpu.c b/cpu.c
index 9105c85404..65ebaf8159 100644
--- a/cpu.c
+++ b/cpu.c
@@ -427,6 +427,11 @@ bool target_words_bigendian(void)
#endif
}
+const char *target_name(void)
+{
+ return TARGET_NAME;
+}
+
void page_size_init(void)
{
/* NOTE: we can always suppose that qemu_host_page_size >=
--
2.31.1
- [PULL 00/21] Tests, docs, s390x and misc patches, Thomas Huth, 2023/05/15
- [PULL 02/21] sysemu/kvm: Remove unused headers, Thomas Huth, 2023/05/15
- [PULL 03/21] net: stream: test reconnect option with an unix socket, Thomas Huth, 2023/05/15
- [PULL 01/21] tests/avocado/virtio-gpu: Fix the URLs of the test_virtio_vga_virgl test, Thomas Huth, 2023/05/15
- [PULL 16/21] hw/net: Move xilinx_ethlite.c to the target-independent source set, Thomas Huth, 2023/05/15
- [PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME in common code,
Thomas Huth <=
- [PULL 08/21] tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies, Thomas Huth, 2023/05/15
- [PULL 05/21] hw/pci-bridge: Fix release ordering by embedding PCIBridgeWindows within PCIBridge, Thomas Huth, 2023/05/15
- [PULL 21/21] tests/tcg/s390x: Test EXECUTE of relative branches, Thomas Huth, 2023/05/15
- [PULL 18/21] tests/tcg/multiarch: Make the system memory test work on big-endian, Thomas Huth, 2023/05/15
- [PULL 11/21] docs/devel: remind developers to run CI container pipeline when updating images, Thomas Huth, 2023/05/15
- [PULL 10/21] s390x/pv: Fix spurious warning with asynchronous teardown, Thomas Huth, 2023/05/15
- [PULL 06/21] Add information how to fix common build error on Windows in symlink-install-tree, Thomas Huth, 2023/05/15
- [PULL 19/21] tests/tcg/s390x: Enable the multiarch system tests, Thomas Huth, 2023/05/15
- [PULL 09/21] util/async-teardown: wire up query-command-line-options, Thomas Huth, 2023/05/15
- [PULL 15/21] hw/core: Move machine-qmp-cmds.c into the target independent source set, Thomas Huth, 2023/05/15