- hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/display/virtio-gpu: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/virtio: Introduce virtio_bh_new_guarded() helper - hw: replace most qemu_bh_new calls with qemu_bh_new_guarded - checkpatch: add qemu_bh_new/aio_bh_new checks - async: avoid use-after-free on re-entrancy guard - async: Add an optional reentrancy guard to the BH API - hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set(CVE-2024-3447) - rtl8139: Remove unused variable - tulip: Remove unused variable - virtio-mem: Fix the bitmap index of the section offset - virtio-mem: Fix the iterator variable in a vmem->rdl_list loop - system/memory: use ldn_he_p/stn_he_p - block: Fix crash when loading snapshot on inactive node - smmu: Clear SMMUPciBus pointer cache when system reset - block/mirror: Fix NULL s->job in active writes - amd_iommu: Fix APIC address check - virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_reques - libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick cherry-pick from 66e411885a23c96ff73742d06b793fec3ceaebb7 - ivshmem-test.c: enable test_ivshmem_server for ppc64 arch - ivshmem.c: change endianness to LITTLE_ENDIAN - hw/ppc/mac.h: Remove MAX_CPUS macro - configure: remove dead variables - virtio-gpu: do not byteswap padding - hw/intc: clean-up error reporting for failed ITS cmd - qemu-iotests: Discard stderr when probing devices - linux-user: un-parent OBJECT(cpu) when closing thread - hw/net/rocker: Avoid undefined shifts with more than 31 ports - contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement - scsi-disk: fix overflow when block size is not a multiple of BDRV_SECTOR_SIZE Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit bf54b48c2963c869dfdc89977c57be4bd9e772aa)
80 lines
2.8 KiB
Diff
80 lines
2.8 KiB
Diff
From a2c1183a858ff592e0efb1886bbe6941b4ce018b Mon Sep 17 00:00:00 2001
|
|
From: Luo Yifan <luoyifan_yewu@cmss.chinamobile.com>
|
|
Date: Thu, 28 Mar 2024 13:54:29 +0800
|
|
Subject: [PATCH] hw/ppc/mac.h: Remove MAX_CPUS macro
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cherry picked from commit 83234b8289e64fc359a5bf02d886a333d65b8f8c
|
|
|
|
The mac.h header defines a MAX_CPUS macro. This is confusingly named,
|
|
because it suggests it's a generic setting, but in fact it's used
|
|
by only the g3beige and mac99 machines. It's also using a single
|
|
macro for two values which aren't inherently the same -- if one
|
|
of these two machines was updated to support SMP configurations
|
|
then it would want a different max_cpus value to the other.
|
|
|
|
Since the macro is used in only two places, just expand it out
|
|
and get rid of it. If hypothetical future work to support SMP
|
|
in these boards needs a compile-time-known limit on the number
|
|
of CPUs, we can give it a suitable name at that point.
|
|
|
|
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
Reviewed-by: Cédric Le Goater <clg@kaod.org>
|
|
Message-Id: <20211105184216.120972-1-peter.maydell@linaro.org>
|
|
Signed-off-by: Cédric Le Goater <clg@kaod.org>
|
|
Signed-off-by: Luo Yifan <luoyifan_yewu@cmss.chinamobile.com>
|
|
---
|
|
hw/ppc/mac.h | 3 ---
|
|
hw/ppc/mac_newworld.c | 3 ++-
|
|
hw/ppc/mac_oldworld.c | 3 ++-
|
|
3 files changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
|
|
index 22c8408078..a1fa8f8e41 100644
|
|
--- a/hw/ppc/mac.h
|
|
+++ b/hw/ppc/mac.h
|
|
@@ -36,9 +36,6 @@
|
|
#include "hw/pci-host/uninorth.h"
|
|
#include "qom/object.h"
|
|
|
|
-/* SMP is not enabled, for now */
|
|
-#define MAX_CPUS 1
|
|
-
|
|
#define NVRAM_SIZE 0x2000
|
|
#define PROM_FILENAME "openbios-ppc"
|
|
|
|
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
|
|
index 7bb7ac3997..4bddb529c2 100644
|
|
--- a/hw/ppc/mac_newworld.c
|
|
+++ b/hw/ppc/mac_newworld.c
|
|
@@ -581,7 +581,8 @@ static void core99_machine_class_init(ObjectClass *oc, void *data)
|
|
mc->desc = "Mac99 based PowerMAC";
|
|
mc->init = ppc_core99_init;
|
|
mc->block_default_type = IF_IDE;
|
|
- mc->max_cpus = MAX_CPUS;
|
|
+ /* SMP is not supported currently */
|
|
+ mc->max_cpus = 1;
|
|
mc->default_boot_order = "cd";
|
|
mc->default_display = "std";
|
|
mc->kvm_type = core99_kvm_type;
|
|
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
|
|
index de2be960e6..7016979a7c 100644
|
|
--- a/hw/ppc/mac_oldworld.c
|
|
+++ b/hw/ppc/mac_oldworld.c
|
|
@@ -423,7 +423,8 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
|
|
mc->desc = "Heathrow based PowerMAC";
|
|
mc->init = ppc_heathrow_init;
|
|
mc->block_default_type = IF_IDE;
|
|
- mc->max_cpus = MAX_CPUS;
|
|
+ /* SMP is not supported currently */
|
|
+ mc->max_cpus = 1;
|
|
#ifndef TARGET_PPC64
|
|
mc->is_default = true;
|
|
#endif
|
|
--
|
|
2.27.0
|
|
|