public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [KJ PATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/vmx.c
@ 2007-06-11  4:01 Shani Moideen
  2007-06-11  7:48 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Shani Moideen @ 2007-06-11  4:01 UTC (permalink / raw)
  To: avi-atKUWr5tajBWk0Htik3J/w; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi,
Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in
drivers/kvm.vmx.c

Signed-off-by: Shani Moideen <shani.moideen-uxC5H9eHYlcAvxtiuMwx3w@public.gmane.org>
----

thanks.


diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 184238e..4abb306 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1017,16 +1017,16 @@ static int init_rmode_tss(struct kvm* kvm)
 	}
 
 	page = kmap_atomic(p1, KM_USER0);
-	memset(page, 0, PAGE_SIZE);
+	clear_page(page);
 	*(u16*)(page + 0x66) = TSS_BASE_SIZE + TSS_REDIRECTION_SIZE;
 	kunmap_atomic(page, KM_USER0);
 
 	page = kmap_atomic(p2, KM_USER0);
-	memset(page, 0, PAGE_SIZE);
+	clear_page(page);
 	kunmap_atomic(page, KM_USER0);
 
 	page = kmap_atomic(p3, KM_USER0);
-	memset(page, 0, PAGE_SIZE);
+	clear_page(page);
 	*(page + RMODE_TSS_SIZE - 2 * PAGE_SIZE - 1) = ~0;
 	kunmap_atomic(page, KM_USER0);
 

-- 
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/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [KJ PATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/vmx.c
  2007-06-11  4:01 [KJ PATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/vmx.c Shani Moideen
@ 2007-06-11  7:48 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-06-11  7:48 UTC (permalink / raw)
  To: Shani Moideen; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Shani Moideen wrote:
> Hi,
> Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in
> drivers/kvm.vmx.c
>
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-11  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-11  4:01 [KJ PATCH] Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/vmx.c Shani Moideen
2007-06-11  7:48 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox