diff options
Diffstat (limited to 'drivers/kvm')
-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, | |||
1070 | return 0; | 1070 | return 0; |
1071 | mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT); | 1071 | mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT); |
1072 | virt = kmap_atomic(page, KM_USER0); | 1072 | virt = kmap_atomic(page, KM_USER0); |
1073 | if (memcmp(virt + offset_in_page(gpa), val, bytes)) { | 1073 | kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes); |
1074 | kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes); | 1074 | memcpy(virt + offset_in_page(gpa), val, bytes); |
1075 | memcpy(virt + offset_in_page(gpa), val, bytes); | ||
1076 | } | ||
1077 | kunmap_atomic(virt, KM_USER0); | 1075 | kunmap_atomic(virt, KM_USER0); |
1078 | return 1; | 1076 | return 1; |
1079 | } | 1077 | } |