Skip to content

RFC KVM: x86: mmu: don't re-generate permissions/pkru_mask bitmasks when source is unchanged 1;5004;0c update_permission_bitmask()/update_pkru_bitmask() are rarely called under normal circumstances but nesting changes everything. E.g. for nVMX we call kvm_mmu_reset_context() from nested_vmx_load_cr3() which happens on nested vmexit/vmentry. init_kvm_mmu() in its turn call init_kvm_nested_mmu() or init_kvm_tdp_mmu() (which operate on arch.nested_mmu and arch.mmu respectively) which unconditionally do update_permission_bitmask()/ update_pkru_bitmask().

Vitaly Kuznetsov kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1KVM: x86: mmu: don't re-generate permissions/pkru_mask bitmasks when source is unchanged 1;5004;0c update_permission_bitmask()/update_pkru_bitmask() are rarely called under normal circumstances but nesting changes everything. E.g. for nVMX we call kvm_mmu_reset_context() from nested_vmx_load_cr3() which happens on nested vmexit/vmentry. init_kvm_mmu() in its turn call init_kvm_nested_mmu() or init_kvm_tdp_mmu() (which operate on arch.nested_mmu and arch.mmu respectively) which unconditionally do update_permission_bitmask()/ update_pkru_bitmask().arch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.c+49 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread