lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101026170841.GA10708@dumpdata.com>
Date:	Tue, 26 Oct 2010 13:08:41 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	xen-devel@...ts.xensource.com,
	Ian Campbell <ian.campbell@...rix.com>,
	Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
	linux-kernel@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>,
	mingo@...e.hu, tglx@...utronix.de
Subject: Re: [Xen-devel] Re: [PATCH 1/5] xen: events: use
 irq_alloc_desc(_at) instead of open-coding an IRQ allocator.

> In that case we should use dynamic allocation for everything.  Or try to
> work out distinct irq ranges for different interrupts if you really want
> to keep irq==gsi.

Some little alarm bells are ringing in the back of my head about irq != gsi.

I think the issue was the permission. When a PCI device is allocated to the
PV guest, we do a bunch of xc_* calls to allow the domain to use the BARs
and the IRQ. I believe when the guest boots and tries to map the
event channel with the physical IRQ, one of the arguments is that GSI. And
if we provide a bogus GSI, well, we won't get the INTx to the guest.

As you mentioned, Stefano's patch add a new element to the tuple that can
contain the GSI value. At which point we can make the guest IRQ != GSI,
as long as we can contain the <gsi, event channel> mapping present so
that for the hypercalls we can give it the right GSI.

The MSI/MSI-X use a completly different mechanism that does not all
of this complication, so we are OK with that.

.. snip ..

> d) dynamically allocate all irqs for all event channel types.

<nods> Ok, you sold me on this idea.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