diff options
author | Joao Martins <joao.m.martins@oracle.com> | 2018-07-20 15:19:05 -0400 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-01 08:22:49 +0000 |
commit | 79b7067dc6acec07d93407dd870268a5cd68924d (patch) | |
tree | d2e15a11db181921df08a61145f430cd49cdc873 /include/sysemu | |
parent | bedcc1392481e2528d9b470a9b21512a923a3b75 (diff) | |
download | qemu-79b7067dc6acec07d93407dd870268a5cd68924d.zip qemu-79b7067dc6acec07d93407dd870268a5cd68924d.tar.gz qemu-79b7067dc6acec07d93407dd870268a5cd68924d.tar.bz2 |
i386/xen: implement HYPERVISOR_sched_op, SCHEDOP_shutdown
It allows to shutdown itself via hypercall with any of the 3 reasons:
1) self-reboot
2) shutdown
3) crash
Implementing SCHEDOP_shutdown sub op let us handle crashes gracefully rather
than leading to triple faults if it remains unimplemented.
In addition, the SHUTDOWN_soft_reset reason is used for kexec, to reset
Xen shared pages and other enlightenments and leave a clean slate for the
new kernel without the hypervisor helpfully writing information at
unexpected addresses.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Ditch sched_op_compat which was never available for HVM guests,
Add SCHEDOP_soft_reset]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/kvm_xen.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/kvm_xen.h b/include/sysemu/kvm_xen.h index 296533f..5dffcc0 100644 --- a/include/sysemu/kvm_xen.h +++ b/include/sysemu/kvm_xen.h @@ -12,6 +12,7 @@ #ifndef QEMU_SYSEMU_KVM_XEN_H #define QEMU_SYSEMU_KVM_XEN_H +int kvm_xen_soft_reset(void); uint32_t kvm_xen_get_caps(void); #define kvm_xen_has_cap(cap) (!!(kvm_xen_get_caps() & \ |