From: Shani Moideen Date: Mon, 11 Jun 2007 03:58:26 +0000 (+0530) Subject: KVM: SVM: Replace memset(, 0, PAGESIZE) with clear_page() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=129ee910df90738da950021a9b9784ea43d5f228;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git KVM: SVM: Replace memset(, 0, PAGESIZE) with clear_page() Signed-off-by: Shani Moideen Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index eb175c5cd499..68841ef671b9 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -581,7 +581,7 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu) goto out2; vcpu->svm->vmcb = page_address(page); - memset(vcpu->svm->vmcb, 0, PAGE_SIZE); + clear_page(vcpu->svm->vmcb); vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; vcpu->svm->asid_generation = 0; memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs)); @@ -957,7 +957,7 @@ static int shutdown_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) * VMCB is undefined after a SHUTDOWN intercept * so reinitialize it. */ - memset(vcpu->svm->vmcb, 0, PAGE_SIZE); + clear_page(vcpu->svm->vmcb); init_vmcb(vcpu->svm->vmcb); kvm_run->exit_reason = KVM_EXIT_SHUTDOWN;