diff options
author | Alexander Graf <agraf@suse.de> | 2014-05-22 17:40:15 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-05-30 14:26:27 +0200 |
commit | f2e91042a807cbf9b0b0d9776bf37d1ef0bd7ebe (patch) | |
tree | 8d405603ff033f4e752fdfdebf54e31f9edff1bf /arch/powerpc/kvm | |
parent | aae6559651dd9d779da79f30de02033557fe263b (diff) | |
download | linux-f2e91042a807cbf9b0b0d9776bf37d1ef0bd7ebe.tar.gz linux-f2e91042a807cbf9b0b0d9776bf37d1ef0bd7ebe.tar.bz2 linux-f2e91042a807cbf9b0b0d9776bf37d1ef0bd7ebe.zip |
KVM: PPC: Add CAP to indicate hcall fixes
We worked around some nasty KVM magic page hcall breakages:
1) NX bit not honored, so ignore NX when we detect it
2) LE guests swizzle hypercall instruction
Without these fixes in place, there's no way it would make sense to expose kvm
hypercalls to a guest. Chances are immensely high it would trip over and break.
So add a new CAP that gives user space a hint that we have workarounds for the
bugs above in place. It can use those as hint to disable PV hypercalls when
the guest CPU is anything POWER7 or higher and the host does not have fixes
in place.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 154f352c39ae..bab20f410443 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -416,6 +416,7 @@ int kvm_dev_ioctl_check_extension(long ext) case KVM_CAP_SPAPR_TCE: case KVM_CAP_PPC_ALLOC_HTAB: case KVM_CAP_PPC_RTAS: + case KVM_CAP_PPC_FIXUP_HCALL: #ifdef CONFIG_KVM_XICS case KVM_CAP_IRQ_XICS: #endif |