<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/xen/events.c, branch linux-3.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-08-20T14:13:04Z</updated>
<entry>
<title>xen/events: mask events when changing their VCPU binding</title>
<updated>2013-08-20T14:13:04Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-08-15T12:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4704fe4f03a5ab27e3c36184af85d5000e0f8a48'/>
<id>urn:sha1:4704fe4f03a5ab27e3c36184af85d5000e0f8a48</id>
<content type='text'>
When a event is being bound to a VCPU there is a window between the
EVTCHNOP_bind_vpcu call and the adjustment of the local per-cpu masks
where an event may be lost.  The hypervisor upcalls the new VCPU but
the kernel thinks that event is still bound to the old VCPU and
ignores it.

There is even a problem when the event is being bound to the same VCPU
as there is a small window beween the clear_bit() and set_bit() calls
in bind_evtchn_to_cpu().  When scanning for pending events, the kernel
may read the bit when it is momentarily clear and ignore the event.

Avoid this by masking the event during the whole bind operation.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
CC: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>xen/events: initialize local per-cpu mask for all possible events</title>
<updated>2013-08-20T14:13:02Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-08-15T12:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84ca7a8e45dafb49cd5ca90a343ba033e2885c17'/>
<id>urn:sha1:84ca7a8e45dafb49cd5ca90a343ba033e2885c17</id>
<content type='text'>
The sizeof() argument in init_evtchn_cpu_bindings() is incorrect
resulting in only the first 64 (or 32 in 32-bit guests) ports having
their bindings being initialized to VCPU 0.

In most cases this does not cause a problem as request_irq() will set
the irq affinity which will set the correct local per-cpu mask.
However, if the request_irq() is called on a VCPU other than 0, there
is a window between the unmasking of the event and the affinity being
set were an event may be lost because it is not locally unmasked on
any VCPU. If request_irq() is called on VCPU 0 then local irqs are
disabled during the window and the race does not occur.

Fix this by initializing all NR_EVENT_CHANNEL bits in the local
per-cpu masks.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
CC: stable@vger.kernel.org
</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>Merge tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2013-05-11T23:19:30Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-05-11T23:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=607eeb0b836aa24a6972a460a213c4f87902d403'/>
<id>urn:sha1:607eeb0b836aa24a6972a460a213c4f87902d403</id>
<content type='text'>
Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
 - More fixes in the vCPU PVHVM hotplug path.
 - Add more documentation.
 - Fix various ARM related issues in the Xen generic drivers.
 - Updates in the xen-pciback driver per Bjorn's updates.
 - Mask the x2APIC feature for PV guests.

* tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pci: Used cached MSI-X capability offset
  xen/pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
  xen: mask x2APIC feature in PV
  xen: SWIOTLB is only used on x86
  xen/spinlock: Fix check from greater than to be also be greater or equal to.
  xen/smp/pvhvm: Don't point per_cpu(xen_vpcu, 33 and larger) to shared_info
  xen/vcpu: Document the xen_vcpu_info and xen_vcpu
  xen/vcpu/pvhvm: Fix vcpu hotplugging hanging.
</content>
</entry>
<entry>
<title>xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST</title>
<updated>2013-05-08T12:38:12Z</updated>
<author>
<name>Julien Grall</name>
</author>
<published>2013-04-30T17:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=934f585e928e250b9428fccdcb7c1e13a6c24e76'/>
<id>urn:sha1:934f585e928e250b9428fccdcb7c1e13a6c24e76</id>
<content type='text'>
Reset the IRQ_NOAUTOEN and IRQ_NOREQUEST flags that are enabled by
default on ARM. If IRQ_NOAUTOEN is set, __setup_irq doesn't call
irq_startup, that is responsible for calling irq_unmask at startup time.
As a result event channels remain masked.

The clear is already made in bind_evtchn_to_irq with commit a8636c0 but was
missing on all others bind_*_to_irq. Move the clear in xen_irq_info_common_init.

On x86, IRQ_NOAUTOEN and IRQ_NOREQUEST are cleared by default, so this commit
doesn't impact this architecture.

Acked-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Signed-off-by: Julien Grall &lt;julien.grall@linaro.org&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'stable/for-linus-3.10-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2013-04-29T15:16:51Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-04-29T15:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d2da7af909e1cf529f3cac582aaae05b107aa1e'/>
<id>urn:sha1:9d2da7af909e1cf529f3cac582aaae05b107aa1e</id>
<content type='text'>
Pull Xen updates from Konrad Rzeszutek Wilk:
 "Features:
   - Populate the boot_params with EDD data.
   - Cleanups in the IRQ code.
  Bug-fixes:
   - CPU hotplug offline/online in PVHVM mode.
   - Re-upload processor PM data after ACPI S3 suspend/resume cycle."

