Commit 050d683a authored by Juergen Gross's avatar Juergen Gross Committed by Aichun Shi
Browse files

x86/mm: fix poking_init() for Xen PV guests

stable inclusion
from stable-v5.10.189
commit f076d081787803b972a9939e477c6456f0c8fd70
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8LVBS
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f076d081787803b972a9939e477c6456f0c8fd70



-------------------------------------

Intel-SIG: commit f076d0817878 ("x86/mm: fix poking_init() for Xen PV guests")
Backport x86 related patches from 5.10.189 upstream

-------------------------------------

commit 26ce6ec3 upstream.

Commit 3f4c8211 ("x86/mm: Use mm_alloc() in poking_init()") broke
the kernel for running as Xen PV guest.

It seems as if the new address space is never activated before being
used, resulting in Xen rejecting to accept the new CR3 value (the PGD
isn't pinned).

Fix that by adding the now missing call of paravirt_arch_dup_mmap() to
poking_init(). That call was previously done by dup_mm()->dup_mmap() and
it is a NOP for all cases but for Xen PV, where it is just doing the
pinning of the PGD.

Fixes: 3f4c8211 ("x86/mm: Use mm_alloc() in poking_init()")
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230109150922.10578-1-jgross@suse.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 49c2ded1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment