Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cfa4b0a authored by Avi Kivity's avatar Avi Kivity
Browse files

Revert "KVM: Avoid useless memory write when possible"



This reverts commit a3c870bd.  While it
does save useless updates, it (probably) defeats the fork detector, causing
a massive performance loss.

Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 5e58cfe4
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1070,10 +1070,8 @@ static int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,
		return 0;
	mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT);
	virt = kmap_atomic(page, KM_USER0);
	if (memcmp(virt + offset_in_page(gpa), val, bytes)) {
	kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
	memcpy(virt + offset_in_page(gpa), val, bytes);
	}
	kunmap_atomic(virt, KM_USER0);
	return 1;
}