>> MSI_DATA_TRIGGER_SHIFT;
uint8_t vector = data & MSI_DATA_VECTOR_MASK;
+ if ( !vector )
+ {
+ int pirq = ((addr >> 32) & 0xffffff00) | ((addr >> 12) & 0xff);
+ if ( pirq > 0 )
+ {
+ struct pirq *info = pirq_info(d, pirq);
+
+ /* if it is the first time, allocate the pirq */
+ if (info->arch.hvm.emuirq == IRQ_UNBOUND)
+ {
+ spin_lock(&d->event_lock);
+ map_domain_emuirq_pirq(d, pirq, IRQ_MSI_EMU);
+ spin_unlock(&d->event_lock);
+ } else if (info->arch.hvm.emuirq != IRQ_MSI_EMU)
+ {
+ printk("%s: pirq %d does not correspond to an emulated MSI\n", __func__, pirq);
+ return;
+ }
+ send_guest_pirq(d, info);
+ return;
+ } else {
+ printk("%s: error getting pirq from MSI: pirq = %d\n", __func__, pirq);
+ }
+ }
+
vmsi_deliver(d, vector, dest, dest_mode, delivery_mode, trig_mode);
}