]> err.no Git - linux-2.6/blobdiff - drivers/kvm/mmu.c
KVM: Assume that writes smaller than 4 bytes are to non-pagetable pages
[linux-2.6] / drivers / kvm / mmu.c
index e8e228118de9be496660ac8fa9ece297a39c1b57..2277b7cd118c86af756d8e080176077a1a69d121 100644 (file)
@@ -1169,6 +1169,7 @@ void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes)
                        continue;
                pte_size = page->role.glevels == PT32_ROOT_LEVEL ? 4 : 8;
                misaligned = (offset ^ (offset + bytes - 1)) & ~(pte_size - 1);
+               misaligned |= bytes < 4;
                if (misaligned || flooded) {
                        /*
                         * Misaligned accesses are too much trouble to fix