Jan Beulich
2012-Sep-07 12:59 UTC
[PATCH] x86/hvm: don''t give vector callback higher priority than NMI/MCE
Those two should always be delivered first imo. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -395,16 +395,16 @@ struct hvm_intack hvm_vcpu_has_pending_i struct hvm_domain *plat = &v->domain->arch.hvm_domain; int vector; - if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) - && vcpu_info(v, evtchn_upcall_pending) ) - return hvm_intack_vector(plat->irq.callback_via.vector); - if ( unlikely(v->nmi_pending) ) return hvm_intack_nmi; if ( unlikely(v->mce_pending) ) return hvm_intack_mce; + if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) + && vcpu_info(v, evtchn_upcall_pending) ) + return hvm_intack_vector(plat->irq.callback_via.vector); + if ( vlapic_accept_pic_intr(v) && plat->vpic[0].int_output ) return hvm_intack_pic(0); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Keir Fraser
2012-Sep-07 14:47 UTC
Re: [PATCH] x86/hvm: don''t give vector callback higher priority than NMI/MCE
On 07/09/2012 13:59, "Jan Beulich" <JBeulich@suse.com> wrote:> Those two should always be delivered first imo. > > Signed-off-by: Jan Beulich <jbeulich@suse.com>Acked-by: Keir Fraser <keir@xen.org>> --- a/xen/arch/x86/hvm/irq.c > +++ b/xen/arch/x86/hvm/irq.c > @@ -395,16 +395,16 @@ struct hvm_intack hvm_vcpu_has_pending_i > struct hvm_domain *plat = &v->domain->arch.hvm_domain; > int vector; > > - if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) > - && vcpu_info(v, evtchn_upcall_pending) ) > - return hvm_intack_vector(plat->irq.callback_via.vector); > - > if ( unlikely(v->nmi_pending) ) > return hvm_intack_nmi; > > if ( unlikely(v->mce_pending) ) > return hvm_intack_mce; > > + if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) > + && vcpu_info(v, evtchn_upcall_pending) ) > + return hvm_intack_vector(plat->irq.callback_via.vector); > + > if ( vlapic_accept_pic_intr(v) && plat->vpic[0].int_output ) > return hvm_intack_pic(0); > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Stefano Stabellini
2012-Sep-10 13:49 UTC
Re: [PATCH] x86/hvm: don''t give vector callback higher priority than NMI/MCE
On Fri, 7 Sep 2012, Jan Beulich wrote:> Those two should always be delivered first imo. > > Signed-off-by: Jan Beulich <jbeulich@suse.com>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>> --- a/xen/arch/x86/hvm/irq.c > +++ b/xen/arch/x86/hvm/irq.c > @@ -395,16 +395,16 @@ struct hvm_intack hvm_vcpu_has_pending_i > struct hvm_domain *plat = &v->domain->arch.hvm_domain; > int vector; > > - if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) > - && vcpu_info(v, evtchn_upcall_pending) ) > - return hvm_intack_vector(plat->irq.callback_via.vector); > - > if ( unlikely(v->nmi_pending) ) > return hvm_intack_nmi; > > if ( unlikely(v->mce_pending) ) > return hvm_intack_mce; > > + if ( (plat->irq.callback_via_type == HVMIRQ_callback_vector) > + && vcpu_info(v, evtchn_upcall_pending) ) > + return hvm_intack_vector(plat->irq.callback_via.vector); > + > if ( vlapic_accept_pic_intr(v) && plat->vpic[0].int_output ) > return hvm_intack_pic(0); > > > > >