Re: [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices

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

 



On 05/07/2011 06:55 PM, Cyrill Gorcunov wrote:
> The kernel expects srcbusirq follows MP specification and consists
> a tuple of PCI device number with pin encoded. Make it so, otherwise
> the kernel reports kind of "buggy MP table" found.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
> ---
>  tools/kvm/mptable.c |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6.git/tools/kvm/mptable.c
> =====================================================================
> --- linux-2.6.git.orig/tools/kvm/mptable.c
> +++ linux-2.6.git/tools/kvm/mptable.c
> @@ -191,12 +191,16 @@ void mptable_setup(struct kvm *kvm, unsi
>  
>  	for (pci_tree = irq__get_pci_tree(); pci_tree; pci_tree = rb_next(pci_tree)) {
>  		struct pci_dev *dev = rb_entry(pci_tree, struct pci_dev, node);
> -		struct irq_line *tmp;
> +		struct irq_line *irq_line;
> +
> +		list_for_each_entry(irq_line, &dev->lines, node) {
> +			unsigned char srcbusirq;
> +
> +			srcbusirq = (dev->id << 2) | (dev->pin - 1);
>  
> -		list_for_each_entry(tmp, &dev->lines, node) {
>  			mpc_intsrc = last_addr;
>  
> -			mptable_add_irq_src(mpc_intsrc, pcibusid, dev->pin, ioapicid, tmp->line);
> +			mptable_add_irq_src(mpc_intsrc, pcibusid, dev->pin, ioapicid, irq_line->line);
>  			last_addr = (void *)&mpc_intsrc[1];
>  			nentries++;
>  		}
> 

Crap, forgot to update quilt. Pekka drop this series please.

-- 
Thanks,
  Cyrill
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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