[PATCH 0/4] KVM: PPC: Book3S HV: Restore host state properly on guest exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It turns out that when we added the support for loading up the new
special-purpose registers on POWER8 when entering a guest, and saving
them on guest exit, we forgot to load up appropriate values for the
host for many of them.  Some of them have the potential to disrupt the
execution of the userspace program controlling the guest.  The ones
that could disrupt the host kernel were set to benign values by
commit ccec44563b18 ("KVM: PPC: Book3S HV: Sanitize special-purpose
register values on guest exit", 2016-03-05), but even with that commit
we lose hardware instruction and breakpoint settings on guest exit.
Also, commit 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution
of user space", 2016-11-15) sets the IAMR to prevent the kernel
executing from user pages, but the guest exit code resets the IAMR to
zero.

This series fixes these problems.  Because of the potential for the
guest to affect the controlling userspace, these are marked for
stable, and I will submit them for inclusion in 4.12.

Paul.

 arch/powerpc/kvm/book3s_hv.c            | 43 +++++++++++++++++++++++++++
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 52 ++++++++++++++++++++++++---------
 2 files changed, 82 insertions(+), 13 deletions(-)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux