Replacing memset(<addr>, 0, PAGESIZE) with clear_page (<addr>) in drivers/kvm/svm.c
Hi,
Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in drivers/kvm/svm.c.
Signed-off-by Shani Moideen <[email protected]>
----
thanks.
drivers/kvm/svm.c +2 -2
@@ -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 ;
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/
Avi Kivity
AppliedQuoted 3 lines · Shani Moideen
Hi,
Replacingmemset(<addr>,0,PAGE_SIZE)withclear_page()indrivers/kvm/svm.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/