From patchwork Wed Nov 2 16:21:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 9409467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 313F4601C2 for ; Wed, 2 Nov 2016 16:21:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 235282A46F for ; Wed, 2 Nov 2016 16:21:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 183B02A474; Wed, 2 Nov 2016 16:21:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CC1B22A470 for ; Wed, 2 Nov 2016 16:21:47 +0000 (UTC) Received: from localhost ([::1]:56249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1yIM-0004eM-Lk for patchwork-qemu-devel@patchwork.kernel.org; Wed, 02 Nov 2016 12:21:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1yHt-0004cJ-DD for qemu-devel@nongnu.org; Wed, 02 Nov 2016 12:21:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1yHq-0004be-7l for qemu-devel@nongnu.org; Wed, 02 Nov 2016 12:21:17 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1yHp-0004bH-W7 for qemu-devel@nongnu.org; Wed, 02 Nov 2016 12:21:14 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA2GJLO7016351 for ; Wed, 2 Nov 2016 12:21:12 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 26fjw241x1-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 02 Nov 2016 12:21:12 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Nov 2016 16:21:09 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 2 Nov 2016 16:21:08 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id CD4571B0806E for ; Wed, 2 Nov 2016 16:23:17 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA2GL7R641484434 for ; Wed, 2 Nov 2016 16:21:07 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA2GL75L009091 for ; Wed, 2 Nov 2016 10:21:07 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uA2GL6ID009088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Wed, 2 Nov 2016 10:21:06 -0600 From: Cornelia Huck To: peter.maydell@linaro.org, stefanha@gmail.com Date: Wed, 2 Nov 2016 17:21:03 +0100 X-Mailer: git-send-email 2.8.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110216-0040-0000-0000-0000025221DC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110216-0041-0000-0000-00002267EEDC Message-Id: <20161102162103.66480-1-cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-02_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611020305 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH] s390x/kvm: fix run_on_cpu sigp conversions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Cornelia Huck , pbonzini@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Christian Borntraeger --- 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? --- 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);