Received: from eggs.gnu.org ([2001:4830:134:3::10]:34398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2kFo-00083S-TE for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:48:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2kFn-0001Ri-54 for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:48:28 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:41387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2kFm-0001R0-Sw for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:48:27 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Jul 2013 16:43:53 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id D903F2190019 for ; Fri, 26 Jul 2013 16:52:31 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6QFm9Mm63832068 for ; Fri, 26 Jul 2013 15:48:09 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r6QFmIoE016934 for ; Fri, 26 Jul 2013 09:48:19 -0600 From: Christian Borntraeger Date: Fri, 26 Jul 2013 17:48:06 +0200 Message-Id: <1374853686-24079-1-git-send-email-borntraeger@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] s390: fix cpustate rework fallout List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: afaerber@suse.de Cc: Christian Borntraeger , agraf@suse.de, qemu-devel@nongnu.org commit f17ec444c3d39f76bcd8b71c2c05d5754bfe333e exec: Change cpu_memory_rw_debug() argument to CPUState broke s390: CC s390x-softmmu/hw/block/dataplane/virtio-blk.o /home/cborntra/REPOS/qemu/target-s390x/kvm.c: In function ‘kvm_arch_insert_sw_breakpoint’: /home/cborntra/REPOS/qemu/target-s390x/kvm.c:384:5: error: passing argument 1 of ‘cpu_memory_rw_debug’ from incompatible pointer type [-Werror] In file included from /home/cborntra/REPOS/qemu/target-s390x/cpu.h:40:0, from /home/cborntra/REPOS/qemu/include/qemu-common.h:116, from /home/cborntra/REPOS/qemu/target-s390x/kvm.c:31: /home/cborntra/REPOS/qemu/include/exec/cpu-all.h:491:5: note: expected ‘struct CPUState *’ but argument is of type ‘struct CPUS390XState *’ /home/cborntra/REPOS/qemu/target-s390x/kvm.c:385:9: error: passing argument 1 of ‘cpu_memory_rw_debug’ from incompatible pointer type [-Werror] In file included from /home/cborntra/REPOS/qemu/target-s390x/cpu.h:40:0, from /home/cborntra/REPOS/qemu/include/qemu-common.h:116, from /home/cborntra/REPOS/qemu/target-s390x/kvm.c:31: /home/cborntra/REPOS/qemu/include/exec/cpu-all.h:491:5: note: expected ‘struct CPUState *’ but argument is of type ‘struct CPUS390XState *’ /home/cborntra/REPOS/qemu/target-s390x/kvm.c: In function ‘kvm_arch_remove_sw_breakpoint’: /home/cborntra/REPOS/qemu/target-s390x/kvm.c:398:5: error: passing argument 1 of ‘cpu_memory_rw_debug’ from incompatible pointer type [-Werror] In file included from /home/cborntra/REPOS/qemu/target-s390x/cpu.h:40:0, from /home/cborntra/REPOS/qemu/include/qemu-common.h:116, from /home/cborntra/REPOS/qemu/target-s390x/kvm.c:31: /home/cborntra/REPOS/qemu/include/exec/cpu-all.h:491:5: note: expected ‘struct CPUState *’ but argument is of type ‘struct CPUS390XState *’ /home/cborntra/REPOS/qemu/target-s390x/kvm.c:402:5: error: passing argument 1 of ‘cpu_memory_rw_debug’ from incompatible pointer type [-Werror] In file included from /home/cborntra/REPOS/qemu/target-s390x/cpu.h:40:0, from /home/cborntra/REPOS/qemu/include/qemu-common.h:116, from /home/cborntra/REPOS/qemu/target-s390x/kvm.c:31: /home/cborntra/REPOS/qemu/include/exec/cpu-all.h:491:5: note: expected ‘struct CPUState *’ but argument is of type ‘struct CPUS390XState *’ Lets fix it up. Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 3dfd19c..960b3cf 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -345,12 +345,10 @@ void *kvm_arch_ram_alloc(ram_addr_t size) int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) { - S390CPU *cpu = S390_CPU(cs); - CPUS390XState *env = &cpu->env; static const uint8_t diag_501[] = {0x83, 0x24, 0x05, 0x01}; - if (cpu_memory_rw_debug(env, bp->pc, (uint8_t *)&bp->saved_insn, 4, 0) || - cpu_memory_rw_debug(env, bp->pc, (uint8_t *)diag_501, 4, 1)) { + if (cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&bp->saved_insn, 4, 0) || + cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)diag_501, 4, 1)) { return -EINVAL; } return 0; @@ -358,16 +356,14 @@ int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) { - S390CPU *cpu = S390_CPU(cs); - CPUS390XState *env = &cpu->env; uint8_t t[4]; static const uint8_t diag_501[] = {0x83, 0x24, 0x05, 0x01}; - if (cpu_memory_rw_debug(env, bp->pc, t, 4, 0)) { + if (cpu_memory_rw_debug(cs, bp->pc, t, 4, 0)) { return -EINVAL; } else if (memcmp(t, diag_501, 4)) { return -EINVAL; - } else if (cpu_memory_rw_debug(env, bp->pc, (uint8_t *)&bp->saved_insn, 1, 1)) { + } else if (cpu_memory_rw_debug(cs, bp->pc, (uint8_t *)&bp->saved_insn, 1, 1)) { return -EINVAL; } -- 1.8.3.1