From: "Jan Beulich" Subject: Re: [PATCH v2 1/5] VMX: fix interaction of APIC-V and Viridian emulation Date: Mon, 24 Jun 2013 13:52:47 +0100 Message-ID: <51C85D3F02000078000E003A@nat28.tlf.novell.com> References: <51C8092A02000078000DFDA0@nat28.tlf.novell.com> <51C80B7602000078000DFDAE@nat28.tlf.novell.com> <51C81B20.7040000@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51C81B20.7040000@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Keir Fraser , Eddie Dong , xen-devel , paul.durrant@citrix.com, Jun Nakajima , Yang Z Zhang List-Id: xen-devel@lists.xenproject.org >>> On 24.06.13 at 12:10, George Dunlap wrote: > On 24/06/13 08:03, Jan Beulich wrote: >> Viridian using a synthetic MSR for issuing EOI notifications bypasses >> the normal in-processor handling, which would clear >> GUEST_INTR_STATUS.SVI. Hence we need to do this in software in order >> for future interrupts to get delivered. >> >> Based on analysis by Yang Z Zhang . >> >> Signed-off-by: Jan Beulich > > Hmm... so there are three paths which may end up calling this vmx EOI > code -- from viridian.c:wrmsr_vidiridan_regs(), from > vlapic.c:vlapic_reg_write(), and vmx_handle_eoi_write(). This is the very reason why I favored patch 2 over this one for 4.3 ... > Obviously the viridian code is what we want. But which of the other two > paths will also end up taking it, and is it correct? In other words, > for which of those will cpu_has_vmx_virtual_intr_delivery be set? The two other paths would in the worst case end up re-doing what the hardware already did. However, both of them can't occur with APIC register virtualization enabled, and during early investigation of this issue I was told that even if they're formally independent features, virtual interrupt delivery always implies APIC register virtualization. Jan