Skip to content

Commit

Permalink
KVM: VMX: Replace memset(<addr>, 0, PAGESIZE) with clear_page(<addr>)
Browse files Browse the repository at this point in the history
Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Shani Moideen authored and Avi Kivity committed Jul 16, 2007
1 parent 129ee91 commit a3870c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,16 +1180,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);

Expand Down

0 comments on commit a3870c4

Please sign in to comment.