diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2020-02-14 10:16:21 -0500 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2020-02-26 18:57:07 +0100 |
commit | b91a03946e0f65ddd22927dd80ca1276bf89c5af (patch) | |
tree | ba8175e82f81da10ad349dfc17b52a44b384b200 /target/s390x/cpu.c | |
parent | ddda37483dd17c9936fdde9ebf8f6ca2692b3842 (diff) | |
download | qemu-b91a03946e0f65ddd22927dd80ca1276bf89c5af.zip qemu-b91a03946e0f65ddd22927dd80ca1276bf89c5af.tar.gz qemu-b91a03946e0f65ddd22927dd80ca1276bf89c5af.tar.bz2 |
s390x: Add missing vcpu reset functions
Up to now we only had an ioctl to reset vcpu data QEMU couldn't reach
for the initial reset, which was also called for the clear reset. To
be architecture compliant, we also need to clear local interrupts on a
normal reset.
Because of this and the upcoming protvirt support we need to add
ioctls for the missing clear and normal resets.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200214151636.8764-3-frankja@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu.c')
-rw-r--r-- | target/s390x/cpu.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index cf84d30..8da1905 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -144,8 +144,18 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) } /* Reset state inside the kernel that we cannot access yet from QEMU. */ - if (kvm_enabled() && type != S390_CPU_RESET_NORMAL) { - kvm_s390_reset_vcpu(cpu); + if (kvm_enabled()) { + switch (type) { + case S390_CPU_RESET_CLEAR: + kvm_s390_reset_vcpu_clear(cpu); + break; + case S390_CPU_RESET_INITIAL: + kvm_s390_reset_vcpu_initial(cpu); + break; + case S390_CPU_RESET_NORMAL: + kvm_s390_reset_vcpu_normal(cpu); + break; + } } } |