[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] MSI: Fix msi delivery for hvm guest
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |