mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
KVM: SVM: Allocate sd->save_area with __GFP_ZERO
And remove clear_page() on it. Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com> Message-Id: <20211118110814.2568-10-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1af4a1199a
commit
5835676710
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user