# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213193906 -3600
# Node ID 54c6fc432763c12791f2a38bb3d8c82bf673b9bb
# Parent 7c771f0a24f37cbb3ab56db79f3a82106b42f4d8
AMD IOMMU: Enable MSI for hvm guest
Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
---
xen/arch/x86/hvm/svm/intr.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff -r 7c771f0a24f3 -r 54c6fc432763 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c Wed Jun 11 11:35:35 2008 +0100
+++ b/xen/arch/x86/hvm/svm/intr.c Wed Jun 11 15:18:26 2008 +0100
@@ -100,6 +100,12 @@ static void enable_intr_window(struct vc
vmcb->general1_intercepts |= GENERAL1_INTERCEPT_VINTR;
}
+extern int vmsi_deliver(struct domain *d, int pirq);
+static int hvm_pci_msi_assert(struct domain *d, int pirq)
+{
+ return vmsi_deliver(d, pirq);
+}
+
static void svm_dirq_assist(struct vcpu *v)
{
unsigned int irq;
@@ -118,7 +124,13 @@ static void svm_dirq_assist(struct vcpu
if ( !test_and_clear_bit(irq, &hvm_irq_dpci->dirq_mask) )
continue;
- stop_timer(&hvm_irq_dpci->hvm_timer[irq_to_vector(irq)]);
+ if ( test_bit(_HVM_IRQ_DPCI_MSI, &hvm_irq_dpci->mirq[irq].flags) )
+ {
+ hvm_pci_msi_assert(d, irq);
+ continue;
+ }
+
+ stop_timer(&hvm_irq_dpci->hvm_timer[domain_irq_to_vector(d, irq)]);
list_for_each_entry ( digl, &hvm_irq_dpci->mirq[irq].digl_list, list )
{
@@ -137,7 +149,7 @@ static void svm_dirq_assist(struct vcpu
* guest will never deal with the irq, then the physical interrupt line
* will never be deasserted.
*/
- set_timer(&hvm_irq_dpci->hvm_timer[irq_to_vector(irq)],
+ set_timer(&hvm_irq_dpci->hvm_timer[domain_irq_to_vector(d, irq)],
NOW() + PT_IRQ_TIME_OUT);
}
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|