summaryrefslogtreecommitdiffstats
path: root/target-s390x/cpu.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-09-30 10:57:30 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2014-10-10 10:37:47 +0200
commitc9e659c9ee75d33ff11a8573cea738ad26bb6f86 (patch)
tree577ab7f30ee4184604550b227a05dddcc08342db /target-s390x/cpu.h
parenteb24f7c6896e93047f2c58ffd3ba4f453e88280b (diff)
downloadhqemu-c9e659c9ee75d33ff11a8573cea738ad26bb6f86.zip
hqemu-c9e659c9ee75d33ff11a8573cea738ad26bb6f86.tar.gz
s390x/kvm: propagate s390 cpu state to kvm
Let QEMU propagate the cpu state to kvm. If kvm doesn't yet support it, it is silently ignored as kvm will still handle the cpu state itself in that case. The state is not synced back, thus kvm won't have a chance to actively modify the cpu state. To do so, control has to be given back to QEMU (which is already done so in all relevant cases). Setting of the cpu state can fail either because kvm doesn't support the interface yet, or because the state is invalid/not supported. Failed attempts will be traced Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> CC: Andreas Faerber <afaerber@suse.de> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.h')
-rw-r--r--target-s390x/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 7b9300e..6b3aaed 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -1072,6 +1072,7 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
int kvm_s390_cpu_restart(S390CPU *cpu);
int kvm_s390_get_memslot_count(KVMState *s);
void kvm_s390_clear_cmma_callback(void *opaque);
+int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state);
#else
static inline void kvm_s390_io_interrupt(uint16_t subchannel_id,
uint16_t subchannel_nr,
@@ -1102,6 +1103,10 @@ static inline int kvm_s390_get_memslot_count(KVMState *s)
{
return MAX_AVAIL_SLOTS;
}
+static inline int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state)
+{
+ return -ENOSYS;
+}
#endif
static inline void cmma_reset(S390CPU *cpu)
OpenPOWER on IntegriCloud