提交 58356767 编写于 作者: L Lai Jiangshan 提交者: Paolo Bonzini

KVM: SVM: Allocate sd->save_area with __GFP_ZERO

And remove clear_page() on it.
Signed-off-by: NLai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20211118110814.2568-10-jiangshanlai@gmail.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 1af4a119
......@@ -589,12 +589,10 @@ static int svm_cpu_init(int cpu)
if (!sd)
return ret;
sd->cpu = cpu;
sd->save_area = alloc_page(GFP_KERNEL);
sd->save_area = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (!sd->save_area)
goto free_cpu_data;
clear_page(page_address(sd->save_area));
ret = sev_cpu_init(sd);
if (ret)
goto free_save_area;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册