* [patch 0/2] small fixes for PCI devices in mptable @ 2011-05-07 14:55 Cyrill Gorcunov 2011-05-07 14:55 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov 2011-05-07 14:55 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices Cyrill Gorcunov 0 siblings, 2 replies; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 14:55 UTC (permalink / raw) To: penberg, mingo; +Cc: levinsasha928, asias.hejun, prasadjoshi124, kvm Please review. Thanks, Cyrill ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 14:55 [patch 0/2] small fixes for PCI devices in mptable Cyrill Gorcunov @ 2011-05-07 14:55 ` Cyrill Gorcunov 2011-05-07 15:03 ` Ingo Molnar 2011-05-07 15:05 ` Pekka Enberg 2011-05-07 14:55 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices Cyrill Gorcunov 1 sibling, 2 replies; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 14:55 UTC (permalink / raw) To: penberg, mingo Cc: levinsasha928, asias.hejun, prasadjoshi124, kvm, Cyrill Gorcunov [-- Attachment #1: kvm-tools-irq-pins --] [-- Type: text/plain, Size: 1051 bytes --] Only 4 pins are allowed for every PCI compilant device. Mutlifunctional devices can use up to all INTA#,B#,C#,D# pins, for our sindle function devices pin INTA# is enough. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- tools/kvm/irq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: linux-2.6.git/tools/kvm/irq.c ===================================================================== --- linux-2.6.git.orig/tools/kvm/irq.c +++ linux-2.6.git/tools/kvm/irq.c @@ -7,7 +7,6 @@ #include <stddef.h> #include <stdlib.h> -static u8 next_pin = 1; static u8 next_line = 3; static u8 next_dev = 1; static struct rb_root pci_tree = RB_ROOT; @@ -71,7 +70,13 @@ int irq__register_device(u32 dev, u8 *nu *node = (struct pci_dev) { .id = dev, - .pin = next_pin++, + /* + * PCI supports only INTA#,B#,C#,D# per device. + * B#,C#,D# are allowed for multifunctional + * devices so stick with INTA# for our single + * function devices. + */ + .pin = 1, }; INIT_LIST_HEAD(&node->lines); ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 14:55 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov @ 2011-05-07 15:03 ` Ingo Molnar 2011-05-07 15:07 ` Cyrill Gorcunov 2011-05-07 15:07 ` Ingo Molnar 2011-05-07 15:05 ` Pekka Enberg 1 sibling, 2 replies; 11+ messages in thread From: Ingo Molnar @ 2011-05-07 15:03 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: penberg, levinsasha928, asias.hejun, prasadjoshi124, kvm * Cyrill Gorcunov <gorcunov@gmail.com> wrote: > Only 4 pins are allowed for every PCI compilant device. Mutlifunctional > devices can use up to all INTA#,B#,C#,D# pins, for our sindle function > devices pin INTA# is enough. There's two typos in this changelog ... Thanks, Ingo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 15:03 ` Ingo Molnar @ 2011-05-07 15:07 ` Cyrill Gorcunov 2011-05-07 15:08 ` Ingo Molnar 2011-05-07 15:07 ` Ingo Molnar 1 sibling, 1 reply; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 15:07 UTC (permalink / raw) To: Ingo Molnar; +Cc: penberg, levinsasha928, asias.hejun, prasadjoshi124, kvm On 05/07/2011 07:03 PM, Ingo Molnar wrote: > > * Cyrill Gorcunov <gorcunov@gmail.com> wrote: > >> Only 4 pins are allowed for every PCI compilant device. Mutlifunctional >> devices can use up to all INTA#,B#,C#,D# pins, for our sindle function >> devices pin INTA# is enough. > > There's two typos in this changelog ... > > Thanks, > > Ingo Ouch, I've fixed 'sindle', but missed 'compilant', thanks Ingo! Pekka if you pick them (second series), could you s/compilant/compliant/ please? -- Thanks, Cyrill ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 15:07 ` Cyrill Gorcunov @ 2011-05-07 15:08 ` Ingo Molnar 2011-05-07 15:10 ` Cyrill Gorcunov 0 siblings, 1 reply; 11+ messages in thread From: Ingo Molnar @ 2011-05-07 15:08 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: penberg, levinsasha928, asias.hejun, prasadjoshi124, kvm * Cyrill Gorcunov <gorcunov@gmail.com> wrote: > On 05/07/2011 07:03 PM, Ingo Molnar wrote: > > > > * Cyrill Gorcunov <gorcunov@gmail.com> wrote: > > > >> Only 4 pins are allowed for every PCI compilant device. Mutlifunctional > >> devices can use up to all INTA#,B#,C#,D# pins, for our sindle function > >> devices pin INTA# is enough. > > > > There's two typos in this changelog ... > > > > Thanks, > > > > Ingo > > Ouch, I've fixed 'sindle', but missed 'compilant', thanks Ingo! > > Pekka if you pick them (second series), could you s/compilant/compliant/ > please? There's a third typo as well: s/Mutlifunctional/Multifunctional. Thanks, Ingo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 15:08 ` Ingo Molnar @ 2011-05-07 15:10 ` Cyrill Gorcunov 0 siblings, 0 replies; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 15:10 UTC (permalink / raw) To: Ingo Molnar; +Cc: penberg, levinsasha928, asias.hejun, prasadjoshi124, kvm On 05/07/2011 07:08 PM, Ingo Molnar wrote: .. > > There's a third typo as well: s/Mutlifunctional/Multifunctional. > > Thanks, > > Ingo Sigh, thanks Ingo. -- Thanks, Cyrill ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 15:03 ` Ingo Molnar 2011-05-07 15:07 ` Cyrill Gorcunov @ 2011-05-07 15:07 ` Ingo Molnar 1 sibling, 0 replies; 11+ messages in thread From: Ingo Molnar @ 2011-05-07 15:07 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: penberg, levinsasha928, asias.hejun, prasadjoshi124, kvm * Ingo Molnar <mingo@elte.hu> wrote: > > * Cyrill Gorcunov <gorcunov@gmail.com> wrote: > > > Only 4 pins are allowed for every PCI compilant device. Mutlifunctional > > devices can use up to all INTA#,B#,C#,D# pins, for our sindle function > > devices pin INTA# is enough. > > There's two typos in this changelog ... Three in fact. Thanks, Ingo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 14:55 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov 2011-05-07 15:03 ` Ingo Molnar @ 2011-05-07 15:05 ` Pekka Enberg 2011-05-07 15:09 ` Cyrill Gorcunov 1 sibling, 1 reply; 11+ messages in thread From: Pekka Enberg @ 2011-05-07 15:05 UTC (permalink / raw) To: Cyrill Gorcunov; +Cc: mingo, levinsasha928, asias.hejun, prasadjoshi124, kvm On Sat, May 7, 2011 at 5:55 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote: > Only 4 pins are allowed for every PCI compilant device. Mutlifunctional > devices can use up to all INTA#,B#,C#,D# pins, for our sindle function > devices pin INTA# is enough. > > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Could you point me to the relevant specification and section that I can use to double-check this patch (and include it in the changelog)? ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification 2011-05-07 15:05 ` Pekka Enberg @ 2011-05-07 15:09 ` Cyrill Gorcunov 0 siblings, 0 replies; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 15:09 UTC (permalink / raw) To: Pekka Enberg; +Cc: mingo, levinsasha928, asias.hejun, prasadjoshi124, kvm On 05/07/2011 07:05 PM, Pekka Enberg wrote: > On Sat, May 7, 2011 at 5:55 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote: >> Only 4 pins are allowed for every PCI compilant device. Mutlifunctional >> devices can use up to all INTA#,B#,C#,D# pins, for our sindle function >> devices pin INTA# is enough. >> >> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> > > Could you point me to the relevant specification and section that I > can use to double-check this patch (and include it in the changelog)? PCI spec 2.2, 2.2.6 Interrupt Pins (Optional) -- Thanks, Cyrill ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices 2011-05-07 14:55 [patch 0/2] small fixes for PCI devices in mptable Cyrill Gorcunov 2011-05-07 14:55 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov @ 2011-05-07 14:55 ` Cyrill Gorcunov 2011-05-07 14:59 ` Cyrill Gorcunov 1 sibling, 1 reply; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 14:55 UTC (permalink / raw) To: penberg, mingo Cc: levinsasha928, asias.hejun, prasadjoshi124, kvm, Cyrill Gorcunov [-- Attachment #1: kvm-tools-fix-srcbusirq --] [-- Type: text/plain, Size: 1233 bytes --] 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@gmail.com> --- 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++; } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices 2011-05-07 14:55 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices Cyrill Gorcunov @ 2011-05-07 14:59 ` Cyrill Gorcunov 0 siblings, 0 replies; 11+ messages in thread From: Cyrill Gorcunov @ 2011-05-07 14:59 UTC (permalink / raw) To: penberg Cc: Cyrill Gorcunov, mingo, levinsasha928, asias.hejun, prasadjoshi124, kvm 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@gmail.com> > --- > 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-05-07 15:10 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-05-07 14:55 [patch 0/2] small fixes for PCI devices in mptable Cyrill Gorcunov 2011-05-07 14:55 ` [patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification Cyrill Gorcunov 2011-05-07 15:03 ` Ingo Molnar 2011-05-07 15:07 ` Cyrill Gorcunov 2011-05-07 15:08 ` Ingo Molnar 2011-05-07 15:10 ` Cyrill Gorcunov 2011-05-07 15:07 ` Ingo Molnar 2011-05-07 15:05 ` Pekka Enberg 2011-05-07 15:09 ` Cyrill Gorcunov 2011-05-07 14:55 ` [patch 2/2] kvm tools: mptable -- Fix up srcbusirq assignment for PCI devices Cyrill Gorcunov 2011-05-07 14:59 ` Cyrill Gorcunov
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.