From: "Jan Beulich" Subject: Re: [PATCH] x86/HVM: EOI handling function adjustments Date: Thu, 18 Jun 2015 14:46:27 +0100 Message-ID: <5582E7D30200007800086A7F@mail.emea.novell.com> References: <5582DAE80200007800086A00@mail.emea.novell.com> <5582C7C2.9050702@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5a9E-0003sk-IG for xen-devel@lists.xenproject.org; Thu, 18 Jun 2015 13:46:28 +0000 In-Reply-To: <5582C7C2.9050702@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: Andrew Cooper Cc: xen-devel , Kevin Tian , Keir Fraser , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org >>> On 18.06.15 at 15:29, wrote: > On 18/06/15 13:51, Jan Beulich wrote: >> -void vlapic_handle_EOI_induced_exit(struct vlapic *vlapic, int vector) >> +void vlapic_handle_EOI(struct vlapic *vlapic, u8 vector) >> { >> + struct domain *d = vlapic_domain(vlapic); >> + >> if ( vlapic_test_and_clear_vector(vector, &vlapic->regs->data[APIC_TMR]) ) >> - vioapic_update_EOI(vlapic_domain(vlapic), vector); >> + vioapic_update_EOI(d, vector); >> >> - hvm_dpci_msi_eoi(current->domain, vector); >> + hvm_dpci_msi_eoi(d, vector); > > It might be worth retaining an ASSERT(current->domain == d) at this point. For one, there would be many more places where this should then be added. And then, even with the current (unpatched) code things would go wrong if that wasn't already the case. Jan