Re: [PATCH 5/4] pci-assign: Use PCI-2.3-based shared legacy interrupts by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 03, 2010 at 09:44:25AM +0100, Jan Kiszka wrote:
> Am 03.11.2010 09:33, Michael S. Tsirkin wrote:
> > On Wed, Nov 03, 2010 at 09:14:14AM +0100, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> >>
> >> Make use of the new KVM feature that allows legacy interrupt sharing
> >> for PCI-2.3-compliant devices. Exclusive mode (with IRQ masking at
> >> interrupt controller level) can be re-enabled via disabling the
> >> property "pci_2_3".
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> >> ---
> >>  hw/device-assignment.c |    7 +++++++
> >>  hw/device-assignment.h |    2 ++
> >>  2 files changed, 9 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/hw/device-assignment.c b/hw/device-assignment.c
> >> index 0bbf9d9..5c7e958 100644
> >> --- a/hw/device-assignment.c
> >> +++ b/hw/device-assignment.c
> >> @@ -970,6 +970,11 @@ static int assign_irq(AssignedDevice *dev)
> >>      }
> >>  
> >>      assigned_irq_data.flags = KVM_DEV_IRQ_GUEST_INTX;
> >> +#ifdef KVM_CAP_PCI_2_3
> >> +    if (dev->features & ASSIGNED_DEVICE_USE_PCI_2_3_MASK) {
> >> +        assigned_irq_data.flags |= KVM_DEV_IRQ_PCI_2_3;
> >> +    }
> >> +#endif /* KVM_CAP_PCI_2_3 */
> >>      if (dev->features & ASSIGNED_DEVICE_PREFER_MSI_MASK &&
> >>          dev->cap.available & ASSIGNED_DEVICE_CAP_MSI)
> >>          assigned_irq_data.flags |= KVM_DEV_IRQ_HOST_MSI;
> >> @@ -1550,6 +1555,8 @@ static PCIDeviceInfo assign_info = {
> >>          DEFINE_PROP_STRING("configfd", AssignedDevice, configfd_name),
> >>          DEFINE_PROP_BIT("prefer_msi", AssignedDevice, features,
> >>                          ASSIGNED_DEVICE_PREFER_MSI_BIT, true),
> >> +        DEFINE_PROP_BIT("pci_2_3", AssignedDevice, features,
> >> +                        ASSIGNED_DEVICE_USE_PCI_2_3_BIT, true),
> > 
> > I'd prefer some other name that hints this is a kvm feature.
> > Reason is, we might want to have pci_2_3 to mean that
> > INTx is supported *on the guest side*.
> 
> I did not get that use case yet, but I could call it "host_pci_2_3" if
> preferred. Or provide a better name.
> 
> Jan
> 

Sounds good.

-- 
MST
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux