[PATCH v5 08/12] KVM: Reinstate gfn_to_pfn_cache with invalidation support

Paolo Bonzini pbonzini at redhat.com
Thu Dec 9 14:34:37 PST 2021

On 12/9/21 21:40, David Woodhouse wrote:
> NP, very useful fixes. Thanks. Incremental patch looks like this. It
> passes the xen_shinfo_test self-test; will test it with real Xen guests
> tomorrow and repost based on your kvm/next tree once it shows up.

Compared to the review it's missing this hunk:

@@ -265,7 +265,7 @@ void kvm_gfn_to_pfn_cache_unmap(struct kvm *kvm, struct gfn_to_pfn_cache *gpc)
   	gpc->valid = false;
-	old_khva = gpc->khva;
+	old_khva = (void *)((unsigned long)gpc->khva & ~PAGE_MASK);
   	old_dirty = gpc->dirty;
   	old_gpa = gpc->gpa;
   	old_pfn = gpc->pfn;

Otherwise looks good, thanks!


More information about the kvm-riscv mailing list