linux_dsm_epyc7002/arch/x86
Juergen Gross 9c62adb6e2 xen: fix p2m size in dom0 for disabled memory hotplug case
commit 882213990d32fd224340a4533f6318dd152be4b2 upstream.

Since commit 9e2369c06c ("xen: add helpers to allocate unpopulated
memory") foreign mappings are using guest physical addresses allocated
via ZONE_DEVICE functionality.

This will result in problems for the case of no balloon memory hotplug
being configured, as the p2m list will only cover the initial memory
size of the domain. Any ZONE_DEVICE allocated address will be outside
the p2m range and thus a mapping can't be established with that memory
address.

Fix that by extending the p2m size for that case. At the same time add
a check for a to be created mapping to be within the p2m limits in
order to detect errors early.

While changing a comment, remove some 32-bit leftovers.

This is XSA-369.

Fixes: 9e2369c06c ("xen: add helpers to allocate unpopulated memory")
Cc: <stable@vger.kernel.org> # 5.9
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:34:15 +01:00
..
boot A set of fixes for x86: 2020-12-06 11:22:39 -08:00
configs
crypto crypto: aesni - prevent misaligned buffers on the stack 2021-03-04 11:38:31 +01:00
entry x86/entry: Fix instrumentation annotation 2021-03-04 11:38:35 +01:00
events perf/x86/kvm: Add Cascade Lake Xeon steppings to isolation_ucodes[] 2021-03-07 12:34:13 +01:00
hyperv x86/hyperv: Fix kexec panic/hang issues 2021-01-27 11:54:57 +01:00
ia32
include xen: fix p2m size in dom0 for disabled memory hotplug case 2021-03-07 12:34:15 +01:00
kernel x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk 2021-03-07 12:34:09 +01:00
kvm KVM: nSVM: fix running nested guests when npt=0 2021-03-04 11:38:39 +01:00
lib x86/mmx: Use KFPU_387 for MMX string operations 2021-01-27 11:55:13 +01:00
math-emu
mm x86: fix seq_file iteration for pat/memtype.c 2021-03-04 11:38:38 +01:00
net bpf: x64: Do not emit sub/add 0, %rsp when !stack_depth 2020-09-29 16:47:39 -07:00
oprofile
pci x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() 2021-02-17 11:02:28 +01:00
platform x86/efi: Remove EFI PGD build time checks 2021-02-17 11:02:24 +01:00
power
purgatory treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
ras
realmode
tools x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-03-07 12:34:04 +01:00
um arch/um: partially revert the conversion to __section() macro 2020-10-26 15:39:37 -07:00
video
xen xen: fix p2m size in dom0 for disabled memory hotplug case 2021-03-07 12:34:15 +01:00
.gitignore
Kbuild
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
Makefile x86/build: Disable CET instrumentation in the kernel for 32-bit too 2021-02-17 11:02:27 +01:00
Makefile_32.cpu
Makefile.um