Received: from eggs.gnu.org ([2001:4830:134:3::10]:53145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2Zn6-0001SU-LB for qemu-devel@nongnu.org; Fri, 04 Nov 2016 04:24:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2Zn3-0003C6-Fn for qemu-devel@nongnu.org; Fri, 04 Nov 2016 04:24:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2Zn3-00039f-7g for qemu-devel@nongnu.org; Fri, 04 Nov 2016 04:23:57 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA48NbXf089242 for ; Fri, 4 Nov 2016 04:23:55 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 26gjx8cxd0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 04 Nov 2016 04:23:55 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Nov 2016 08:23:52 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 067981B08023 for ; Fri, 4 Nov 2016 08:26:00 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA48NnDF14549290 for ; Fri, 4 Nov 2016 08:23:49 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA48NmUI024569 for ; Fri, 4 Nov 2016 02:23:49 -0600 References: <20161102162103.66480-1-cornelia.huck@de.ibm.com> From: Christian Borntraeger Date: Fri, 4 Nov 2016 09:23:48 +0100 MIME-Version: 1.0 In-Reply-To: <20161102162103.66480-1-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Message-Id: <35005acf-7b73-a291-5132-a656cf6ff25d@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH] s390x/kvm: fix run_on_cpu sigp conversions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , peter.maydell@linaro.org, stefanha@gmail.com Cc: qemu-devel@nongnu.org, agraf@suse.de, jfrei@linux.vnet.ibm.com, pbonzini@redhat.com, alex.bennee@linaro.org On 11/02/2016 05:21 PM, Cornelia Huck wrote: > Commit 14e6fe12a ("*_run_on_cpu: introduce run_on_cpu_data type") > attempted to convert all users of run_on_cpu to use the new > run_on_cpu_data type. It missed to change the called sigp_* routines, > however. Fix that. > > Fixes: 14e6fe12a ("*_run_on_cpu: introduce run_on_cpu_data type") > Signed-off-by: Cornelia Huck > --- > Peter, Stefan: This fixes building for s390x which is currently > broken (at least with kvm enabled). Two questions: > - Will you pick this up as a build fix, or should I do a pull req? > - Can we do anything more to catch errors like this? I think if Peter could apply this immediately this would help testing the softfreeze code. Acked-by: Christian Borntraeger > --- > target-s390x/kvm.c | 36 ++++++++++++++++++------------------ > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c > index 36b4847..97afe02 100644 > --- a/target-s390x/kvm.c > +++ b/target-s390x/kvm.c > @@ -1401,10 +1401,10 @@ static void set_sigp_status(SigpInfo *si, uint64_t status) > si->cc = SIGP_CC_STATUS_STORED; > } > > -static void sigp_start(CPUState *cs, void *arg) > +static void sigp_start(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > > if (s390_cpu_get_state(cpu) != CPU_STATE_STOPPED) { > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > @@ -1415,10 +1415,10 @@ static void sigp_start(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_stop(CPUState *cs, void *arg) > +static void sigp_stop(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > struct kvm_s390_irq irq = { > .type = KVM_S390_SIGP_STOP, > }; > @@ -1501,10 +1501,10 @@ static int kvm_s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch) > return 0; > } > > -static void sigp_stop_and_store_status(CPUState *cs, void *arg) > +static void sigp_stop_and_store_status(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > struct kvm_s390_irq irq = { > .type = KVM_S390_SIGP_STOP, > }; > @@ -1529,10 +1529,10 @@ static void sigp_stop_and_store_status(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_store_status_at_address(CPUState *cs, void *arg) > +static void sigp_store_status_at_address(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > uint32_t address = si->param & 0x7ffffe00u; > > /* cpu has to be stopped */ > @@ -1550,10 +1550,10 @@ static void sigp_store_status_at_address(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_store_adtl_status(CPUState *cs, void *arg) > +static void sigp_store_adtl_status(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > > if (!s390_has_feat(S390_FEAT_VECTOR)) { > set_sigp_status(si, SIGP_STAT_INVALID_ORDER); > @@ -1581,10 +1581,10 @@ static void sigp_store_adtl_status(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_restart(CPUState *cs, void *arg) > +static void sigp_restart(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > struct kvm_s390_irq irq = { > .type = KVM_S390_RESTART, > }; > @@ -1612,11 +1612,11 @@ int kvm_s390_cpu_restart(S390CPU *cpu) > return 0; > } > > -static void sigp_initial_cpu_reset(CPUState *cs, void *arg) > +static void sigp_initial_cpu_reset(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > > cpu_synchronize_state(cs); > scc->initial_cpu_reset(cs); > @@ -1624,11 +1624,11 @@ static void sigp_initial_cpu_reset(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_cpu_reset(CPUState *cs, void *arg) > +static void sigp_cpu_reset(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > > cpu_synchronize_state(cs); > scc->cpu_reset(cs); > @@ -1636,10 +1636,10 @@ static void sigp_cpu_reset(CPUState *cs, void *arg) > si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; > } > > -static void sigp_set_prefix(CPUState *cs, void *arg) > +static void sigp_set_prefix(CPUState *cs, run_on_cpu_data arg) > { > S390CPU *cpu = S390_CPU(cs); > - SigpInfo *si = arg; > + SigpInfo *si = arg.host_ptr; > uint32_t addr = si->param & 0x7fffe000u; > > cpu_synchronize_state(cs); >