Skip to contentSkip to conversation

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

PATCH Applied Shani Moideen 2 participants 2 messages Jun 11, 2007 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/vmx.c

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

----

thanks.

drivers/kvm/vmx.c +3 -3
index 184238e..4abb306 100644
@@ -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);
 
Signature · 7 lines
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/
Applied
#1 lore raw
Quoted 5 lines · Shani Moideen

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

Applied, thanks.

Signature · 8 lines
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/