From: Avi Kivity <avi@qumranet.com>
To: kvm-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
yaniv.kamay@qumranet.com, mingo@elte.hu
Subject: [PATCH 3/6] KVM: AMD SVM: Add missing tlb flushes to the guest mmu
Date: Tue, 28 Nov 2006 12:41:49 -0000 [thread overview]
Message-ID: <20061128124149.5F5D825015E@cleopatra.q> (raw)
In-Reply-To: <456C2D89.4050508@qumranet.com>
Add a couple of missing mmu flushes. The Intel tlb is too coarse to be
affected, but they are necessary for AMD.
Signed-off-by: Yaniv Kamay <yaniv@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/mmu.c
===================================================================
--- linux-2.6.orig/drivers/kvm/mmu.c
+++ linux-2.6/drivers/kvm/mmu.c
@@ -324,6 +324,7 @@ static void nonpaging_flush(struct kvm_v
if (is_paging(vcpu))
root |= (vcpu->cr3 & (CR3_PCD_MASK | CR3_WPT_MASK));
kvm_arch_ops->set_cr3(vcpu, root);
+ kvm_arch_ops->flush_tlb(vcpu);
}
static gpa_t nonpaging_gva_to_gpa(struct kvm_vcpu *vcpu, gva_t vaddr)
@@ -407,6 +408,7 @@ static void kvm_mmu_flush_tlb(struct kvm
release_pt_page_64(vcpu, page->page_hpa, 1);
}
++kvm_stat.tlb_flush;
+ kvm_arch_ops->flush_tlb(vcpu);
}
static void paging_new_cr3(struct kvm_vcpu *vcpu)
next prev parent reply other threads:[~2006-11-28 12:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 12:37 [PATCH 0/6] KVM: Add AMD SVM support Avi Kivity
2006-11-28 12:39 ` [PATCH 1/6] KVM: AMD SVM: Add architecture definitions for AMD SVM Avi Kivity
2006-11-28 12:40 ` [PATCH 2/6] KVM: AMD SVM: Enhance x86 emulator Avi Kivity
2006-11-28 12:41 ` Avi Kivity [this message]
2006-11-28 12:42 ` [PATCH 4/6] KVM: AMD SVM: Add data structures Avi Kivity
2006-11-28 12:43 ` [PATCH 5/6] KVM: AMD SVM: Implementation Avi Kivity
2006-11-28 12:44 ` [PATCH 6/6] KVM: AMD SVM: Plumbing Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061128124149.5F5D825015E@cleopatra.q \
--to=avi@qumranet.com \
--cc=akpm@osdl.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yaniv.kamay@qumranet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox