From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liran Alon Subject: Re: [PATCH v3 10/11] KVM: nVMX: Wake halted L2 on nested posted-interrupt Date: Tue, 02 Jan 2018 00:37:43 +0200 Message-ID: <5A4AB837.3090107@ORACLE.COM> References: <1514131983-24305-1-git-send-email-liran.alon@oracle.com> <1514131983-24305-11-git-send-email-liran.alon@oracle.com> <5A438B8C.3080109@ORACLE.COM> <5A43979A.5050400@ORACLE.COM> <9d603bfb-b16b-9195-58de-fd6c4946a14e@redhat.com> <5A43BD3C.3010804@ORACLE.COM> <2f1b981c-d5b4-38d7-2187-f252931258f0@redhat.com> <407d90ec-7a87-f1ba-755b-901f0f1f199b@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jmattson@google.com, wanpeng.li@hotmail.com, idan.brown@ORACLE.COM, Liam Merwick , Konrad Rzeszutek Wilk To: Paolo Bonzini , rkrcmar@redhat.com, kvm@vger.kernel.org Return-path: Received: from aserp2120.oracle.com ([141.146.126.78]:60118 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbeAAWhz (ORCPT ); Mon, 1 Jan 2018 17:37:55 -0500 In-Reply-To: <407d90ec-7a87-f1ba-755b-901f0f1f199b@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/01/18 23:32, Paolo Bonzini wrote: > On 27/12/2017 16:54, Paolo Bonzini wrote: >> (b) Get rid of pi_pending and instead use virtual LAPIC IRR bit and >> process it specially in case vCPU in non-root-mode & posted-interrupts >> is active. >> (c) Get rid of software simulation of nested posted-interrupts >> processing and instead use self-IPI trick to make CPU process it for us. >> >> What do you think? > > I guess 2(b) would be done in vmx_hwapic_irr_update? I'm not sure yet. I am currently busy with other tasks and therefore didn't have enough time to work on the new version of this series since your comments. I need to think of what would be the most elegant and easy-to-understand code for this mechanism. There are many delicate cases here that needs to be thought through. Regarding vmx_hwapic_irr_update(), I think that it is a bit misleading putting the logic handling this case in there. vmx_hwapic_irr_update() should conceptually only update the RVI. Similar to vmx_hwapic_isr_update() update only the SVI. I also think that the separation between vmx_hwapic_irr_update() & vmx_set_rvi() is a bit weird. I would have except vmx_hwapic_irr_update() and vmx_hwapic_isr_update() to be symmetric. Regards, -Liran > > Thanks, > > Paolo >