From: Tianyu Lan Subject: Re: [PATCH V3 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support Date: Thu, 19 Jul 2018 09:31:33 +0000 Message-ID: References: <20180719083946.121493-1-Tianyu.Lan@microsoft.com> <70536ba6-fe2e-04ae-7055-e1eef4e87c64@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , "kvm@vger.kernel.org" , "rkrcmar@redhat.com" , Haiyang Zhang , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "Michael Kelley \(EOSG\)" , "mingo@redhat.com" , "hpa@zytor.com" , "devel@linuxdriverproject.org" , "tglx@linutronix.de" , "vkuznets@redhat.com" To: Paolo Bonzini , Tianyu Lan Return-path: In-Reply-To: <70536ba6-fe2e-04ae-7055-e1eef4e87c64@redhat.com> Content-Language: en-US Content-ID: <49E2B9F77D1E2F41A6EE837556EA67C4@APCP153.PROD.OUTLOOK.COM> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: kvm.vger.kernel.org On 7/19/2018 4:57 PM, Paolo Bonzini wrote: > On 19/07/2018 10:39, Tianyu Lan wrote: >> Hyper-V provides a para-virtualization hypercall HvFlushGuestPhysicalAddressSpace >> to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead >> of flushing ept tlb among vcpus. The tradition way is to send IPIs to all affected >> vcpus and executes INVEPT on each vcpus. It will trigger several vmexits for IPI and >> INVEPT emulation. The pv hypercall can help to flush specified ept table on all vcpus >> via one single hypercall. > > Thanks, this looks good apart from a global replace of EFAULT with > ENOTSUP (which can be done when applying). Can I have an explicit ack > for patches 1 and 2 from the Hyper-V people? Thanks, Paolo. I will try to hyper-V people's ack. > > Thanks, > > Paolo > >> Change since v2: >> - Make ept_pointers_match as tristate "check", "match" and "mismatch". >> Set "check" in vmx_set_cr3(), check all ept table pointers in hv_remote_flush_tlb() >> and call hypercall when all ept pointers are same. >> - Rename kvm_arch_hv_flush_remote_tlb with kvm_arch_flush_remote_tlb and >> Rename kvm_x86_ops->hv_tlb_remote_flush with kvm_x86_ops->tlb_remote_flush >> - Fix issue that ignore updating tlbs_dirty during calling kvm_arch_flush_remote_tlbs() >> - Merge patch "KVM/VMX: Add identical ept table pointer check" and >> patch "KVM/x86: Add tlb_remote_flush callback support for vmx" >> >> Change since v1: >> - Fix compilation error for non-x86 platform. >> - Use ept_pointers_match to check condition of identical ept >> table pointer and get ept pointer from struct vcpu_vmx->ept_pointer. >> - Add hyperv_nested_flush_guest_mapping ftrace support >> >> >> >> Lan Tianyu (4): >> X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall >> support >> X86/Hyper-V: Add hyperv_nested_flush_guest_mapping ftrace support >> KVM: Add tlb remote flush callback in kvm_x86_ops. >> KVM/x86: Add tlb_remote_flush callback support for vmx >> >> arch/x86/hyperv/Makefile | 2 +- >> arch/x86/hyperv/nested.c | 67 ++++++++++++++++++++++++++++++++++ >> arch/x86/include/asm/hyperv-tlfs.h | 8 +++++ >> arch/x86/include/asm/kvm_host.h | 11 ++++++ >> arch/x86/include/asm/mshyperv.h | 2 ++ >> arch/x86/include/asm/trace/hyperv.h | 14 ++++++++ >> arch/x86/kvm/vmx.c | 72 ++++++++++++++++++++++++++++++++++++- >> include/linux/kvm_host.h | 7 ++++ >> virt/kvm/kvm_main.c | 3 +- >> 9 files changed, 183 insertions(+), 3 deletions(-) >> create mode 100644 arch/x86/hyperv/nested.c >> >