From: Kouya Shimura Subject: [PATCH 2/2] passthrough: deliver IRQs even if bsp is halted (support kexec/kdump on hvm) Date: Tue, 30 Jun 2009 15:57:18 +0900 Message-ID: <7kocs6nr8x.fsf@pingu.sky.yk.fujitsu.co.jp> References: <7kr5x2nrcd.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bv0LhRfW+A" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7kr5x2nrcd.fsf@pingu.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --bv0LhRfW+A Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit This patch is needed for kexec/kdump on hvm since kdump halts bsp. Signed-off-by: Kouya Shimura --bv0LhRfW+A Content-Type: text/x-patch Content-Disposition: inline; filename="kdump2.patch" Content-Transfer-Encoding: 7bit diff -r 7397608bce87 xen/drivers/passthrough/io.c --- a/xen/drivers/passthrough/io.c Mon Jun 29 15:50:32 2009 +0100 +++ b/xen/drivers/passthrough/io.c Tue Jun 30 13:16:26 2009 +0900 @@ -362,6 +362,7 @@ int pt_irq_destroy_bind_vtd( int hvm_do_IRQ_dpci(struct domain *d, unsigned int mirq) { struct hvm_irq_dpci *dpci = domain_get_irq_dpci(d); + struct vcpu *v; ASSERT(spin_is_locked(&irq_desc[domain_irq_to_vector(d, mirq)].lock)); if ( !iommu_enabled || (d == dom0) || !dpci || @@ -378,7 +379,13 @@ 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]); + + for_each_vcpu(d, v) + if ( !test_bit(_VPF_down, &v->pause_flags) ) + { + vcpu_kick(v); + break; + } return 1; } @@ -437,7 +444,7 @@ 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; for ( irq = find_first_bit(hvm_irq_dpci->dirq_mask, d->nr_pirqs); --bv0LhRfW+A 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 --bv0LhRfW+A--