From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2kMR-0005zD-0X for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:55:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2kMO-0004Bv-Lu for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:55:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35369 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2kMO-0004Bn-Ck for qemu-devel@nongnu.org; Fri, 26 Jul 2013 11:55:16 -0400 Message-ID: <51F29BE0.10503@suse.de> Date: Fri, 26 Jul 2013 17:55:12 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1374853686-24079-1-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1374853686-24079-1-git-send-email-borntraeger@de.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] s390: fix cpustate rework fallout List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: agraf@suse.de, qemu-devel@nongnu.org Am 26.07.2013 17:48, schrieb Christian Borntraeger: > commit f17ec444c3d39f76bcd8b71c2c05d5754bfe333e > exec: Change cpu_memory_rw_debug() argument to CPUState >=20 > broke s390: >=20 > CC s390x-softmmu/hw/block/dataplane/virtio-blk.o > /home/cborntra/REPOS/qemu/target-s390x/kvm.c: In function > =E2=80=98kvm_arch_insert_sw_breakpoint=E2=80=99: > /home/cborntra/REPOS/qemu/target-s390x/kvm.c:384:5: error: passing > argument 1 of =E2=80=98cpu_memory_rw_debug=E2=80=99 from incompatible p= ointer 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 > =E2=80=98struct CPUState *=E2=80=99 but argument is of type =E2=80=98st= ruct CPUS390XState *=E2=80=99 > /home/cborntra/REPOS/qemu/target-s390x/kvm.c:385:9: error: passing > argument 1 of =E2=80=98cpu_memory_rw_debug=E2=80=99 from incompatible p= ointer 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 > =E2=80=98struct CPUState *=E2=80=99 but argument is of type =E2=80=98st= ruct CPUS390XState *=E2=80=99 > /home/cborntra/REPOS/qemu/target-s390x/kvm.c: In function > =E2=80=98kvm_arch_remove_sw_breakpoint=E2=80=99: > /home/cborntra/REPOS/qemu/target-s390x/kvm.c:398:5: error: passing > argument 1 of =E2=80=98cpu_memory_rw_debug=E2=80=99 from incompatible p= ointer 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 > =E2=80=98struct CPUState *=E2=80=99 but argument is of type =E2=80=98st= ruct CPUS390XState *=E2=80=99 > /home/cborntra/REPOS/qemu/target-s390x/kvm.c:402:5: error: passing > argument 1 of =E2=80=98cpu_memory_rw_debug=E2=80=99 from incompatible p= ointer 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 > =E2=80=98struct CPUState *=E2=80=99 but argument is of type =E2=80=98st= ruct CPUS390XState *=E2=80=99 >=20 > Lets fix it up. >=20 > Signed-off-by: Christian Borntraeger > --- > target-s390x/kvm.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) Ouch. I'm fairly certain that I tested something on ppc and s390x before sending the pull, must be some workflow problem then... Do we need the full error in the commit message? I intend to send a pull tonight, where I would include this fix. Cheers, Andreas >=20 > 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) > =20 > int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoi= nt *bp) > { > - S390CPU *cpu =3D S390_CPU(cs); > - CPUS390XState *env =3D &cpu->env; > static const uint8_t diag_501[] =3D {0x83, 0x24, 0x05, 0x01}; > =20 > - 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, s= truct kvm_sw_breakpoint *bp) > =20 > int kvm_arch_remove_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoi= nt *bp) > { > - S390CPU *cpu =3D S390_CPU(cs); > - CPUS390XState *env =3D &cpu->env; > uint8_t t[4]; > static const uint8_t diag_501[] =3D {0x83, 0x24, 0x05, 0x01}; > =20 > - 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_i= nsn, 1, 1)) { > return -EINVAL; > } > =20 >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg