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 | /* If source buffer is not aligned then use an intermediate buffer */ | 845 | /* If source buffer is not aligned then use an intermediate buffer */ |
| 846 | if (!IS_ALIGNED((unsigned long)vaddr, 16)) { | 846 | if (!IS_ALIGNED((unsigned long)vaddr, 16)) { |
| 847 | src_tpage = alloc_page(GFP_KERNEL); | 847 | src_tpage = alloc_page(GFP_KERNEL_ACCOUNT); |
| 848 | if (!src_tpage) | 848 | if (!src_tpage) |
| 849 | return -ENOMEM; | 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 | if (!IS_ALIGNED((unsigned long)dst_vaddr, 16) || !IS_ALIGNED(size, 16)) { | 865 | if (!IS_ALIGNED((unsigned long)dst_vaddr, 16) || !IS_ALIGNED(size, 16)) { |
| 866 | int dst_offset; | 866 | int dst_offset; |
| 867 | 867 | ||
| 868 | dst_tpage = alloc_page(GFP_KERNEL); | 868 | dst_tpage = alloc_page(GFP_KERNEL_ACCOUNT); |
| 869 | if (!dst_tpage) { | 869 | if (!dst_tpage) { |
| 870 | ret = -ENOMEM; | 870 | ret = -ENOMEM; |
| 871 | goto e_free; | 871 | goto e_free; |