From: Shani Moideen <shani.moideen-uxC5H9eHYlcAvxtiuMwx3w@public.gmane.org>
To: avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [KJPATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/svm.c
Date: Mon, 11 Jun 2007 09:28:26 +0530 [thread overview]
Message-ID: <1181534306.2300.7.camel@shani-win> (raw)
Hi,
Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in drivers/kvm/svm.c.
Signed-off-by: Shani Moideen <shani.moideen-uxC5H9eHYlcAvxtiuMwx3w@public.gmane.org>
----
thanks.
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index fa17d6d..14839dc 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -579,7 +579,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));
@@ -955,7 +955,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;
--
Shani
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next reply other threads:[~2007-06-11 3:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 3:58 Shani Moideen [this message]
2007-06-11 7:47 ` [KJPATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/svm.c Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1181534306.2300.7.camel@shani-win \
--to=shani.moideen-uxc5h9ehylcavxtiumwx3w@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox