All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 5/4] pci-assign: Use PCI-2.3-based shared legacy interrupts by default
Date: Wed, 3 Nov 2010 11:11:38 +0200	[thread overview]
Message-ID: <20101103091138.GI6772@redhat.com> (raw)
In-Reply-To: <4CD120E9.7050306@web.de>

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@siemens.com>
> >>
> >> 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@siemens.com>
> >> ---
> >>  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

  parent reply	other threads:[~2010-11-03  9:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 14:55 [PATCH 0/4] qemu-kvm: Fixes and improvements for device assigment Jan Kiszka
2010-11-02 14:55 ` [PATCH 1/4] pci-assign: Convert iommu property to booleam Jan Kiszka
2010-11-02 14:55 ` [PATCH 2/4] pci-assign: Allow to disable MSI perference for host IRQ Jan Kiszka
2010-11-03 12:54   ` Markus Armbruster
2010-11-02 14:55 ` [PATCH 3/4] pci-assign: Issue warning when running w/o IOMMU Jan Kiszka
2010-11-02 14:55 ` [PATCH 4/4] pci-assign: Remove broken -pcidevice and pci_add host Jan Kiszka
2010-11-03 13:02   ` Markus Armbruster
2010-11-03 13:12     ` Jan Kiszka
2010-11-03 15:22       ` Markus Armbruster
     [not found] ` <4CD119D6.2050602@web.de>
     [not found]   ` <20101103083321.GE6772@redhat.com>
     [not found]     ` <4CD120E9.7050306@web.de>
2010-11-03  9:11       ` Michael S. Tsirkin [this message]
2010-11-03 20:03 ` [PATCH 0/4] qemu-kvm: Fixes and improvements for device assigment Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101103091138.GI6772@redhat.com \
    --to=mst@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.