From: "Jan Beulich" Subject: Re: [PATCH 3/7] Nested VMX: Force check ISR when L2 is running Date: Fri, 09 Aug 2013 13:12:14 +0100 Message-ID: <5204F8BE02000078000EAB3A@nat28.tlf.novell.com> References: <1376038175-18571-1-git-send-email-yang.z.zhang@intel.com> <1376038175-18571-4-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1V7lYT-000893-96 for xen-devel@lists.xenproject.org; Fri, 09 Aug 2013 12:12:29 +0000 In-Reply-To: <1376038175-18571-4-git-send-email-yang.z.zhang@intel.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: Yang Zhang Cc: xen-devel , keir.xen@gmail.com List-Id: xen-devel@lists.xenproject.org >>> On 09.08.13 at 10:49, Yang Zhang wrote: > From: Yang Zhang > > If L2 is running, external interrupt is allowed to notify CPU only > when it has higher priority than current in servicing interrupt. That's always this way, not just for nested HVM. Hence there must either be some piece missing from this explanation, or the check is being inserted in the wrong place. Jan > Since > there is no vAPIC-v for L2, so force check isr when L2 is running. > > Signed-off-by: Yang Zhang > --- > xen/arch/x86/hvm/vlapic.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c > index 20a36a0..f2594dd 100644 > --- a/xen/arch/x86/hvm/vlapic.c > +++ b/xen/arch/x86/hvm/vlapic.c > @@ -37,6 +37,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -1037,7 +1038,8 @@ int vlapic_has_pending_irq(struct vcpu *v) > if ( irr == -1 ) > return -1; > > - if ( vlapic_virtual_intr_delivery_enabled() ) > + if ( vlapic_virtual_intr_delivery_enabled() && > + !nestedhvm_vcpu_in_guestmode(v) ) > return irr; > > isr = vlapic_find_highest_isr(vlapic); > -- > 1.7.1