From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Bastian Blank <waldi@debian.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>,
"Zhang, Xiantao" <xiantao.zhang@intel.com>
Subject: Re: pvops-2.6.32 - Interrupt routing problem
Date: Tue, 16 Mar 2010 22:05:49 -0400 [thread overview]
Message-ID: <20100317020549.GA1414@phenom.dumpdata.com> (raw)
In-Reply-To: <20100316182053.GA2258@wavehammer.waldi.eu.org>
On Tue, Mar 16, 2010 at 07:20:53PM +0100, Bastian Blank wrote:
> On Tue, Mar 16, 2010 at 11:32:16AM -0400, Konrad Rzeszutek Wilk wrote:
> > I wish you had included the whole serial console for Xen boot.
>
> That was the intention but I had to run. Here is it (slightly
> annotated).
>
> > I am
> > curious to at what stage the pin 14 of the IOAPIC is set. Is it set by Xen
> > hypervisor initially (don't think so),
>
> No, the entries on the first IO-APIC for the devices in question are
> completely bogus in the initial printout. Unmasked but edge driven.
I am going to need your help here. I *think* the issue is that Xen
parses the MADT table, which makes the assumption that the
ISA interrupt vectors will usually be identity-mapped into the first 16 I/O APIC
sources (and the INT_SRC_OVR are used to override those IO APIC
pins with new entries). I think it does this:
acpi_parse_madt_ioapic_entries calls
mp_config_acpi_legacy_irqs:
.. snip ..
intsrc.mpc_irqflag = 0; /* Conforming */
Which assumes that it is edge, high. I think if you fix this line:
1089 Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq
%d, "
to do a printk we will see that your pin 14 is programmed to edge(0),
high(0). Which by itself is exactly the same thing Linux kernel in
baremetal does.
But that does not explain why you can't reprogram it. There is that check
you subverted which sets this:
mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
but I only see that being set when you call 'mp_register_gsi'. And that
is only done by the Linux kernel, not by the hypervisor. Furthermore
there is a guard for that allows it to be called only for GSI above 15.
Can you instrument mp_register_gsi to see when that 'pin_programmed' is
set? Or maybe your grep magic is better than mine and can you see other
instances where the mp_ioapic_routing is modified and instrument that?
I think once we figure out when the 'pin_programmed' is set we can
back-trace why that is set.
> > or is there another piece of code
> > in the pv-ops that iterates over the 0-15 IRQs and sets them to the
> > legacy trigger/level?
>
> Before the initialisation of the console, the kernel seem to set pins 5
> to 15 on the first IO-APIC to all edge driven.
Yeah, the more I look up data sheets that seems to be right way.
>
> > When you printed out the IOAPIC information, did the Xen one (in the
> > hypervisor, when you did apic=debug during boot) have pin 14 set to the
> > wrong mode?
>
> Yes.
Which is OK, b/c when APIC turns on, then you should be able to program it.
That is what Linux on baremetal does.
>
> > Or was it later when the pv-ops kernel booted that the pin 14 was set
> > incorrectly?
>
> The kernel sets it to this values again.
You mean it sets it to level (1), low (1) for pin 14 and 5.
next prev parent reply other threads:[~2010-03-17 2:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 11:19 pvops-2.6.32 - Interrupt routing problem Bastian Blank
2010-03-10 16:08 ` Ian Campbell
2010-03-10 16:19 ` Bastian Blank
2010-03-10 18:17 ` Jeremy Fitzhardinge
2010-03-10 20:32 ` Bastian Blank
2010-03-10 19:40 ` Ian Campbell
2010-03-10 20:00 ` Konrad Rzeszutek Wilk
2010-03-14 14:08 ` Bastian Blank
2010-03-14 15:23 ` Bastian Blank
2010-03-14 15:56 ` Jeremy Fitzhardinge
2010-03-14 16:17 ` Bastian Blank
2010-03-15 4:30 ` Zhang, Xiantao
2010-03-15 10:11 ` Bastian Blank
2010-03-15 10:36 ` Bastian Blank
2010-03-15 13:48 ` Zhang, Xiantao
2010-03-15 14:18 ` Bastian Blank
2010-03-15 14:38 ` Zhang, Xiantao
2010-03-15 21:15 ` Bastian Blank
2010-03-16 1:31 ` Konrad Rzeszutek Wilk
2010-03-16 8:18 ` Bastian Blank
2010-03-16 15:32 ` Konrad Rzeszutek Wilk
2010-03-16 18:20 ` Bastian Blank
2010-03-17 2:05 ` Konrad Rzeszutek Wilk [this message]
2010-03-19 11:39 ` Bastian Blank
2010-03-19 12:13 ` Bastian Blank
2010-03-21 21:47 ` Bastian Blank
2010-03-22 6:24 ` Jeremy Fitzhardinge
2010-03-23 11:37 ` Jan Beulich
2010-03-23 12:37 ` Bastian Blank
2010-03-23 14:04 ` Jan Beulich
2010-03-23 15:49 ` Bastian Blank
2010-03-19 14:15 ` Zhang, Xiantao
2010-03-19 14:36 ` Bastian Blank
2010-03-19 2:55 ` Zhang, Xiantao
2010-03-19 11:06 ` Bastian Blank
2010-03-14 16:41 ` Bastian Blank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100317020549.GA1414@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jeremy@goop.org \
--cc=keir.fraser@eu.citrix.com \
--cc=waldi@debian.org \
--cc=xen-devel@lists.xensource.com \
--cc=xiantao.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).