浏览代码

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
Linus Torvalds 18 年之前
父节点
当前提交
895e1fc722
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/kvm/mmu.c

+ 1 - 0
drivers/kvm/mmu.c

@@ -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.
 			 */
 			if (level == PT32_ROOT_LEVEL) {
+				page_offset &= ~7; /* kill rounding error */
 				page_offset <<= 1;
 				npte = 2;
 			}