]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: PPC: Book3S HV: Check for MMU ready on piggybacked virtual cores
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 27 Aug 2019 01:31:37 +0000 (11:31 +1000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:25 +0000 (19:04 +0100)
commit3a5ef4b1acd798d64303de5298d5b0365efef78c
treefdb5ac73a7dc031e381a8947cc74706d5f59d02f
parent3a478877a11e48f796352ea86d9e0f5a5f939f89
KVM: PPC: Book3S HV: Check for MMU ready on piggybacked virtual cores

BugLink: https://bugs.launchpad.net/bugs/1849576
commit d28eafc5a64045c78136162af9d4ba42f8230080 upstream.

When we are running multiple vcores on the same physical core, they
could be from different VMs and so it is possible that one of the
VMs could have its arch.mmu_ready flag cleared (for example by a
concurrent HPT resize) when we go to run it on a physical core.
We currently check the arch.mmu_ready flag for the primary vcore
but not the flags for the other vcores that will be run alongside
it.  This adds that check, and also a check when we select the
secondary vcores from the preempted vcores list.

Cc: stable@vger.kernel.org # v4.14+
Fixes: 38c53af85306 ("KVM: PPC: Book3S HV: Fix exclusion between HPT resizing and other HPT updates")
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/kvm/book3s_hv.c