diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2008-03-25 13:47:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 05:00:46 -0400 |
commit | 5288fbf0ef041ba0e8b4dcb2df4536b5e3a48b32 (patch) | |
tree | 6f81a87294c9026ac91a84e5a94e55e565002d3b /arch/s390/kvm/kvm-s390.c | |
parent | 453423dce2785b8e22077e3b3eeecb4f60fe3470 (diff) |
KVM: s390: interprocessor communication via sigp
This patch introduces in-kernel handling of _some_ sigp interprocessor
signals (similar to ipi).
kvm_s390_handle_sigp() decodes the sigp instruction and calls individual
handlers depending on the operation requested:
- sigp sense tries to retrieve information such as existence or running state
of the remote cpu
- sigp emergency sends an external interrupt to the remove cpu
- sigp stop stops a remove cpu
- sigp stop store status stops a remote cpu, and stores its entire internal
state to the cpus lowcore
- sigp set arch sets the architecture mode of the remote cpu. setting to
ESAME (s390x 64bit) is accepted, setting to ESA/S390 (s390, 31 or 24 bit) is
denied, all others are passed to userland
- sigp set prefix sets the prefix register of a remote cpu
For implementation of this, the stop intercept indication starts to get reused
on purpose: a set of action bits defines what to do once a cpu gets stopped:
ACTION_STOP_ON_STOP really stops the cpu when a stop intercept is recognized
ACTION_STORE_ON_STOP stores the cpu status to lowcore when a stop intercept is
recognized
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 5a17176fb641..c632180739ee 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -57,6 +57,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
57 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, | 57 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, |
58 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, | 58 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, |
59 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, | 59 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, |
60 | { "instruction_sigp_sense", VCPU_STAT(instruction_sigp_sense) }, | ||
61 | { "instruction_sigp_emergency", VCPU_STAT(instruction_sigp_emergency) }, | ||
62 | { "instruction_sigp_stop", VCPU_STAT(instruction_sigp_stop) }, | ||
63 | { "instruction_sigp_set_arch", VCPU_STAT(instruction_sigp_arch) }, | ||
64 | { "instruction_sigp_set_prefix", VCPU_STAT(instruction_sigp_prefix) }, | ||
65 | { "instruction_sigp_restart", VCPU_STAT(instruction_sigp_restart) }, | ||
60 | { NULL } | 66 | { NULL } |
61 | }; | 67 | }; |
62 | 68 | ||
@@ -287,6 +293,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
287 | spin_lock_bh(&kvm->arch.float_int.lock); | 293 | spin_lock_bh(&kvm->arch.float_int.lock); |
288 | kvm->arch.float_int.local_int[id] = &vcpu->arch.local_int; | 294 | kvm->arch.float_int.local_int[id] = &vcpu->arch.local_int; |
289 | init_waitqueue_head(&vcpu->arch.local_int.wq); | 295 | init_waitqueue_head(&vcpu->arch.local_int.wq); |
296 | vcpu->arch.local_int.cpuflags = &vcpu->arch.sie_block->cpuflags; | ||
290 | spin_unlock_bh(&kvm->arch.float_int.lock); | 297 | spin_unlock_bh(&kvm->arch.float_int.lock); |
291 | 298 | ||
292 | rc = kvm_vcpu_init(vcpu, kvm, id); | 299 | rc = kvm_vcpu_init(vcpu, kvm, id); |