Joerg Roedel wrote:
On Fri, May 15, 2009 at 10:22:19AM +0200, Alexander Graf wrote:
SVM adds another way to do INVLPG by ASID which Hyper-V makes use of,
so let's implement it!
For now we just do the same thing invlpg does, as asid switching
means we flush the mmu anyways. That might change one day though.
+static int invlpga_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
+{
+ struct kvm_vcpu *vcpu = &svm->vcpu;
+ nsvm_printk("INVLPGA\n");
+ svm->next_rip = kvm_rip_read(&svm->vcpu) + 3;
+ skip_emulated_instruction(&svm->vcpu);
+
+ kvm_mmu_reset_context(vcpu);
+ kvm_mmu_load(vcpu);
+ return 1;
+}
+
Hmm, since we flush the TLB on every nested-guest entry I think we can
make this function a nop.
I think, unless it specified ASID 0? In that case you need a local tlb
flush.
(the kvm_mmu_reset_context() and kvm_mmu_load() are total overkills in
any case).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html