acrn-kernel/arch/x86/mm
Steve Rutherford ba50e7773a x86/sev: Make enc_dec_hypercall() accept a size instead of npages
commit ac3f9c9f1b upstream.

enc_dec_hypercall() accepted a page count instead of a size, which
forced its callers to round up. As a result, non-page aligned
vaddrs caused pages to be spuriously marked as decrypted via the
encryption status hypercall, which in turn caused consistent
corruption of pages during live migration. Live migration requires
accurate encryption status information to avoid migrating pages
from the wrong perspective.

Fixes: 064ce6c550 ("mm: x86: Invoke hypercall when page encryption status is changed")
Signed-off-by: Steve Rutherford <srutherford@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Tested-by: Ben Hillier <bhillier@google.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230824223731.2055016-1-srutherford@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:43:03 +02:00
..
pat x86/mm: Allow guest.enc_status_change_prepare() to fail 2023-07-19 16:21:00 +02:00
Makefile
amdtopology.c
cpu_entry_area.c
debug_pagetables.c
dump_pagetables.c
extable.c
fault.c mm: introduce new 'lock_mm_and_find_vma()' page fault helper 2023-07-01 13:16:24 +02:00
highmem_32.c
hugetlbpage.c
ident_map.c
init.c x86/mm: Use mm_alloc() in poking_init() 2023-08-08 20:03:49 +02:00
init_32.c
init_64.c
iomap_32.c
ioremap.c
kasan_init_64.c
kaslr.c x86/mm: Avoid using set_pgd() outside of real PGD pages 2023-06-28 11:12:27 +02:00
kmmio.c
kmsan_shadow.c
maccess.c
mem_encrypt.c
mem_encrypt_amd.c x86/sev: Make enc_dec_hypercall() accept a size instead of npages 2023-09-13 09:43:03 +02:00
mem_encrypt_boot.S
mem_encrypt_identity.c
mm_internal.h
mmap.c
mmio-mod.c
numa.c
numa_32.c
numa_64.c
numa_emulation.c
numa_internal.h
pf_in.c
pf_in.h
pgprot.c
pgtable.c
pgtable_32.c
physaddr.c
physaddr.h
pkeys.c
pti.c
srat.c
testmmiotrace.c
tlb.c