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 /include/asm-s390 | |
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 'include/asm-s390')
-rw-r--r-- | include/asm-s390/kvm_host.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-s390/kvm_host.h b/include/asm-s390/kvm_host.h index 2eaf6fede025..1c829bdf5889 100644 --- a/include/asm-s390/kvm_host.h +++ b/include/asm-s390/kvm_host.h | |||
@@ -128,6 +128,12 @@ struct kvm_vcpu_stat { | |||
128 | u32 instruction_chsc; | 128 | u32 instruction_chsc; |
129 | u32 instruction_stsi; | 129 | u32 instruction_stsi; |
130 | u32 instruction_stfl; | 130 | u32 instruction_stfl; |
131 | u32 instruction_sigp_sense; | ||
132 | u32 instruction_sigp_emergency; | ||
133 | u32 instruction_sigp_stop; | ||
134 | u32 instruction_sigp_arch; | ||
135 | u32 instruction_sigp_prefix; | ||
136 | u32 instruction_sigp_restart; | ||
131 | }; | 137 | }; |
132 | 138 | ||
133 | struct io_info { | 139 | struct io_info { |
@@ -169,6 +175,10 @@ struct interrupt_info { | |||
169 | }; | 175 | }; |
170 | }; | 176 | }; |
171 | 177 | ||
178 | /* for local_interrupt.action_flags */ | ||
179 | #define ACTION_STORE_ON_STOP 1 | ||
180 | #define ACTION_STOP_ON_STOP 2 | ||
181 | |||
172 | struct local_interrupt { | 182 | struct local_interrupt { |
173 | spinlock_t lock; | 183 | spinlock_t lock; |
174 | struct list_head list; | 184 | struct list_head list; |
@@ -176,6 +186,8 @@ struct local_interrupt { | |||
176 | struct float_interrupt *float_int; | 186 | struct float_interrupt *float_int; |
177 | int timer_due; /* event indicator for waitqueue below */ | 187 | int timer_due; /* event indicator for waitqueue below */ |
178 | wait_queue_head_t wq; | 188 | wait_queue_head_t wq; |
189 | atomic_t *cpuflags; | ||
190 | unsigned int action_bits; | ||
179 | }; | 191 | }; |
180 | 192 | ||
181 | struct float_interrupt { | 193 | struct float_interrupt { |