]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Add CAP to indicate hcall fixes
authorAlexander Graf <agraf@suse.de>
Thu, 22 May 2014 15:40:15 +0000 (17:40 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 30 May 2014 12:26:27 +0000 (14:26 +0200)
commit599c6a73fb2a1045eae595ee55dcb73964d86f4c
tree8d405603ff033f4e752fdfdebf54e31f9edff1bf
parent98a9b44c44b3c84297aa1cda0e1af94af44c361f
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>
arch/powerpc/kvm/powerpc.c
include/uapi/linux/kvm.h