aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-16 15:59:34 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-05-06 15:01:23 +0100
commit7f48918a372120a63f18712aa27de5e13b76bbf7 (patch)
treed079039d01ceb0603376591a7d2a4f653479d950
parent514712d5277de5237a49a4852f0f90c51696f94c (diff)
downloadqemu-7f48918a372120a63f18712aa27de5e13b76bbf7.zip
qemu-7f48918a372120a63f18712aa27de5e13b76bbf7.tar.gz
qemu-7f48918a372120a63f18712aa27de5e13b76bbf7.tar.bz2
hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
The VirtMachineClass::disallow_affinity_adjustment field was only used by virt-2.6 machine, which got removed. Remove it and simplify virt_cpu_mp_affinity(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> [PMM: Remove now-unused variable] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/arm/virt.c31
-rw-r--r--include/hw/arm/virt.h1
2 files changed, 15 insertions, 17 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index e82b8a4..9d82cf7 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1770,24 +1770,23 @@ void virt_machine_done(Notifier *notifier, void *data)
static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
{
- uint8_t clustersz = ARM_DEFAULT_CPUS_PER_CLUSTER;
- VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
+ uint8_t clustersz;
- if (!vmc->disallow_affinity_adjustment) {
- /* Adjust MPIDR like 64-bit KVM hosts, which incorporate the
- * GIC's target-list limitations. 32-bit KVM hosts currently
- * always create clusters of 4 CPUs, but that is expected to
- * change when they gain support for gicv3. When KVM is enabled
- * it will override the changes we make here, therefore our
- * purposes are to make TCG consistent (with 64-bit KVM hosts)
- * and to improve SGI efficiency.
- */
- if (vms->gic_version == VIRT_GIC_VERSION_2) {
- clustersz = GIC_TARGETLIST_BITS;
- } else {
- clustersz = GICV3_TARGETLIST_BITS;
- }
+ /*
+ * Adjust MPIDR like 64-bit KVM hosts, which incorporate the
+ * GIC's target-list limitations. 32-bit KVM hosts currently
+ * always create clusters of 4 CPUs, but that is expected to
+ * change when they gain support for gicv3. When KVM is enabled
+ * it will override the changes we make here, therefore our
+ * purposes are to make TCG consistent (with 64-bit KVM hosts)
+ * and to improve SGI efficiency.
+ */
+ if (vms->gic_version == VIRT_GIC_VERSION_2) {
+ clustersz = GIC_TARGETLIST_BITS;
+ } else {
+ clustersz = GICV3_TARGETLIST_BITS;
}
+
return arm_build_mp_affinity(idx, clustersz);
}
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 27c5bb5..5d3b255 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -117,7 +117,6 @@ typedef enum VirtGICType {
struct VirtMachineClass {
MachineClass parent;
- bool disallow_affinity_adjustment;
bool no_its;
bool no_tcg_its;
bool claim_edge_triggered_timers;