And Konrad gets a gold star for sending the pull request early when he
thought he'd be away for the first week of the merge window (but because
of 3.9 dragging out to -rc8 he then re-sent the reminder on the first
day of the merge window anyway)

* tag 'stable/for-linus-3.10-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: resolve section mismatch warnings in xen-acpi-processor
  xen: Re-upload processor PM data to hypervisor after S3 resume (v2)
  xen/smp: Unifiy some of the PVs and PVHVM offline CPU path
  xen/smp/pvhvm: Don't initialize IRQ_WORKER as we are using the native one.
  xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM
  xen/spinlock:  Check against default value of -1 for IRQ line.
  xen/time: Add default value of -1 for IRQ and check for that.
  xen/events: Check that IRQ value passed in is valid.
  xen/time: Fix kasprintf splat when allocating timer%d IRQ line.
  xen/smp/spinlock: Fix leakage of the spinlock interrupt line for every CPU online/offline
  xen/smp: Fix leakage of timer interrupt line for every CPU online/offline.
  xen kconfig: fix select INPUT_XEN_KBDDEV_FRONTEND
  xen: drop tracking of IRQ vector
  x86/xen: populate boot_params with EDD data
</content>
</entry>
<entry>
<title>xen/events: Check that IRQ value passed in is valid.</title>
<updated>2013-04-16T20:05:13Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-04-16T14:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94032c506720e26402db64987e08168565b57990'/>
<id>urn:sha1:94032c506720e26402db64987e08168565b57990</id>
<content type='text'>
We naively assume that the IRQ value passed in is correct.
If it is not, then any dereference operation for the 'info'
structure will result in crash - so might as well guard ourselves
and sprinkle copious amounts of WARN_ON.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen: drop tracking of IRQ vector</title>
<updated>2013-04-16T19:05:45Z</updated>
<author>
<name>Jan Beulich</name>
</author>
<published>2013-04-03T14:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dec02dea1c159b69aa88cbfe9c89b2b46eadd28f'/>
<id>urn:sha1:dec02dea1c159b69aa88cbfe9c89b2b46eadd28f</id>
<content type='text'>
For quite a few Xen versions, this wasn't the IRQ vector anymore
anyway, and it is not being used by the kernel for anything. Hence
drop the field from struct irq_info, and respective function
parameters.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Acked-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/events: Handle VIRQ_TIMER before any other hardirq in event loop.</title>
<updated>2013-04-02T18:01:21Z</updated>
<author>
<name>Keir Fraser</name>
</author>
<published>2013-03-28T14:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bee980d9e9642e96351fa3ca9077b853ecf62f57'/>
<id>urn:sha1:bee980d9e9642e96351fa3ca9077b853ecf62f57</id>
<content type='text'>
This avoids any other hardirq handler seeing a very stale jiffies
value immediately after wakeup from a long idle period. The one
observable symptom of this was a USB keyboard, with software keyboard
repeat, which would always repeat a key immediately that it was
pressed. This is due to the key press waking the guest, the key
handler immediately runs, sees an old jiffies value, and then that
jiffies value significantly updated, before the key is unpressed.

Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Keir Fraser &lt;keir.fraser@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/events: avoid race with raising an event in unmask_evtchn()</title>
<updated>2013-03-27T16:06:04Z</updated>
<author>
<name>David Vrabel</name>
</author>
<published>2013-03-25T14:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c26377e62f4e6bfb4d99ef88526047209701a83f'/>
<id>urn:sha1:c26377e62f4e6bfb4d99ef88526047209701a83f</id>
<content type='text'>
In unmask_evtchn(), when the mask bit is cleared after testing for
pending and the event becomes pending between the test and clear, then
the upcall will not become pending and the event may be lost or
delayed.

Avoid this by always clearing the mask bit before checking for
pending.  If a hypercall is needed, remask the event as
EVTCHNOP_unmask will only retrigger pending events if they were
masked.

This fixes a regression introduced in 3.7 by
b5e579232d635b79a3da052964cb357ccda8d9ea (xen/events: fix
unmask_evtchn for PV on HVM guests) which reordered the clear mask and
check pending operations.

Changes in v2:
- set mask before hypercall.

Cc: stable@vger.kernel.org
Acked-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
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>
</feed>
