mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
KVM: PPC: Add OSI hypercall interface
MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is MOL. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
71fbfd5f38
commit
ad0a048b09
6 changed files with 59 additions and 9 deletions
|
@ -160,6 +160,7 @@ struct kvm_pit_config {
|
|||
#define KVM_EXIT_DCR 15
|
||||
#define KVM_EXIT_NMI 16
|
||||
#define KVM_EXIT_INTERNAL_ERROR 17
|
||||
#define KVM_EXIT_OSI 18
|
||||
|
||||
/* For KVM_EXIT_INTERNAL_ERROR */
|
||||
#define KVM_INTERNAL_ERROR_EMULATION 1
|
||||
|
@ -259,6 +260,10 @@ struct kvm_run {
|
|||
__u32 ndata;
|
||||
__u64 data[16];
|
||||
} internal;
|
||||
/* KVM_EXIT_OSI */
|
||||
struct {
|
||||
__u64 gprs[32];
|
||||
} osi;
|
||||
/* Fix the size of the union. */
|
||||
char padding[256];
|
||||
};
|
||||
|
@ -516,6 +521,7 @@ struct kvm_enable_cap {
|
|||
#define KVM_CAP_DEBUGREGS 50
|
||||
#endif
|
||||
#define KVM_CAP_X86_ROBUST_SINGLESTEP 51
|
||||
#define KVM_CAP_PPC_OSI 52
|
||||
#define KVM_CAP_PPC_UNSET_IRQ 53
|
||||
#define KVM_CAP_ENABLE_CAP 54
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue