s390x/gdb: synchronize cpu state after modifying acrs
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 23 Jun 2015 07:10:51 +0000 (09:10 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 2 Jul 2015 13:35:33 +0000 (15:35 +0200)
Whenever we touch the access control registers, we have to make sure that
the values will make it into kvm. Otherwise the change will simply be lost.

When synchronizing qemu and kvm, a normal KVM_PUT_RUNTIME_STATE does not take
care of these registers. Let's simply trigger a KVM_PUT_FULL_STATE sync,
so the values will directly be written to kvm. The performance overhead can
be ignored and this is much cleaner than manually writing these registers to kvm
via our two supported ways.

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
target-s390x/gdbstub.c

index ddc14a6cd41118bd8034bb152333c52d44fc8a22..31f204964ff3856a95123419e25bba920d893f26 100644 (file)
@@ -92,6 +92,7 @@ static int cpu_write_ac_reg(CPUS390XState *env, uint8_t *mem_buf, int n)
     switch (n) {
     case S390_A0_REGNUM ... S390_A15_REGNUM:
         env->aregs[n] = ldl_p(mem_buf);
+        cpu_synchronize_post_init(ENV_GET_CPU(env));
         return 4;
     default:
         return 0;