From c463f451a73a2fbcf4b5e42766609fdb42467582 Mon Sep 17 00:00:00 2001 From: Juan Quintela <quintela@redhat.com> Date: Mon, 22 Nov 2010 15:57:06 -0200 Subject: [PATCH 2/6] KVM don't care about TLB handling RH-Author: Juan Quintela <quintela@redhat.com> Message-id: <4bd25f6cc4cdbc623bb1e968af8f846f148b1c72.1290441250.git.quintela@redhat.com> Patchwork-id: 13776 O-Subject: [PATCH 2/6] KVM don't care about TLB handling Bugzilla: 513765 589017 RH-Acked-by: Glauber Costa <glommer@redhat.com> RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> RH-Acked-by: Alex Williamson <alex.williamson@redhat.com> RH-Acked-by: Avi Kivity <avi@redhat.com> TLB handling is only used in TCG mode. It is very costly for guests with lots of memory ad lots of CPU's. Signed-off-by: Juan Quintela <quintela@redhat.com> --- qemu/exec.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/exec.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/exec.c b/qemu/exec.c index cf5a859..37bcc7a 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -1866,6 +1866,9 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, for(i = 0; i < len; i++) p[i] &= mask; + if (kvm_enabled()) + return; + /* we modify the TLB cache so that the dirty bit will be set again when accessing the range */ start1 = start + (unsigned long)phys_ram_base; -- 1.7.3.2