s390x: fix storing CPU status (again)
authorDavid Hildenbrand <david@redhat.com>
Thu, 16 Nov 2017 17:05:24 +0000 (18:05 +0100)
committerCornelia Huck <cohuck@redhat.com>
Mon, 20 Nov 2017 08:31:46 +0000 (09:31 +0100)
Looks like the last fix + cleanup introduced another bug. (for now Linux
guests don't seem to care) - we store the crs into ars.

Fixes: 947a38bd6f13 ("s390x/kvm: fix and cleanup storing CPU status")
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20171116170526.12643-2-david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/helper.c

index f78983dd6a7c45030aa14deec2b6dd1dbcab3d70..246ba20f0decfe9ad68b0c169652bec6d2edb2f9 100644 (file)
@@ -279,7 +279,7 @@ int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch)
         sa->ars[i] = cpu_to_be32(cpu->env.aregs[i]);
     }
     for (i = 0; i < 16; ++i) {
-        sa->ars[i] = cpu_to_be64(cpu->env.cregs[i]);
+        sa->crs[i] = cpu_to_be64(cpu->env.cregs[i]);
     }
 
     cpu_physical_memory_unmap(sa, len, 1, len);