]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SEV: Use PFN_DOWN() to simplify "number of pages" math when pinning memory
authorSean Christopherson <seanjc@google.com>
Fri, 13 Mar 2026 00:33:01 +0000 (17:33 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 3 Apr 2026 16:37:25 +0000 (09:37 -0700)
commit7ad02ff1e4a4d1a06483ec839cff26ea232db70f
tree622ab77b1334b24cdb78f54046418e4bbc7079a7
parent6d71f9349d9bf09bf82309bdc46704b4b6f6b314
KVM: SEV: Use PFN_DOWN() to simplify "number of pages" math when pinning memory

Use PFN_DOWN() instead of open coded equivalents in sev_pin_memory() to
simplify the code and make it easier to read.

No functional change intended (verified before and after versions of the
generated code are identical).

Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Tested-by: Liam Merwick <liam.merwick@oracle.com>
Link: https://patch.msgid.link/20260313003302.3136111-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c