Browse Source
- Make hw/arm/ common by adding a QOM type to machines to tag in which binary (32 or 64-bit) they can be used. Convert the Virt and SBSA-Ref machines. - Build Xen files once -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkDbS4ACgkQ4+MsLN6t wN7LOQ/9HQSArWumcPtJNjfdKyN4BI+evdJuIsJlGnVirZzAShd/aA3emeVoIQXf kb1xAJvbL6IryasuFFrWJjLKAdTk8RgTzbDwSS07dEvNE/fVo22OarBfusrO+/fJ 6da3j08gwb0EV9m8eUbTwuRBxIF/tnPzZMzyRwx23b4wRb4jnIsshutHX9/hoZBj 8cdCJx284EZgj5gLTmk+jEyPEU+miKpnHWqpxSKZCXg7UfzXH34gOo6IBZIzylZs kJqcPXaJHF//ISMQQGzl7k1GNyr1fZZBIuCd7zdOIBntWjb45g/7lEKTGFaVrR5Y yqaUsNZNj8z3ESA4y42RUPSYAvjwGh+AKafZiHE6K7Oa/WIjeqfr33GHNSMrDYk1 UDz4o6/VhA/T7VaQjcd/IG9vYsF3jwjhbXQRa1xXKxhuIC0PzEKxpyWo3mAIEfm8 7vw90xx4no29WsUpKi6kyplJ/fq9o3h0kWpd6fYlJQsCtwVZFLT9UeBVIQHrfGec xkJx/L1OZFzym8Y4bcj0/V4zRJyvyuKK30+bFvu0fKcNR3uijKUjYcQHYg04fSG9 PgQtCgHxwdbO8vCwHf0WIVtOhqC0aOgtE10jh9HdLG07Ef5K1JBkE90XX27rCOV3 rAVo/czNnHpx2j0kRGpyRlz9M/eqOVcz4z3TFzKOFPEEumvz1MM= =Ncy4 -----END PGP SIGNATURE----- Merge tag 'single-binary-20251030' of https://github.com/philmd/qemu into staging Various patches related to single binary work: - Make hw/arm/ common by adding a QOM type to machines to tag in which binary (32 or 64-bit) they can be used. Convert the Virt and SBSA-Ref machines. - Build Xen files once # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkDbS4ACgkQ4+MsLN6t # wN7LOQ/9HQSArWumcPtJNjfdKyN4BI+evdJuIsJlGnVirZzAShd/aA3emeVoIQXf # kb1xAJvbL6IryasuFFrWJjLKAdTk8RgTzbDwSS07dEvNE/fVo22OarBfusrO+/fJ # 6da3j08gwb0EV9m8eUbTwuRBxIF/tnPzZMzyRwx23b4wRb4jnIsshutHX9/hoZBj # 8cdCJx284EZgj5gLTmk+jEyPEU+miKpnHWqpxSKZCXg7UfzXH34gOo6IBZIzylZs # kJqcPXaJHF//ISMQQGzl7k1GNyr1fZZBIuCd7zdOIBntWjb45g/7lEKTGFaVrR5Y # yqaUsNZNj8z3ESA4y42RUPSYAvjwGh+AKafZiHE6K7Oa/WIjeqfr33GHNSMrDYk1 # UDz4o6/VhA/T7VaQjcd/IG9vYsF3jwjhbXQRa1xXKxhuIC0PzEKxpyWo3mAIEfm8 # 7vw90xx4no29WsUpKi6kyplJ/fq9o3h0kWpd6fYlJQsCtwVZFLT9UeBVIQHrfGec # xkJx/L1OZFzym8Y4bcj0/V4zRJyvyuKK30+bFvu0fKcNR3uijKUjYcQHYg04fSG9 # PgQtCgHxwdbO8vCwHf0WIVtOhqC0aOgtE10jh9HdLG07Ef5K1JBkE90XX27rCOV3 # rAVo/czNnHpx2j0kRGpyRlz9M/eqOVcz4z3TFzKOFPEEumvz1MM= # =Ncy4 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 30 Oct 2025 02:50:38 PM CET # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'single-binary-20251030' of https://github.com/philmd/qemu: (23 commits) hw/riscv: Replace target_ulong uses hw/xen: Build only once hw/xen: Replace target_ulong by agnostic target_long_bits() hw/xen: Use BITS_PER_BYTE & MAKE_64BIT_MASK() in req_size_bits() hw/arm/meson: Move Xen files to arm_common_ss[] hw/arm/virt: Build only once hw/arm/virt-acpi-build: Build only once hw/arm/virt-acpi-build: Include missing 'cpu.h' header hw/arm/sbsa-ref: Build only once hw/arm/sbsa-ref: Include missing 'cpu.h' header hw/arm/virt: Get default CPU type at runtime hw/arm/virt: Replace TARGET_AARCH64 -> target_aarch64() qemu/target_info: Add target_base_arm() helper qemu/target_info: Add target_aarch64() helper qemu/target_info: Add target_arm() helper hw/arm/virt: Check accelerator availability at runtime hw/arm/virt: Register valid CPU types dynamically config/target: Implement per-binary TargetInfo structure (ARM, AARCH64) meson: Prepare to accept per-binary TargetInfo structure implementation hw/arm: Filter machine types for qemu-system-arm/aarch64 binaries ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>pull/307/head
60 changed files with 406 additions and 75 deletions
@ -0,0 +1,26 @@ |
|||
/*
|
|||
* QEMU binary/target API (qemu-system-aarch64) |
|||
* |
|||
* Copyright (c) Linaro |
|||
* |
|||
* SPDX-License-Identifier: GPL-2.0-or-later |
|||
*/ |
|||
|
|||
#include "qemu/osdep.h" |
|||
#include "qemu/target-info-impl.h" |
|||
#include "hw/arm/machines-qom.h" |
|||
#include "target/arm/cpu-qom.h" |
|||
|
|||
static const TargetInfo target_info_aarch64_system = { |
|||
.target_name = "aarch64", |
|||
.target_arch = SYS_EMU_TARGET_AARCH64, |
|||
.long_bits = 64, |
|||
.cpu_type = TYPE_ARM_CPU, |
|||
.machine_typename = TYPE_TARGET_AARCH64_MACHINE, |
|||
.endianness = ENDIAN_MODE_LITTLE, |
|||
}; |
|||
|
|||
const TargetInfo *target_info(void) |
|||
{ |
|||
return &target_info_aarch64_system; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
/*
|
|||
* QEMU binary/target API (qemu-system-arm) |
|||
* |
|||
* Copyright (c) Linaro |
|||
* |
|||
* SPDX-License-Identifier: GPL-2.0-or-later |
|||
*/ |
|||
|
|||
#include "qemu/osdep.h" |
|||
#include "qemu/target-info-impl.h" |
|||
#include "hw/arm/machines-qom.h" |
|||
#include "target/arm/cpu-qom.h" |
|||
|
|||
static const TargetInfo target_info_arm_system = { |
|||
.target_name = "arm", |
|||
.target_arch = SYS_EMU_TARGET_ARM, |
|||
.long_bits = 32, |
|||
.cpu_type = TYPE_ARM_CPU, |
|||
.machine_typename = TYPE_TARGET_ARM_MACHINE, |
|||
.endianness = ENDIAN_MODE_LITTLE, |
|||
}; |
|||
|
|||
const TargetInfo *target_info(void) |
|||
{ |
|||
return &target_info_arm_system; |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
foreach target : [ |
|||
'arm-softmmu', 'aarch64-softmmu', |
|||
] |
|||
config_target_info += {target : files(target + '.c')} |
|||
endforeach |
|||
@ -0,0 +1,46 @@ |
|||
/*
|
|||
* QOM type definitions for ARM / Aarch64 machines |
|||
* |
|||
* Copyright (c) Linaro |
|||
* |
|||
* SPDX-License-Identifier: GPL-2.0-or-later |
|||
*/ |
|||
|
|||
#ifndef HW_ARM_MACHINES_QOM_H |
|||
#define HW_ARM_MACHINES_QOM_H |
|||
|
|||
#include "hw/boards.h" |
|||
|
|||
#define TYPE_TARGET_ARM_MACHINE \ |
|||
"target-info-arm-machine" |
|||
|
|||
#define TYPE_TARGET_AARCH64_MACHINE \ |
|||
"target-info-aarch64-machine" |
|||
|
|||
/*
|
|||
* A machine filtered with arm_machine_interfaces[] or |
|||
* arm_aarch64_machine_interfaces[] will be available |
|||
* in both qemu-system-arm and qemu-system-aarch64 binaries. |
|||
* |
|||
* One filtered with aarch64_machine_interfaces[] will only |
|||
* be available in the qemu-system-aarch64 binary. |
|||
*/ |
|||
extern const InterfaceInfo arm_machine_interfaces[]; |
|||
extern const InterfaceInfo arm_aarch64_machine_interfaces[]; |
|||
extern const InterfaceInfo aarch64_machine_interfaces[]; |
|||
|
|||
/*
|
|||
* A machine defined with the DEFINE_MACHINE_ARM() macro will be |
|||
* available in both qemu-system-arm and qemu-system-aarch64 binaries. |
|||
* |
|||
* One defined with DEFINE_MACHINE_AARCH64() will only be available in |
|||
* the qemu-system-aarch64 binary. |
|||
*/ |
|||
#define DEFINE_MACHINE_ARM(namestr, machine_initfn) \ |
|||
DEFINE_MACHINE_WITH_INTERFACE_ARRAY(namestr, machine_initfn, \ |
|||
arm_machine_interfaces) |
|||
#define DEFINE_MACHINE_AARCH64(namestr, machine_initfn) \ |
|||
DEFINE_MACHINE_WITH_INTERFACE_ARRAY(namestr, machine_initfn, \ |
|||
aarch64_machine_interfaces) |
|||
|
|||
#endif |
|||
@ -0,0 +1,24 @@ |
|||
/*
|
|||
* QEMU binary/target API (QOM types) |
|||
* |
|||
* Copyright (c) Linaro |
|||
* |
|||
* SPDX-License-Identifier: GPL-2.0-or-later |
|||
*/ |
|||
|
|||
#include "qemu/osdep.h" |
|||
#include "qom/object.h" |
|||
#include "hw/arm/machines-qom.h" |
|||
|
|||
static const TypeInfo target_info_types[] = { |
|||
{ |
|||
.name = TYPE_TARGET_ARM_MACHINE, |
|||
.parent = TYPE_INTERFACE, |
|||
}, |
|||
{ |
|||
.name = TYPE_TARGET_AARCH64_MACHINE, |
|||
.parent = TYPE_INTERFACE, |
|||
}, |
|||
}; |
|||
|
|||
DEFINE_TYPES(target_info_types) |
|||
Loading…
Reference in new issue