Commit 58356767 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Paolo Bonzini

KVM: SVM: Allocate sd->save_area with __GFP_ZERO

And remove clear_page() on it.
Signed-off-by: default avatarLai Jiangshan <laijs@linux.alibaba.com>
Message-Id: <20211118110814.2568-10-jiangshanlai@gmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment