aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-03 09:01:01 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-07 12:13:28 +0100
commit86d9ff288a9f978840982c6d663b78d64021a6da (patch)
treef5bcfddc8832d9c0ee0c19eb50a836ddeb0c0aff
parentaa6edf97ce9783bf831ffaca5eda243210290292 (diff)
downloadqemu-86d9ff288a9f978840982c6d663b78d64021a6da.zip
qemu-86d9ff288a9f978840982c6d663b78d64021a6da.tar.gz
qemu-86d9ff288a9f978840982c6d663b78d64021a6da.tar.bz2
hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM
Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003070427.69621-3-philmd@linaro.org>
-rw-r--r--hw/ppc/e500.c4
-rw-r--r--target/ppc/kvm-stub.c19
-rw-r--r--target/ppc/meson.build2
3 files changed, 5 insertions, 20 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index e04114f..3842262 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -834,6 +834,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500MachineState *pms,
static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc,
IrqLines *irqs, Error **errp)
{
+#ifdef CONFIG_KVM
DeviceState *dev;
CPUState *cs;
@@ -854,6 +855,9 @@ static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc,
}
return dev;
+#else
+ g_assert_not_reached();
+#endif
}
static DeviceState *ppce500_init_mpic(PPCE500MachineState *pms,
diff --git a/target/ppc/kvm-stub.c b/target/ppc/kvm-stub.c
deleted file mode 100644
index b98e1d4..0000000
--- a/target/ppc/kvm-stub.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * QEMU KVM PPC specific function stubs
- *
- * Copyright Freescale Inc. 2013
- *
- * Author: Alexander Graf <agraf@suse.de>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- *
- */
-#include "qemu/osdep.h"
-#include "cpu.h"
-#include "hw/ppc/openpic_kvm.h"
-
-int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs)
-{
- return -EINVAL;
-}
diff --git a/target/ppc/meson.build b/target/ppc/meson.build
index 97ceb6e..eab4e3e 100644
--- a/target/ppc/meson.build
+++ b/target/ppc/meson.build
@@ -30,7 +30,7 @@ gen = [
]
ppc_ss.add(when: 'CONFIG_TCG', if_true: gen)
-ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
+ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'))
ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c'))
ppc_system_ss = ss.source_set()