]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Fix off-by-one calculating large page count
authorAvi Kivity <avi@redhat.com>
Sun, 29 Mar 2009 13:31:25 +0000 (16:31 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 22 Apr 2009 10:52:09 +0000 (13:52 +0300)
commit5bde80334b5ef5e8711afdfaf9a6b1d84c946a3c
tree33fa687fa78b3c8b89d032ca11b89443296449a2
parent1e0aeebdb5124157dd204ae4c92d732bfd7443c5
KVM: MMU: Fix off-by-one calculating large page count

The large page initialization code concludes there are two large pages spanned
by a slot covering 1 (small) page starting at gfn 1.  This is incorrect, and
also results in incorrect write_count initialization in some cases (base = 1,
npages = 513 for example).

Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
virt/kvm/kvm_main.c