Skip to content

Commit

Permalink
hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd committed Nov 7, 2023
1 parent aa6edf9 commit 86d9ff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 4 additions & 0 deletions hw/ppc/e500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
Expand Down
19 changes: 0 additions & 19 deletions target/ppc/kvm-stub.c

This file was deleted.

2 changes: 1 addition & 1 deletion target/ppc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 86d9ff2

Please sign in to comment.