public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCHv2] qemu-kvm: enable msi with irqchip
Date: Sun, 05 Jul 2009 18:13:02 +0300	[thread overview]
Message-ID: <4A50C2FE.6060501@redhat.com> (raw)
In-Reply-To: <20090705130425.GA5451@redhat.com>

On 07/05/2009 04:04 PM, Michael S. Tsirkin wrote:
> Support msi-x with irqchip in kernel: allocate entries
> when they are used, and update when they are unmasked.
>
>
>   /* Declaration from linux/pci_regs.h */
>   #define  PCI_CAP_ID_MSIX 0x11 /* MSI-X */
> @@ -109,6 +110,18 @@ static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries,
>   static void msix_free_irq_entries(PCIDevice *dev)
>   {
>       int vector;
> +    if (kvm_enabled()&&  qemu_kvm_irqchip_in_kernel()) {
> +        int changed = 0;
> +        for (vector = 0; vector<  dev->msix_entries_nr; ++vector) {
> +            if (dev->msix_entry_used[vector]) {
> +                kvm_del_routing_entry(kvm_context,&dev->msix_irq_entries[vector]);
> +                changed = 1;
> +            }
> +        }
> +        if (changed) {
> +            kvm_commit_irq_routes(kvm_context);
> +        }
> +    }
>    

Please move this into a helper.  Ditto all the code hunks in msix functions.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2009-07-05 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-05 13:04 [PATCHv2] qemu-kvm: enable msi with irqchip Michael S. Tsirkin
2009-07-05 15:13 ` Avi Kivity [this message]

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=4A50C2FE.6060501@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox