lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 15/22] kvm: mmu: Support changed pte notifier in tdp MMU
From
Date
On 25/09/20 23:22, Ben Gardon wrote:
> @@ -1708,6 +1695,21 @@ static int kvm_unmap_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head,
> return kvm_zap_rmapp(kvm, rmap_head);
> }
>
> +u64 kvm_mmu_changed_pte_notifier_make_spte(u64 old_spte, kvm_pfn_t new_pfn)
> +{
> + u64 new_spte;
> +
> + new_spte = old_spte & ~PT64_BASE_ADDR_MASK;
> + new_spte |= (u64)new_pfn << PAGE_SHIFT;
> +
> + new_spte &= ~PT_WRITABLE_MASK;
> + new_spte &= ~SPTE_HOST_WRITEABLE;
> +
> + new_spte = mark_spte_for_access_track(new_spte);
> +
> + return new_spte;
> +}
> +

And another. :)

\
 
 \ /
  Last update: 2020-09-26 02:33    [W:0.374 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site