From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Graf <agraf@suse.de>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PULL 07/17] s390/kexec: Implement diag308 subcode 0
Date: Tue, 24 Sep 2013 09:27:41 +0200 [thread overview]
Message-ID: <1380007671-18976-8-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com>
This patch implements subcode 0 of diag 308. This is necessary for kexec
(without kdump). The main difference to subcode 1 is that all CPUs get
a full reset, instead of the architectured CPU reset (which leaves all
registers untouched).
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
target-s390x/misc_helper.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c
index 1690907..37ea60d 100644
--- a/target-s390x/misc_helper.c
+++ b/target-s390x/misc_helper.c
@@ -192,6 +192,29 @@ static void cpu_reset_all(void)
}
}
+static void cpu_full_reset_all(void)
+{
+ CPUState *cpu;
+
+ CPU_FOREACH(cpu) {
+ cpu_reset(cpu);
+ }
+}
+
+static int modified_clear_reset(S390CPU *cpu)
+{
+ S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
+
+ pause_all_vcpus();
+ cpu_synchronize_all_states();
+ cpu_full_reset_all();
+ io_subsystem_reset();
+ scc->load_normal(CPU(cpu));
+ cpu_synchronize_all_post_reset();
+ resume_all_vcpus();
+ return 0;
+}
+
static int load_normal_reset(S390CPU *cpu)
{
S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
@@ -225,6 +248,9 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3)
}
switch (subcode) {
+ case 0:
+ modified_clear_reset(s390_env_get_cpu(env));
+ break;
case 1:
load_normal_reset(s390_env_get_cpu(env));
break;
--
1.8.3.1
next prev parent reply other threads:[~2013-09-24 7:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 7:27 [Qemu-devel] [PULL 00/17] s390 patches Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 01/17] s390/kvm: Add check for priviledged SCLP handler Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 02/17] s390/dump: zero out padding bytes in notes sections Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 03/17] s390/ipl: Fix waiting for virtio processing Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 04/17] s390/ipl: Update the s390-ccw.img rom Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 05/17] s390/cpu: Make setcc() function available to other files Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 06/17] s390/ioinst: Moved the CC setting to the IO instruction handlers Christian Borntraeger
2013-09-24 7:27 ` Christian Borntraeger [this message]
2013-09-24 7:27 ` [Qemu-devel] [PULL 08/17] s390/sclpconsole: modify definition of input buffer Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 09/17] s390/sclpconsole: Add code to support live migration for sclpconsole Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 10/17] s390/sclpquiesce: Add code to support live migration Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 11/17] s390/sclp: add reset() functions Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 12/17] s390/eventfacility: fix multiple Read Event Data sources Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 13/17] s390/eventfacility: Fix receive/send masks Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 14/17] s390/eventfacility: remove unused event_type variable Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 15/17] s390/eventfacility: allow childs to handle more than 1 event type Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 16/17] s390/ebcdic: Move conversion tables to header file Christian Borntraeger
2013-09-24 7:27 ` [Qemu-devel] [PULL 17/17] s390/sclplmconsole: Add support for SCLP line-mode console Christian Borntraeger
2013-09-25 15:07 ` [Qemu-devel] [PULL 00/17] s390 patches Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380007671-18976-8-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).