linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 00/13] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM
@ 2018-09-18  3:18 Tianyu Lan
  2018-09-18  3:18 ` [PATCH V2 1/13] KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops Tianyu Lan
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Tianyu Lan @ 2018-09-18  3:18 UTC (permalink / raw)
  Cc: Tianyu Lan, devel, Haiyang Zhang, hpa, kvm, KY Srinivasan,
	linux-kernel, mingo, pbonzini, rkrcmar, Stephen Hemminger, tglx,
	x86, Michael Kelley (EOSG),
	vkuznets, Jork Loeser


For nested memory virtualization, Hyper-v doesn't set write-protect
L1 hypervisor EPT page directory and page table node to track changes 
while it relies on guest to tell it changes via HvFlushGuestAddressLlist
hypercall. HvFlushGuestAddressLlist hypercall provides a way to flush
EPT page table with ranges which are specified by L1 hypervisor.

If L1 hypervisor uses INVEPT or HvFlushGuestAddressSpace hypercall to
flush EPT tlb, Hyper-V will invalidate associated EPT shadow page table
and sync L1's EPT table when next EPT page fault is triggered.
HvFlushGuestAddressLlist hypercall helps to avoid such redundant EPT
page fault and synchronization of shadow page table.

Change since v1:
       1) Convert "end_gfn" of struct kvm_tlb_range to "pages" in order
          to avoid confusion as to whether "end_gfn" is inclusive or exlusive.
       2) Add hyperv tlb range struct and replace kvm tlb range struct
          with new struct in order to avoid using kvm struct in the hyperv
	  code directly.

Lan Tianyu (13):
  KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops
  KVM/MMU: Add tlb flush with range helper function
  KVM: Replace old tlb flush function with new one to flush a specified
    range.
  KVM/MMU: Flush tlb directly in the kvm_handle_hva_range()
  KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range()
  KVM/MMU: Flush tlb directly in kvm_mmu_zap_collapsible_spte()
  KVM: Add flush_link and parent_pte in the struct kvm_mmu_page
  KVM: Add spte's point in the struct kvm_mmu_page
  KVM/MMU: Replace tlb flush function with range list flush function
  x86/hyper-v: Add HvFlushGuestAddressList hypercall support
  x86/Hyper-v: Add trace in the
    hyperv_nested_flush_guest_mapping_range()
  KVM/VMX: Change hv flush logic when ept tables are mismatched.
  KVM/VMX: Add hv tlb range flush support

 arch/x86/hyperv/nested.c            | 104 ++++++++++++++++++++++++++
 arch/x86/include/asm/hyperv-tlfs.h  |  17 +++++
 arch/x86/include/asm/kvm_host.h     |  10 +++
 arch/x86/include/asm/mshyperv.h     |  16 ++++
 arch/x86/include/asm/trace/hyperv.h |  14 ++++
 arch/x86/kvm/mmu.c                  | 143 +++++++++++++++++++++++++++++++-----
 arch/x86/kvm/paging_tmpl.h          |  16 +++-
 arch/x86/kvm/vmx.c                  |  65 +++++++++++++---
 8 files changed, 354 insertions(+), 31 deletions(-)

-- 
2.14.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-09-20 19:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18  3:18 [PATCH V2 00/13] x86/KVM/Hyper-v: Add HV ept tlb range flush hypercall support in KVM Tianyu Lan
2018-09-18  3:18 ` [PATCH V2 1/13] KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops Tianyu Lan
2018-09-18  3:18 ` [PATCH V2 2/13] KVM/MMU: Add tlb flush with range helper function Tianyu Lan
2018-09-19 16:07   ` Michael Kelley (EOSG)
2018-09-18  3:18 ` [PATCH V2 3/13] KVM: Replace old tlb flush function with new one to flush a specified range Tianyu Lan
2018-09-18  3:18 ` [PATCH V2 4/13] KVM/MMU: Flush tlb directly in the kvm_handle_hva_range() Tianyu Lan
2018-09-19 16:08   ` Michael Kelley (EOSG)
2018-09-20 14:30     ` Tianyu Lan
2018-09-20 19:05       ` Michael Kelley (EOSG)
2018-09-18  3:18 ` [PATCH V2 5/13] KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range() Tianyu Lan
2018-09-18  3:18 ` [PATCH V2 6/13] KVM/MMU: Flush tlb directly in kvm_mmu_zap_collapsible_spte() Tianyu Lan
2018-09-18  3:18 ` [PATCH V2 7/13] KVM: Add flush_link and parent_pte in the struct kvm_mmu_page Tianyu Lan
2018-09-18  3:19 ` [PATCH V2 8/13] KVM: Add spte's point " Tianyu Lan
2018-09-18  3:19 ` [PATCH V2 9/13] KVM/MMU: Replace tlb flush function with range list flush function Tianyu Lan
2018-09-18  3:19 ` [PATCH V2 10/13] x86/hyper-v: Add HvFlushGuestAddressList hypercall support Tianyu Lan
2018-09-19 17:00   ` Michael Kelley (EOSG)
2018-09-18  3:19 ` [PATCH V2 11/13] x86/Hyper-v: Add trace in the hyperv_nested_flush_guest_mapping_range() Tianyu Lan
2018-09-18  3:19 ` [PATCH V2 12/13] KVM/VMX: Change hv flush logic when ept tables are mismatched Tianyu Lan
2018-09-18  3:19 ` [PATCH V2 13/13] KVM/VMX: Add hv tlb range flush support Tianyu Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).