Message ID | 156051056289.224162.15553539098911498678.stgit@bahia.lan (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ppc: Get rid of some CONFIG_KVM guards | expand |
On Fri, Jun 14, 2019 at 01:09:22PM +0200, Greg Kurz wrote: > This allows to drop the CONFIG_KVM guard from the code. > > Signed-off-by: Greg Kurz <groug@kaod.org> Applied, thanks. > --- > target/ppc/kvm_ppc.h | 5 +++++ > target/ppc/machine.c | 2 -- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h > index e642aaaf9226..98bd7d5da6d6 100644 > --- a/target/ppc/kvm_ppc.h > +++ b/target/ppc/kvm_ppc.h > @@ -399,6 +399,11 @@ static inline int kvmppc_resize_hpt_commit(PowerPCCPU *cpu, > return -ENOSYS; > } > > +static inline bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu) > +{ > + return false; > +} > + > #endif > > #ifndef CONFIG_KVM > diff --git a/target/ppc/machine.c b/target/ppc/machine.c > index 5ad7b40f4533..e82f5de9db7c 100644 > --- a/target/ppc/machine.c > +++ b/target/ppc/machine.c > @@ -378,11 +378,9 @@ static int cpu_post_load(void *opaque, int version_id) > * receive the PVR it expects as a workaround. > * > */ > -#if defined(CONFIG_KVM) > if (kvmppc_pvr_workaround_required(cpu)) { > env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value; > } > -#endif > > env->lr = env->spr[SPR_LR]; > env->ctr = env->spr[SPR_CTR]; >
diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index e642aaaf9226..98bd7d5da6d6 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -399,6 +399,11 @@ static inline int kvmppc_resize_hpt_commit(PowerPCCPU *cpu, return -ENOSYS; } +static inline bool kvmppc_pvr_workaround_required(PowerPCCPU *cpu) +{ + return false; +} + #endif #ifndef CONFIG_KVM diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 5ad7b40f4533..e82f5de9db7c 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -378,11 +378,9 @@ static int cpu_post_load(void *opaque, int version_id) * receive the PVR it expects as a workaround. * */ -#if defined(CONFIG_KVM) if (kvmppc_pvr_workaround_required(cpu)) { env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value; } -#endif env->lr = env->spr[SPR_LR]; env->ctr = env->spr[SPR_CTR];
This allows to drop the CONFIG_KVM guard from the code. Signed-off-by: Greg Kurz <groug@kaod.org> --- target/ppc/kvm_ppc.h | 5 +++++ target/ppc/machine.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-)