2015-03-16 19:30-0600, James Sullivan: > In kvm_set_msi_irq(), the RH bit is currently ignored for > determining the destination mode of the MSI delivery, and only the > DM bit is used. Corrected this so that dest_mode is APIC_DEST_LOGICAL > only when RH=1/DM=1, and APIC_DEST_PHYSICAL otherwise. > > Extended struct kvm_lapic_irq with bool msi_redir_hint, which will > be used to determine if the delivery of the MSI should target only > the lowest priority CPU in the logical group specified for delivery. > (In physical dest mode, the RH bit is not relevant). Initialized the value > of msi_redir_hint to true when RH=1 in kvm_set_msi_irq(), and initialized > to false in all other cases. > > Added value of msi_redir_hint to a debug message dump of an IRQ in > apic_send_ipi(). > > Signed-off-by: James Sullivan <sullivan.james.f@xxxxxxxxx> > --- Reviewed-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> Thanks. --- Btw. I often have comments ... if they are in parentheses, I have a different opinion on some choice and would like to know why you chose a that variant instead, because I might be missing something; there is no need to send new revision or even answer them. > diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c > @@ -103,12 +103,17 @@ static inline void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e, > + irq->msi_redir_hint = ((e->msi.address_lo > + & MSI_ADDR_REDIRECTION_LOWPRI) > 0); (- two extra tabs, or alignment, help to distinguish a continued line from indented next line - outer parentheses are useless - '!= 0' saves thinking about negative values - it would fit on one line if we didn't map to {0,1} explicitly; KVM style prefers explicit, though ...) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html