[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 21/21] s390/kvm: do not reset riccb on initial cpu re
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 21/21] s390/kvm: do not reset riccb on initial cpu reset |
Date: |
Tue, 23 May 2017 13:13:06 +0200 |
From: Christian Borntraeger <address@hidden>
The riccb is kept unchanged during initial cpu reset. Move the data
structure to the other registers that are unchanged.
Signed-off-by: Christian Borntraeger <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/cpu.c | 7 ++++---
target/s390x/cpu.h | 6 ++++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index a1bf2ba5a7..a69005d9b5 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -92,9 +92,10 @@ static void s390_cpu_initial_reset(CPUState *s)
int i;
s390_cpu_reset(s);
- /* initial reset does not touch regs,fregs and aregs */
- memset(&env->fpc, 0, offsetof(CPUS390XState, end_reset_fields) -
- offsetof(CPUS390XState, fpc));
+ /* initial reset does not clear everything! */
+ memset(&env->start_initial_reset_fields, 0,
+ offsetof(CPUS390XState, end_reset_fields) -
+ offsetof(CPUS390XState, start_initial_reset_fields));
/* architectured initial values for CR 0 and 14 */
env->cregs[0] = CR0_RESET;
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index e27d9d874a..c74b4193ee 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -88,6 +88,10 @@ typedef struct CPUS390XState {
*/
CPU_DoubleU vregs[32][2]; /* vector registers */
uint32_t aregs[16]; /* access registers */
+ uint8_t riccb[64]; /* runtime instrumentation control */
+
+ /* Fields up to this point are not cleared by initial CPU reset */
+ struct {} start_initial_reset_fields;
uint32_t fpc; /* floating-point control register */
uint32_t cc_op;
@@ -137,8 +141,6 @@ typedef struct CPUS390XState {
uint64_t gbea;
uint64_t pp;
- uint8_t riccb[64];
-
/* Fields up to this point are cleared by a CPU reset */
struct {} end_reset_fields;
--
2.13.0
- [Qemu-devel] [PULL 13/21] s390x/css: device support for s390-ccw passthrough, (continued)
- [Qemu-devel] [PULL 13/21] s390x/css: device support for s390-ccw passthrough, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 12/21] s390x/css: realize css_create_sch, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 14/21] vfio/ccw: vfio based subchannel passthrough driver, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 11/21] s390x/css: realize css_sch_build_schib, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 20/21] MAINTAINERS: Add vfio-ccw maintainer, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 16/21] vfio/ccw: get irqs info and set the eventfd fd, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 18/21] s390x/css: ccw translation infrastructure, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 15/21] vfio/ccw: get io region info, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 17/21] s390x/css: introduce and realize ccw-request callback, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 19/21] vfio/ccw: update sense data if a unit check is pending, Cornelia Huck, 2017/05/23
- [Qemu-devel] [PULL 21/21] s390/kvm: do not reset riccb on initial cpu reset,
Cornelia Huck <=
- Re: [Qemu-devel] [PULL 00/21] s390x patches, Stefan Hajnoczi, 2017/05/24