[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 07/14] msi: implemented msi.
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH 07/14] msi: implemented msi. |
Date: |
Wed, 8 Sep 2010 10:51:54 +0300 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Wed, Sep 08, 2010 at 04:43:27PM +0900, Isaku Yamahata wrote:
> Thank you for through review.
>
> On Mon, Sep 06, 2010 at 12:44:16PM +0300, Michael S. Tsirkin wrote:
> > > + uint32_t pending =
> > > + pci_get_long(dev->config + msi_pending_reg(dev, is64bit));
> > > + uint8_t vector;
> > > +
> > > + /* deliver pending interrupts which are unmasked */
> > > + for (vector = 0; vector < nr_vector; ++vector) {
> > > + if (msi_is_masked(dev, vector) || !msi_test_bit(pending,
> > > vector)) {
> >
> > I am confused. This is called after mask is updated, right?
> > So msi_is_masked means vector was masked, not unmasked?
> > I think the logic is reversed here.
>
> I suppose you were missing the following continue.
>
>
> > > + continue;
> ^^^^^^^^^ Here
I see. You are right. The block is small enough to maybe make it worthwhile
to revert the logic and avoid continue. It's up to you though,
there's no bug here.
> > > + }
> > > +
> > > + msi_clear_bit(&pending, vector);
> > > + pci_set_long(dev->config + msi_pending_reg(dev, is64bit),
> > > pending);
> > > + msi_notify(dev, vector);
> > > + }
> > > + }
> > > +}
> > > +
> > > +uint8_t msi_nr_allocated_vector(const PCIDevice *dev)
>
> --
> yamahata
- Re: [Qemu-devel] Re: [PATCH 01/14] RESEND apb: fix typo., (continued)
- [Qemu-devel] [PATCH 10/14] pcie root port: implement pcie root port., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 04/14] pci: call hotplug callback even when not hotplug case for later use., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 06/14] pci_ids.h: add vendor id of Texus Intesruments., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 14/14] pcie/aer: glue aer error injection into qemu monitor., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 03/14] pci bridge: add helper function for ssvid capability., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 05/14] pci: make pci_parse_devfn() aware of func., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 07/14] msi: implemented msi., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 13/14] pcie/hotplug: glue pushing attention button command. pcie_abp, Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 02/14] pci: consolidate pci_add_capability_at_offset() into pci_add_capability()., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 11/14] pcie upstream port: pci express switch upstream port., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 12/14] pcie downstream port: pci express switch downstream port., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 08/14] pcie: helper functions for pcie extended capability., Isaku Yamahata, 2010/09/06
- [Qemu-devel] [PATCH 09/14] pcie port: define struct PCIEPort/PCIESlot and helper functions, Isaku Yamahata, 2010/09/06
- [Qemu-devel] Re: [PATCH 00/14] pcie port switch emulators, Wei Xu, 2010/09/06
- [Qemu-devel] Re: [PATCH 00/14] pcie port switch emulators, Michael S. Tsirkin, 2010/09/07