diff options
author | Alexander Graf <agraf@suse.de> | 2014-06-04 12:14:08 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:41 +0200 |
commit | 87a91de61a34a7f3222203556df8a67f187360cd (patch) | |
tree | 541e13563da86cf62e1406d2c75c8740941d36ea /target-ppc/kvm.c | |
parent | b061808d39fa11ecc6c07cec7bef6676669c1f3e (diff) |
KVM: PPC: Expose fixup hcall capability
New kvm versions expose a PPC_FIXUP_HCALL capability. Make it visible to
machine code so we can take decisions based on it.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/kvm.c')
-rw-r--r-- | target-ppc/kvm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index e6a1625b6b..ef691feebc 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -69,6 +69,7 @@ static int cap_epr; static int cap_ppc_watchdog; static int cap_papr; static int cap_htab_fd; +static int cap_fixup_hcalls; /* XXX We have a race condition where we actually have a level triggered * interrupt, but the infrastructure can't expose that yet, so the guest @@ -107,6 +108,7 @@ int kvm_arch_init(KVMState *s) /* Note: we don't set cap_papr here, because this capability is * only activated after this by kvmppc_set_papr() */ cap_htab_fd = kvm_check_extension(s, KVM_CAP_PPC_HTAB_FD); + cap_fixup_hcalls = kvm_check_extension(s, KVM_CAP_PPC_FIXUP_HCALL); if (!cap_interrupt_level) { fprintf(stderr, "KVM: Couldn't find level irq capability. Expect the " @@ -1780,6 +1782,11 @@ bool kvmppc_has_cap_htab_fd(void) return cap_htab_fd; } +bool kvmppc_has_cap_fixup_hcalls(void) +{ + return cap_fixup_hcalls; +} + static PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc) { ObjectClass *oc = OBJECT_CLASS(pcc); |