diff options
author | Shani Moideen <shani.moideen@wipro.com> | 2007-06-10 23:58:26 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:46 -0400 |
commit | 129ee910df90738da950021a9b9784ea43d5f228 (patch) | |
tree | daaf5b018383c517cfb78990395f5b7d754a0342 /drivers/kvm/svm.c | |
parent | d9e368d61263055eceac2966bb7ea31b89da3425 (diff) |
KVM: SVM: Replace memset(<addr>, 0, PAGESIZE) with clear_page(<addr>)
Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
581 | goto out2; | 581 | goto out2; |
582 | 582 | ||
583 | vcpu->svm->vmcb = page_address(page); | 583 | vcpu->svm->vmcb = page_address(page); |
584 | memset(vcpu->svm->vmcb, 0, PAGE_SIZE); | 584 | clear_page(vcpu->svm->vmcb); |
585 | vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; | 585 | vcpu->svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; |
586 | vcpu->svm->asid_generation = 0; | 586 | vcpu->svm->asid_generation = 0; |
587 | memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs)); | 587 | 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) | |||
957 | * VMCB is undefined after a SHUTDOWN intercept | 957 | * VMCB is undefined after a SHUTDOWN intercept |
958 | * so reinitialize it. | 958 | * so reinitialize it. |
959 | */ | 959 | */ |
960 | memset(vcpu->svm->vmcb, 0, PAGE_SIZE); | 960 | clear_page(vcpu->svm->vmcb); |
961 | init_vmcb(vcpu->svm->vmcb); | 961 | init_vmcb(vcpu->svm->vmcb); |
962 | 962 | ||
963 | kvm_run->exit_reason = KVM_EXIT_SHUTDOWN; | 963 | kvm_run->exit_reason = KVM_EXIT_SHUTDOWN; |