]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: SVM: Replace memset(<addr>, 0, PAGESIZE) with clear_page(<addr>)
authorShani Moideen <shani.moideen@wipro.com>
Mon, 11 Jun 2007 03:58:26 +0000 (09:28 +0530)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:46 +0000 (12:05 +0300)
Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/svm.c

index eb175c5cd4997dbb3224922fa3c81b2f45b41d60..68841ef671b9f5440664cec6ced345c7b9b5aff5 100644 (file)
@@ -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;