[PATCH] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-09 Thread James Sullivan
Hi folks, This is a small patch that implements logic to handle the RH bit being set in the msi message address register. Currently the DM bit is the only thing used to decide irq->dest_mode (logical when DM set, physical when unset). Documentation indicates that the DM bit will be ignored when th

Re: [PATCH] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-10 Thread Radim Krčmář
2015-03-09 23:05-0600, James Sullivan: > Hi folks, > > This is a small patch that implements logic to handle the RH bit > being set in the msi message address register. Currently the DM bit is > the only thing used to decide irq->dest_mode (logical when DM set, > physical when unset). Documentatio

Re: [PATCH] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-10 Thread James Sullivan
On 03/10/2015 08:47 AM, Radim Krčmář wrote: ... >> +/* >> + * Set dest_mode to logical just in case both the RH and DM >> + * bits are set, otherwise default to physical. >> + */ >> +phys = ((e->msi.address_lo & (MSI_ADDR_REDIRECTION_LOWPRI | >> +MSI_ADDR_DES

Re: [PATCH] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-11 Thread Radim Krčmář
2015-03-10 16:39-0600, James Sullivan: > On 03/10/2015 08:47 AM, Radim Krčmář wrote: > >> + irq->dest_mode = phys ? 0 : (MSI_ADDR_DEST_MODE_LOGICAL); > > > > (Should be APIC_DEST_LOGICAL. All works because it is a boolean and we > > only checked for APIC_DEST_PHYSICAL, which is 0.) > > > > Th

Re: [PATCH] x86: irq_comm: Add check for RH bit in kvm_set_msi_irq

2015-03-11 Thread James Sullivan
On 03/11/2015 07:43 AM, Radim Krčmář wrote: > 2015-03-10 16:39-0600, James Sullivan: >> On 03/10/2015 08:47 AM, Radim Krčmář wrote: + irq->dest_mode = phys ? 0 : (MSI_ADDR_DEST_MODE_LOGICAL); >>> >>> (Should be APIC_DEST_LOGICAL. All works because it is a boolean and we >>> only checked for