From: "Marc Marí" <marc.mari.barcelo@gmail.com>
To: "Marc Marí" <marc.mari.barcelo@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 6/7] libqos: Added MSI-X support
Date: Mon, 18 Aug 2014 19:46:44 +0200 [thread overview]
Message-ID: <20140818194644.308c3f25@crunchbang> (raw)
In-Reply-To: <1408365973-15498-7-git-send-email-marc.mari.barcelo@gmail.com>
>El Mon, 18 Aug 2014 14:46:11 +0200
>Marc Marí <marc.mari.barcelo@gmail.com> escribió:
> +void qpci_msix_enable(QPCIDevice *dev)
> +{
> + uint8_t addr;
> + uint16_t val;
> + uint32_t table;
> + uint8_t bir_table;
> + uint8_t bir_pba;
> + void *offset;
> +
> + addr = qpci_find_capability(dev, PCI_CAP_ID_MSIX);
> + g_assert_cmphex(addr, !=, 0);
> +
> + val = qpci_config_readw(dev, addr + PCI_MSIX_FLAGS);
> + qpci_config_writew(dev, addr + PCI_MSIX_FLAGS, val |
> PCI_MSIX_FLAGS_ENABLE); +
> + table = qpci_config_readl(dev, addr + PCI_MSIX_TABLE);
> + bir_table = table & PCI_MSIX_FLAGS_BIRMASK;
> + offset = qpci_iomap(dev, bir_table);
> + dev->msix_table = offset + (table & ~PCI_MSIX_FLAGS_BIRMASK);
> +
> + table = qpci_config_readl(dev, addr+PCI_MSIX_PBA);
> + bir_pba = table & PCI_MSIX_FLAGS_BIRMASK;
> + if (bir_pba != bir_table) {
> + offset = qpci_iomap(dev, bir_pba);
qpci_iomap changed its prototype in one of the lastest pull requests.
Both qpci_iomap should have a NULL as third parameter. Will change in
next version.
Marc
next prev parent reply other threads:[~2014-08-18 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 12:46 [Qemu-devel] [PATCH v5 0/7] Virtio PCI libqos driver Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 1/7] tests: Functions bus_foreach and device_find from libqos virtio API Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 2/7] tests: Add virtio device initialization Marc Marí
2014-08-18 17:47 ` Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 3/7] libqos: Added basic virtqueue support to virtio implementation Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 4/7] libqos: Added indirect descriptor " Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 5/7] libqos: Added test case for configuration changes in virtio-blk test Marc Marí
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 6/7] libqos: Added MSI-X support Marc Marí
2014-08-18 17:46 ` Marc Marí [this message]
2014-08-18 12:46 ` [Qemu-devel] [PATCH v5 7/7] libqos: Added EVENT_IDX support Marc Marí
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=20140818194644.308c3f25@crunchbang \
--to=marc.mari.barcelo@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).