Commit 895e1fc7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: Fix off-by-one when writing to a nonpae guest pde
parents ac57b3a9 6b8d0f9b
...@@ -1171,6 +1171,7 @@ void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes) ...@@ -1171,6 +1171,7 @@ void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes)
* and zap two pdes instead of one. * and zap two pdes instead of one.
*/ */
if (level == PT32_ROOT_LEVEL) { if (level == PT32_ROOT_LEVEL) {
page_offset &= ~7; /* kill rounding error */
page_offset <<= 1; page_offset <<= 1;
npte = 2; npte = 2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment