Skip to content

Commit 7cbb14d

Browse files
qianfengrongsean-jc
authored andcommitted
KVM: TDX: Remove redundant __GFP_ZERO
Remove the redundant __GFP_ZERO flag from kcalloc() since kcalloc() inherently zeroes memory. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/r/20250808074532.215098-1-rongqianfeng@vivo.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 65391fe commit 7cbb14d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/tdx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2480,7 +2480,7 @@ static int __tdx_td_init(struct kvm *kvm, struct td_params *td_params,
24802480
/* TDVPS = TDVPR(4K page) + TDCX(multiple 4K pages), -1 for TDVPR. */
24812481
kvm_tdx->td.tdcx_nr_pages = tdx_sysinfo->td_ctrl.tdvps_base_size / PAGE_SIZE - 1;
24822482
tdcs_pages = kcalloc(kvm_tdx->td.tdcs_nr_pages, sizeof(*kvm_tdx->td.tdcs_pages),
2483-
GFP_KERNEL | __GFP_ZERO);
2483+
GFP_KERNEL);
24842484
if (!tdcs_pages)
24852485
goto free_tdr;
24862486

0 commit comments

Comments
 (0)