All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Alexander Popov <alex.popov@linux.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] irqdomain: Export __irq_domain_alloc_irqs() and irq_domain_free_irqs()
Date: Sat, 16 Jul 2016 09:22:18 +0100	[thread overview]
Message-ID: <20160716092218.3a2de5c7@arm.com> (raw)
In-Reply-To: <57898F07.7030609@linux.com>

On Sat, 16 Jul 2016 04:33:59 +0300
Alexander Popov <alex.popov@linux.com> wrote:

> On 08.07.2016 11:34, Alexander Popov wrote:
> > On 06.07.2016 14:17, Thomas Gleixner wrote:  
> >> On Fri, 1 Jul 2016, Alexander Popov wrote:
> >>  
> >>> Export __irq_domain_alloc_irqs() and irq_domain_free_irqs() for being
> >>> able to work with irq_domain hierarchy in modules.  
> >>
> >> We usually export only when we have a proper use case which is supposed to go
> >> into the kernel tree proper. What's yours?  
> > 
> > Hello, Thomas,
> > 
> > I work at Positive Technologies ( https://www.ptsecurity.com/ ). We develop
> > a bare-metal hypervisor, which targets x86_64 and supports Linux as a guest OS.
> > 
> > Intel VT-x allows hypervisor to inject interrupts into virtual machines.
> > We want to handle these interrupts in guest Linux.
> > 
> > So I wrote a simple kernel module creating an irq_domain, which has
> > x86_vector_domain as a parent in the hierarchy. In this module I just call:
> > - irq_domain_alloc_irqs() to allocate irqs and allow calling request_irq()
> >    for them;
> > - irqd_cfg(irq_get_irq_data()) to get the APIC vectors of the allocated irqs;
> > - irq_domain_free_irqs() to free the resources at the end.
> > 
> > It allows to handle interrupts injected by the hypervisor in guest Linux easily,
> > without emulating MSI-capable PCI device at the hypervisor side.
> > 
> > Everything works fine if __irq_domain_alloc_irqs() and irq_domain_free_irqs()
> > are exported. Is it a proper use-case?  
> 
> Hello again, Thomas,
> 
> Did I properly answer your question? Will you accept my patch exporting these
> two functions?
> 
> > Do you think my module could be useful for the mainline in some form?
> > It took me some time to understand irq_domain hierarchy design, so I can
> > prepare some patch or share my code to help others.  
> 
> Do you think my paravirtualization code registering a child irq_domain
> for x86_vector_domain could bring any profit to the mainline?
> I would be glad to put effort and do it.

I think that without any in-tree modular users of these symbols, the
incentive for exporting those is pretty low. I can't really say
anything about your particular use-case, but I'd really to see some
code before taking that kind of patch.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

  reply	other threads:[~2016-07-16  8:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 19:29 [PATCH 1/1] irqdomain: Export __irq_domain_alloc_irqs() and irq_domain_free_irqs() Alexander Popov
2016-07-06 11:17 ` Thomas Gleixner
2016-07-08  8:34   ` Alexander Popov
2016-07-16  1:33     ` Alexander Popov
2016-07-16  8:22       ` Marc Zyngier [this message]
2016-07-18 12:34         ` Alexander Popov
2016-07-25 19:35           ` Alexander Popov
2016-07-27 11:22             ` Christoph Hellwig
2016-07-29 23:21               ` Alexander Popov
2016-08-01 11:28                 ` Jason Cooper

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=20160716092218.3a2de5c7@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=alex.popov@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 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.