Looking at the ''unmodified_drivers'', it appears that I''m supposed to tell the hypervisor the IRQ number to use to signal me. Under the Windows DDK, I get an Interrupt Vector, which I don''t think is the same as an IRQ number... and I think I''m supposed to work backwards from the vector to try and figure out what IRQ I''m supposed to pass the hypervisor. If I right click on the PCI driver in ''Device Manager'', it tells me that the Xen PCI virtual device is using IRQ 28, is this the magic number that I need to give to the hypervisor? Thanks James _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 27/9/07 11:55, "James Harper" <james.harper@bendigoit.com.au> wrote:> Looking at the ''unmodified_drivers'', it appears that I''m supposed to > tell the hypervisor the IRQ number to use to signal me. Under the > Windows DDK, I get an Interrupt Vector, which I don''t think is the same > as an IRQ number... and I think I''m supposed to work backwards from the > vector to try and figure out what IRQ I''m supposed to pass the > hypervisor.The documentation in public/hvm/params.h is pretty clear. Either you can specify the PCI INTx line by bus,dev,fn,pin, or you can specify the GSI that the line is ''wired'' to. Neither of these values is determinable from the interrupt vector. However, if you have probed the PCI device then you probably know the (bus,dev,fn,pin) tuple, so you should probably aim to specify that. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
James Harper
2007-Sep-28 11:15 UTC
RE: [Xen-devel] get_callback_via for Windows PV drivers
> On 27/9/07 11:55, "James Harper" <james.harper@bendigoit.com.au>wrote:> > > Looking at the ''unmodified_drivers'', it appears that I''m supposed to > > tell the hypervisor the IRQ number to use to signal me. Under the > > Windows DDK, I get an Interrupt Vector, which I don''t think is thesame> > as an IRQ number... and I think I''m supposed to work backwards fromthe> > vector to try and figure out what IRQ I''m supposed to pass the > > hypervisor. > > The documentation in public/hvm/params.h is pretty clear. Either youcan> specify the PCI INTx line by bus,dev,fn,pin, or you can specify theGSI> that the line is ''wired'' to.Unfortunately I''m not sure that I know what GSI actually means... I believe it stands for Global System Interrupt, but I''m not sure that that helps. Windows will give me the ''Translated'' interrupt, which is the vector, and the ''Raw'' interrupt, which is 28 in my case. Could this be the GSI?> Neither of these values is determinable from the > interrupt vector. However, if you have probed the PCI device then you > probably know the (bus,dev,fn,pin) tuple, so you should probably aimto> specify that.I can get bus, dev, and fn, but can''t seem to find ''pin'' from the information that Windows gives me... if 28 isn''t the GSI, then I''ll have to look harder for this ''pin'' number in the windows structures... What is the simplest thing I could do to get the hypervisor to trigger an interrupt? That would tell me for sure that it''s working. I have only implemented a tiny bit of the event channel logic, and no xen bus stuff yet... Thanks James _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 28/9/07 12:15, "James Harper" <james.harper@bendigoit.com.au> wrote:>> Neither of these values is determinable from the >> interrupt vector. However, if you have probed the PCI device then you >> probably know the (bus,dev,fn,pin) tuple, so you should probably aim > to >> specify that. > > I can get bus, dev, and fn, but can''t seem to find ''pin'' from the > information that Windows gives me... if 28 isn''t the GSI, then I''ll have > to look harder for this ''pin'' number in the windows structures...Read byte 0x3d in the PCI device config space. That returns the pin index.> What is the simplest thing I could do to get the hypervisor to trigger > an interrupt? That would tell me for sure that it''s working. I have only > implemented a tiny bit of the event channel logic, and no xen bus stuff > yet...Implement a simple console driver to talk to xenconsoled, perhaps? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
James Harper
2007-Sep-30 04:40 UTC
RE: [Xen-devel] get_callback_via for Windows PV drivers
> > I can get bus, dev, and fn, but can''t seem to find ''pin'' from the > > information that Windows gives me... if 28 isn''t the GSI, then I''llhave> > to look harder for this ''pin'' number in the windows structures... > > Read byte 0x3d in the PCI device config space. That returns the pinindex. Using 28 as the irq appears to work - the ISR definitely get called by xen (and locks up if I don''t do the right thing with the upcall_pending flag). Can you see a problem with doing it that way? Thanks James _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 30/9/07 05:40, "James Harper" <james.harper@bendigoit.com.au> wrote:>>> I can get bus, dev, and fn, but can''t seem to find ''pin'' from the >>> information that Windows gives me... if 28 isn''t the GSI, then I''ll > have >>> to look harder for this ''pin'' number in the windows structures... >> >> Read byte 0x3d in the PCI device config space. That returns the pin > index. > > Using 28 as the irq appears to work - the ISR definitely get called by > xen (and locks up if I don''t do the right thing with the upcall_pending > flag). > > Can you see a problem with doing it that way?No, since it sounds like that value is the GSI. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel