Message ID | 6c4b2f9a-ef49-2a56-817f-9b62f4b2b6ed@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 18 May 2016 13:11:08 +0200 Paolo Bonzini <pbonzini@redhat.com> wrote: > On 18/05/2016 10:59, Cornelia Huck wrote: > >> That's on one of my s390x systems; on another one (where I don't test), > >> it builds. But something's wrong :) > > > > Ah, that's because the functioning one used --disable-kvm. > > > > Should the call to kvm_check_extension() be moved to target-s390x/kvm.c? > > It can also be moved to machine.c too... Your current branch now works fine. > Since I don't know exactly > which patch causes it, I can put this at the beginning: > > From 2f86d8c15e0b0514116d36727ecaf3f479f2af33 Mon Sep 17 00:00:00 2001 > From: Paolo Bonzini <pbonzini@redhat.com> > Date: Wed, 18 May 2016 13:08:02 +0200 > Subject: [PATCH] s390x: move vregs_needed to machine.c > > It is only needed in one file, move it there. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > target-s390x/cpu.h | 15 --------------- > target-s390x/machine.c | 10 ++++++++++ > 2 files changed, 10 insertions(+), 15 deletions(-) Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Should I look at the other patches touching s390x as well, or will you resend?
On 18/05/2016 15:46, Cornelia Huck wrote: > On Wed, 18 May 2016 13:11:08 +0200 > Paolo Bonzini <pbonzini@redhat.com> wrote: > >> On 18/05/2016 10:59, Cornelia Huck wrote: >>>> That's on one of my s390x systems; on another one (where I don't test), >>>> it builds. But something's wrong :) >>> >>> Ah, that's because the functioning one used --disable-kvm. >>> >>> Should the call to kvm_check_extension() be moved to target-s390x/kvm.c? >> >> It can also be moved to machine.c too... > > Your current branch now works fine. > >> Since I don't know exactly >> which patch causes it, I can put this at the beginning: >> >> From 2f86d8c15e0b0514116d36727ecaf3f479f2af33 Mon Sep 17 00:00:00 2001 >> From: Paolo Bonzini <pbonzini@redhat.com> >> Date: Wed, 18 May 2016 13:08:02 +0200 >> Subject: [PATCH] s390x: move vregs_needed to machine.c >> >> It is only needed in one file, move it there. >> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> --- >> target-s390x/cpu.h | 15 --------------- >> target-s390x/machine.c | 10 ++++++++++ >> 2 files changed, 10 insertions(+), 15 deletions(-) > > Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> > > Should I look at the other patches touching s390x as well, or will you > resend? They are untouched, so you can look at this version. s390x was really the only part where I had remarks from the maintainers, so you shouldn't have surprises. :) Paolo
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 07f76ad..0a0d0fa 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -1264,21 +1264,6 @@ static inline void s390_crypto_reset(void) } } -#ifdef CONFIG_KVM -static inline bool vregs_needed(void *opaque) -{ - if (kvm_enabled()) { - return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS); - } - return 0; -} -#else -static inline bool vregs_needed(void *opaque) -{ - return 0; -} -#endif - /* machine check interruption code */ /* subclasses */ diff --git a/target-s390x/machine.c b/target-s390x/machine.c index 6b26090..d2b52b2 100644 --- a/target-s390x/machine.c +++ b/target-s390x/machine.c @@ -76,6 +76,16 @@ static const VMStateDescription vmstate_fpu = { } }; +static bool vregs_needed(void *opaque) +{ +#ifdef CONFIG_KVM + if (kvm_enabled()) { + return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS); + } +#endif + return 0; +} + static const VMStateDescription vmstate_vregs = { .name = "cpu/vregs", .version_id = 1,