[PATCH 03/34] KVM: Use gfn instead of hva for mmu_notifier_retry
Huang, Kai
kai.huang at intel.com
Mon Nov 6 20:29:42 AEDT 2023
On Sun, 2023-11-05 at 17:30 +0100, Paolo Bonzini wrote:
> From: Chao Peng <chao.p.peng at linux.intel.com>
>
> Currently in mmu_notifier invalidate path, hva range is recorded and then
> checked against by mmu_invalidate_retry_hva() in the page fault handling
> path. However, for the soon-to-be-introduced private memory, a page fault
> may not have a hva associated, checking gfn(gpa) makes more sense.
>
> For existing hva based shared memory, gfn is expected to also work. The
> only downside is when aliasing multiple gfns to a single hva, the
> current algorithm of checking multiple ranges could result in a much
> larger range being rejected. Such aliasing should be uncommon, so the
> impact is expected small.
>
> Suggested-by: Sean Christopherson <seanjc at google.com>
> Cc: Xu Yilun <yilun.xu at intel.com>
> Signed-off-by: Chao Peng <chao.p.peng at linux.intel.com>
> Reviewed-by: Fuad Tabba <tabba at google.com>
> Tested-by: Fuad Tabba <tabba at google.com>
> [sean: convert vmx_set_apic_access_page_addr() to gfn-based API]
> Signed-off-by: Sean Christopherson <seanjc at google.com>
> Reviewed-by: Paolo Bonzini <pbonzini at redhat.com>
> Reviewed-by: Xu Yilun <yilun.xu at linux.intel.com>
> Message-Id: <20231027182217.3615211-4-seanjc at google.com>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
>
Reviewed-by: Kai Huang <kai.huang at intel.com>
More information about the Linuxppc-dev
mailing list