lkml.org 
[lkml]   [2007]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 55/58] KVM: SVM: Replace memset(<addr>, 0, PAGESIZE) with clear_page(<addr>)
    Date
    From: Shani Moideen <shani.moideen@wipro.com>

    Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
    Signed-off-by: Avi Kivity <avi@qumranet.com>
    ---
    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 eb175c5..68841ef 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;
    --
    1.5.0.6
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-06-17 12:01    [W:3.565 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site