WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] MSI: Fix msi delivery for hvm guest

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] MSI: Fix msi delivery for hvm guest
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jun 2008 10:30:13 -0700
Delivery-date: Wed, 11 Jun 2008 10:30:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213193982 -3600
# Node ID 0331bfd8b5d2156571336aafc84129dae98d0f91
# Parent  54c6fc432763c12791f2a38bb3d8c82bf673b9bb
MSI: Fix msi delivery for hvm guest

Some parameters like "dest_mode",  "delivery_mode" and "trig_mode"
seem to have been miscalculated before delivering MSI interrupt into
hvm passthru guest. This will cause guest driver to roll back to
legacy interrupt mode.

Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
---
 xen/arch/x86/hvm/vmsi.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff -r 54c6fc432763 -r 0331bfd8b5d2 xen/arch/x86/hvm/vmsi.c
--- a/xen/arch/x86/hvm/vmsi.c   Wed Jun 11 15:18:26 2008 +0100
+++ b/xen/arch/x86/hvm/vmsi.c   Wed Jun 11 15:19:42 2008 +0100
@@ -110,15 +110,21 @@ static void vmsi_inj_irq(
 #define VMSI_DELIV_MASK   0x7000
 #define VMSI_TRIG_MODE    0x8000
 
+#define GFLAGS_SHIFT_DEST_ID        0
+#define GFLAGS_SHIFT_RH             8
+#define GFLAGS_SHIFT_DM             9
+#define GLFAGS_SHIFT_DELIV_MODE     12
+#define GLFAGS_SHIFT_TRG_MODE       15
+
 int vmsi_deliver(struct domain *d, int pirq)
 {
     struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci;
     uint32_t flags = hvm_irq_dpci->mirq[pirq].gmsi.gflags;
     int vector = hvm_irq_dpci->mirq[pirq].gmsi.gvec;
-    uint16_t dest = flags & VMSI_DEST_ID_MASK;
-    uint8_t dest_mode = flags & VMSI_DM_MASK;
-    uint8_t delivery_mode = flags & VMSI_DELIV_MASK;
-    uint8_t trig_mode = flags & VMSI_TRIG_MODE;
+    uint16_t dest = (flags & VMSI_DEST_ID_MASK) >> GFLAGS_SHIFT_DEST_ID;
+    uint8_t dest_mode = (flags & VMSI_DM_MASK) >> GFLAGS_SHIFT_DM;
+    uint8_t delivery_mode = (flags & VMSI_DELIV_MASK) >> 
GLFAGS_SHIFT_DELIV_MODE;
+    uint8_t trig_mode = (flags & VMSI_TRIG_MODE) >> GLFAGS_SHIFT_TRG_MODE;
     uint32_t deliver_bitmask;
     struct vlapic *target;
     struct vcpu *v;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] MSI: Fix msi delivery for hvm guest, Xen patchbot-unstable <=