<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/xen/evtchn.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-01-06T15:07:50Z</updated>
<entry>
<title>xen/evtchn: support more than 4096 ports</title>
<updated>2014-01-06T15:07:50Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-09-23T20:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dc0064add422bc0ef5165ebe9ece3052bbd457d'/>
<id>urn:sha1:0dc0064add422bc0ef5165ebe9ece3052bbd457d</id>
<content type='text'>
Remove the check during unbind for NR_EVENT_CHANNELS as this limits
support to less than 4096 ports.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen: remove deprecated IRQF_DISABLED</title>
<updated>2013-11-06T20:31:16Z</updated>
<author>
<name>Michael Opdenacker</name>
</author>
<published>2013-09-09T03:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af09d1a73aed4e83ee095f2dabdc09386e31f2ea'/>
<id>urn:sha1:af09d1a73aed4e83ee095f2dabdc09386e31f2ea</id>
<content type='text'>
This patch proposes to remove the IRQF_DISABLED flag from drivers/xen
code. It's a NOOP since 2.6.35 and it will be removed one day.

Note that architecture dependent fixes for IRQF_DISABLED
were already submitted through separate patches.

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/evtchn: double free on error</title>
<updated>2013-08-30T12:44:53Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2013-08-26T16:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06b35d0072d2a126d8cd134b253e5ec65beb9e66'/>
<id>urn:sha1:06b35d0072d2a126d8cd134b253e5ec65beb9e66</id>
<content type='text'>
The call to del_evtchn() frees "evtchn".

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/evtchn: improve scalability by using per-user locks</title>
<updated>2013-08-09T15:06:49Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-07-19T14:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73cc4bb0c79eebe1f0e92b700d9fe8d1c9b061bb'/>
<id>urn:sha1:73cc4bb0c79eebe1f0e92b700d9fe8d1c9b061bb</id>
<content type='text'>
The global array of port users and the port_user_lock limits
scalability of the evtchn device.  Instead of the global array lookup,
use a per-use (per-fd) tree of event channels bound by that user and
protect the tree with a per-user lock.

This is also a prerequiste for extended the number of supported event
channels, by removing the fixed size, per-event channel array.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/evtchn: avoid a deadlock when unbinding an event channel</title>
<updated>2013-07-30T13:21:14Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-07-19T14:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179fbd5a45f0d4034cc6fd37b8d367a3b79663c4'/>
<id>urn:sha1:179fbd5a45f0d4034cc6fd37b8d367a3b79663c4</id>
<content type='text'>
Unbinding an event channel (either with the ioctl or when the evtchn
device is closed) may deadlock because disable_irq() is called with
port_user_lock held which is also locked by the interrupt handler.

Think of the IOCTL_EVTCHN_UNBIND is being serviced, the routine has
just taken the lock, and an interrupt happens. The evtchn_interrupt
is invoked, tries to take the lock and spins forever.

A quick glance at the code shows that the spinlock is a local IRQ
variant. Unfortunately that does not help as "disable_irq() waits for
the interrupt handler on all CPUs to stop running.  If the irq occurs
on another VCPU, it tries to take port_user_lock and can't because
the unbind ioctl is holding it." (from David). Hence we cannot
depend on the said spinlock to protect us. We could make it a system
wide IRQ disable spinlock but there is a better way.

We can piggyback on the fact that the existence of the spinlock is
to make get_port_user() checks be up-to-date. And we can alter those
checks to not depend on the spin lock (as it's protected by u-&gt;bind_mutex
in the ioctl) and can remove the unnecessary locking (this is
IOCTL_EVTCHN_UNBIND) path.

In the interrupt handler we cannot use the mutex, but we do not
need it.

"The unbind disables the irq before making the port user stale, so when
you clear it you are guaranteed that the interrupt handler that might
use that port cannot be running." (from David).

Hence this patch removes the spinlock usage on the teardown path
and piggybacks on disable_irq happening before we muck with the
get_port_user() data. This ensures that the interrupt handler will
never run on stale data.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
[v1: Expanded the commit description a bit]
</content>
</entry>
<entry>
<title>xen: Convert printks to pr_&lt;level&gt;</title>
<updated>2013-06-28T15:19:58Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2013-06-28T10:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=283c0972d53769ee44750cad4c27e3f5fa26ec1f'/>
<id>urn:sha1:283c0972d53769ee44750cad4c27e3f5fa26ec1f</id>
<content type='text'>
Convert printks to pr_&lt;level&gt; (excludes printk(KERN_DEBUG...)
to be more consistent throughout the xen subsystem.

Add pr_fmt with KBUILD_MODNAME or "xen:" KBUILD_MODNAME
Coalesce formats and add missing word spaces
Add missing newlines
Align arguments and reflow to 80 columns
Remove DRV_NAME from formats as pr_fmt adds the same content

This does change some of the prefixes of these messages
but it also does make them more consistent.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen: close evtchn port if binding to irq fails</title>
<updated>2013-02-20T03:02:33Z</updated>
<author>
<name>Wei Liu</name>
</author>
<published>2013-02-18T14:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7e44e444876478d50630f57b0c31d29f6725020'/>
<id>urn:sha1:e7e44e444876478d50630f57b0c31d29f6725020</id>
<content type='text'>
CC: stable@vger.kernel.org
Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen-evtchn: correct comment and error output</title>
<updated>2013-02-20T03:02:32Z</updated>
<author>
<name>Wei Liu</name>
</author>
<published>2013-02-18T14:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18283ea7433c703d3fcce33d189b637a7aaf0a49'/>
<id>urn:sha1:18283ea7433c703d3fcce33d189b637a7aaf0a49</id>
<content type='text'>
The evtchn device has been moved to /dev/xen. Also change log level to
KERN_ERR as other xen drivers.

Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/event: Add reference counting to event channels</title>
<updated>2011-11-21T22:14:48Z</updated>
<author>
<name>Daniel De Graaf</name>
</author>
<published>2011-10-27T21:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=420eb554d5ee6daad743d8190383219f757dd66c'/>
<id>urn:sha1:420eb554d5ee6daad743d8190383219f757dd66c</id>
<content type='text'>
Event channels exposed to userspace by the evtchn module may be used by
other modules in an asynchronous manner, which requires that reference
counting be used to prevent the event channel from being closed before
the signals are delivered.

The reference count on new event channels defaults to -1 which indicates
the event channel is not referenced outside the kernel; evtchn_get fails
if called on such an event channel. The event channels made visible to
userspace by evtchn have a normal reference count.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: remove extra semicolons</title>
<updated>2011-04-10T15:01:05Z</updated>
<author>
<name>Justin P. Mattock</name>
</author>
<published>2011-04-09T02:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6eab04a87677a37cf15b52e2b4b4fd57917102ad'/>
<id>urn:sha1:6eab04a87677a37cf15b52e2b4b4fd57917102ad</id>
<content type='text'>
Signed-off-by: Justin P. Mattock &lt;justinmattock@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
