Re: [PATCH kvmtool 1/2] kvm tools: fix initialization of irq mptable

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

 



Hi,

Forgot to add, would you mind rewording the commit subject to:

x86: Fix initialization of irq mptable

Thanks,
Alex

On Wed, Feb 16, 2022 at 10:59:36AM +0000, Alexandru Elisei wrote:
> Hi,
> 
> On Wed, Feb 16, 2022 at 12:38:33PM +0800, Muchun Song wrote:
> > When dev_hdr->dev_num is greater one, the initialization of last_addr
> > is wrong.  Fix it.
> > 
> > Fixes: f83cd16 ("kvm tools: irq: replace the x86 irq rbtree with the PCI device tree")
> > Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> > ---
> >  x86/mptable.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/x86/mptable.c b/x86/mptable.c
> > index a984de9..f13cf0f 100644
> > --- a/x86/mptable.c
> > +++ b/x86/mptable.c
> > @@ -184,7 +184,7 @@ int mptable__init(struct kvm *kvm)
> >  		mpc_intsrc = last_addr;
> >  		mptable_add_irq_src(mpc_intsrc, pcibusid, srcbusirq, ioapicid, pci_hdr->irq_line);
> >  
> > -		last_addr = (void *)&mpc_intsrc[dev_hdr->dev_num];
> > +		last_addr = (void *)&mpc_intsrc[1];
> 
> This looks correct to me. I think there was a copy-and-paste error from the
> device loop above where the interrupt lines were added to mpc_intsrc.
> 
> Reviewed-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
> 
> Thanks,
> Alex
> 
> >  		nentries++;
> >  		dev_hdr = device__next_dev(dev_hdr);
> >  	}
> > -- 
> > 2.11.0
> > 



[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