Adding the accounting flag when allocating pages within the SEV function, since these memory pages should belong to individual VM. No functional change intended.
Unified · Split
| @@ -844,7 +844,7 @@ static int __sev_dbg_encrypt_user(struct kvm *kvm, unsigned long paddr, · 843 unmodified lines | ||
| 844 | 844 | |
| 845 | 845 | /* If source buffer is not aligned then use an intermediate buffer */ |
| 846 | 846 | if (!IS_ALIGNED((unsigned long)vaddr, 16)) { |
| 847 | − src_tpage = alloc_page(GFP_KERNEL); | |
| 847 | + src_tpage = alloc_page(GFP_KERNEL_ACCOUNT); | |
| 848 | 848 | if (!src_tpage) |
| 849 | 849 | return -ENOMEM; |
| 850 | 850 | |
| @@ -865,7 +865,7 @@ static int __sev_dbg_encrypt_user(struct kvm *kvm, unsigned long paddr, · 14 unmodified lines | ||
| 865 | 865 | if (!IS_ALIGNED((unsigned long)dst_vaddr, 16) || !IS_ALIGNED(size, 16)) { |
| 866 | 866 | int dst_offset; |
| 867 | 867 | |
| 868 | − dst_tpage = alloc_page(GFP_KERNEL); | |
| 868 | + dst_tpage = alloc_page(GFP_KERNEL_ACCOUNT); | |
| 869 | 869 | if (!dst_tpage) { |
| 870 | 870 | ret = -ENOMEM; |
| 871 | 871 | goto e_free; |