From: Kouya Shimura Subject: Re: [PATCH V2] passthrough: deliver IRQs even if VCPU#0 is halted Date: Fri, 10 Jul 2009 18:27:41 +0900 Message-ID: <7keisohoqa.fsf@pingu.sky.yk.fujitsu.co.jp> References: <7khbxlgi5o.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oRWbTR8U3B" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --oRWbTR8U3B Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Keir Fraser writes: > Just target the i8259_target, and don't bother with the MP efficiency > changes. Sure. Attached. kdump works fine with this patch. I was a little bit worried about i8259_target pointing the halted VCPU#0. Thanks, Kouya Signed-off-by: Kouya Shimura --oRWbTR8U3B Content-Type: text/x-patch Content-Disposition: inline; filename="kdump_passthru3.patch" Content-Transfer-Encoding: 7bit diff -r 20743a0a4ac5 xen/drivers/passthrough/io.c --- a/xen/drivers/passthrough/io.c Thu Jul 09 17:06:40 2009 +0100 +++ b/xen/drivers/passthrough/io.c Fri Jul 10 18:12:44 2009 +0900 @@ -378,7 +378,11 @@ int hvm_do_IRQ_dpci(struct domain *d, un if ( pt_irq_need_timer(dpci->mirq[mirq].flags) ) set_timer(&dpci->hvm_timer[domain_irq_to_vector(d, mirq)], NOW() + PT_IRQ_TIME_OUT); - vcpu_kick(d->vcpu[0]); + + if ( d->arch.hvm_domain.i8259_target != NULL ) + vcpu_kick(d->arch.hvm_domain.i8259_target); + else if ( d->vcpu != NULL ) + vcpu_kick(d->vcpu[0]); return 1; } @@ -437,7 +441,10 @@ void hvm_dirq_assist(struct vcpu *v) struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci; struct dev_intx_gsi_link *digl; - if ( !iommu_enabled || (v->vcpu_id != 0) || (hvm_irq_dpci == NULL) ) + if ( !iommu_enabled || (hvm_irq_dpci == NULL)) + return; + + if ( (v->vcpu_id != 0) && (v != d->arch.hvm_domain.i8259_target) ) return; for ( irq = find_first_bit(hvm_irq_dpci->dirq_mask, d->nr_pirqs); --oRWbTR8U3B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --oRWbTR8U3B--