Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2009 at 10:35:55PM +0200, Gleb Natapov wrote: > On Wed, Dec 23, 2009 at 03:26:55PM -0500, Kevin O'Connor wrote: > > BTW, this is only intended for PCI bus zero entries, right? (In > > theory, one could map a card with a bridge into kvm..) > > > Mptable should have description for

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Gleb Natapov
On Wed, Dec 23, 2009 at 03:26:55PM -0500, Kevin O'Connor wrote: > On Wed, Dec 23, 2009 at 09:56:23PM +0200, Gleb Natapov wrote: > > On Wed, Dec 23, 2009 at 02:48:24PM -0500, Kevin O'Connor wrote: > > > On Wed, Dec 23, 2009 at 08:45:07PM +0200, Gleb Natapov wrote: > > > > On Wed, Dec 23, 2009 at 01:

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2009 at 09:56:23PM +0200, Gleb Natapov wrote: > On Wed, Dec 23, 2009 at 02:48:24PM -0500, Kevin O'Connor wrote: > > On Wed, Dec 23, 2009 at 08:45:07PM +0200, Gleb Natapov wrote: > > > On Wed, Dec 23, 2009 at 01:11:43PM -0500, Kevin O'Connor wrote: > > > > Why only increase the alloc

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Gleb Natapov
On Wed, Dec 23, 2009 at 02:48:24PM -0500, Kevin O'Connor wrote: > On Wed, Dec 23, 2009 at 08:45:07PM +0200, Gleb Natapov wrote: > > On Wed, Dec 23, 2009 at 01:11:43PM -0500, Kevin O'Connor wrote: > > > Why only increase the allocated storage for intsrc by 16? The loop > > > above seems like it cou

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2009 at 08:45:07PM +0200, Gleb Natapov wrote: > On Wed, Dec 23, 2009 at 01:11:43PM -0500, Kevin O'Connor wrote: > > Why only increase the allocated storage for intsrc by 16? The loop > > above seems like it could add a large number of entries. > > > Unfortunately we have to alloca

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Gleb Natapov
On Wed, Dec 23, 2009 at 01:11:43PM -0500, Kevin O'Connor wrote: > Thanks Gleb. > > On Wed, Dec 23, 2009 at 05:29:25PM +0200, Gleb Natapov wrote: > > - + sizeof(struct mpt_intsrc) * 18); > > + + sizeof(struct mpt_intsrc) * 34); > [...] > > +foreachpci(bdf, max)

Re: [PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Kevin O'Connor
Thanks Gleb. On Wed, Dec 23, 2009 at 05:29:25PM +0200, Gleb Natapov wrote: > - + sizeof(struct mpt_intsrc) * 18); > + + sizeof(struct mpt_intsrc) * 34); [...] > +foreachpci(bdf, max) { > +int pin = pci_config_readb(bdf, PCI_INTERRUPT_PIN); > +i

[PATCH] provide correct pci routing information in mptable

2009-12-23 Thread Gleb Natapov
OpenBSD uses irq routing from mptable, but doesn't create it correctly for PCI bus. This patch adds PCI routing info into mptable. Signed-off-by: Gleb Natapov diff --git a/src/mptable.c b/src/mptable.c index 1920dfe..545a41b 100644 --- a/src/mptable.c +++ b/src/mptable.c @@ -9,6 +9,8 @@ #include