Skip to content
Commit ac3f9c9f authored by Steve Rutherford's avatar Steve Rutherford Committed by Ingo Molnar
Browse files

x86/sev: Make enc_dec_hypercall() accept a size instead of npages



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: 064ce6c5 ("mm: x86: Invoke hypercall when page encryption status is changed")
Signed-off-by: default avatarSteve Rutherford <srutherford@google.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@amd.com>
Tested-by: default avatarBen Hillier <bhillier@google.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230824223731.2055016-1-srutherford@google.com
parent e221804d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment