diff options
author | Avi Kivity <avi@qumranet.com> | 2007-07-23 18:33:14 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-25 14:30:56 +0300 |
commit | 7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc (patch) | |
tree | 2ab8a60fa7ed5164fa650452db9af957e07bb235 /drivers/kvm/kvm_main.c | |
parent | 5e58cfe41c7e5902c32bb7f62993d43fb4c48ccf (diff) | |
download | lwn-7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc.tar.gz lwn-7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc.zip |
Revert "KVM: Avoid useless memory write when possible"
This reverts commit a3c870bdce4d34332ebdba7eb9969592c4c6b243. While it
does save useless updates, it (probably) defeats the fork detector, causing
a massive performance loss.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 46efbe70801c..a8d8db8e3ccb 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -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); - } + 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; } |