public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Xen-devel] [PATCH 2/3] xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
Date: Tue, 9 Aug 2011 14:51:00 -0400	[thread overview]
Message-ID: <20110809185100.GA19520@dumpdata.com> (raw)
In-Reply-To: <20110809152806.GA12710@aepfle.de>

On Tue, Aug 09, 2011 at 05:28:06PM +0200, Olaf Hering wrote:
> On Tue, Aug 09, Ian Campbell wrote:
> 
> > On Thu, 2011-08-04 at 17:20 +0100, Olaf Hering wrote:
> > > During a kexec boot some virqs such as timer and debugirq were already
> > > registered by the old kernel.  The hypervisor will return -EEXISTS from
> > > the new EVTCHNOP_bind_virq request and the BUG in bind_virq_to_irq()
> > > triggers.  Catch the -EEXISTS error and loop through all possible ports to find
> > > what port belongs to the virq/cpu combo.
> > 
> > Would it be better to proactively just query the status of all event
> > channels early on, like you do in find_virq, and setup the irq info
> > structures as appropriate? Rather than waiting for an -EEXISTS I mean.

We only create those structures when the IRQ handler is setup. And since
this is a new kernel, the irq_get_handler_data(irq) won't be present.
> 
> Now that I read that again more carefully: 
> No idea if thats possible, I will leave that answer to Jeremy/Konrad.

But we could an optimization. The find_virq does a search every time
from 0->NR_EVENTS. Perhaps we can also check the xen_irq_list_head
to skip over the event channels we have already created?

Something like this:

   bool skip = false;
   list_for_each_entry(info, &xen_irq_list_head, list)
   if (info->evtchn == port && info->cpu == cpu) {
        skip=true;
        break;
    }
    if (skip)
        continue

    .. snip..
    and here is the EVTCHNOP_status hypercall.

  reply	other threads:[~2011-08-09 18:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 16:20 [PATCH 0/3] [v4] kexec and kdump for Xen PVonHVM guests Olaf Hering
2011-08-04 16:20 ` [PATCH 1/3] xen/pv-on-hvm kexec: add xs_introduce to shutdown watches from old kernel Olaf Hering
2011-08-09  9:15   ` [Xen-devel] " Ian Campbell
2011-08-09  9:28     ` Olaf Hering
2011-08-04 16:20 ` [PATCH 2/3] xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports Olaf Hering
2011-08-09  9:17   ` [Xen-devel] " Ian Campbell
2011-08-09  9:29     ` Olaf Hering
2011-08-09 11:25       ` Ian Campbell
2011-08-09 15:28     ` Olaf Hering
2011-08-09 18:51       ` Konrad Rzeszutek Wilk [this message]
2011-08-04 16:20 ` [PATCH 3/3] xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel Olaf Hering
2011-08-09  9:23   ` [Xen-devel] " Ian Campbell
2011-08-09  9:44     ` Olaf Hering
2011-08-09 11:26       ` Ian Campbell
2011-08-09 19:02 ` [Xen-devel] [PATCH 0/3] [v4] kexec and kdump for Xen PVonHVM guests Konrad Rzeszutek Wilk

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=20110809185100.GA19520@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xensource.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