<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/xen/events.c, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-07T15:41:27Z</updated>
<entry>
<title>xen/events: fix RCU warning, or Call idle notifier after irq_enter()</title>
<updated>2012-11-07T15:41:27Z</updated>
<author>
<name>Mojiong Qiu</name>
</author>
<published>2012-11-06T08:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=772aebcefeff310f80e32b874988af0076cb799d'/>
<id>urn:sha1:772aebcefeff310f80e32b874988af0076cb799d</id>
<content type='text'>
exit_idle() should be called after irq_enter(), otherwise it throws:

[ INFO: suspicious RCU usage. ]
3.6.5 #1 Not tainted
-------------------------------
include/linux/rcupdate.h:725 rcu_read_lock() used illegally while idle!

other info that might help us debug this:

RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 1
RCU used illegally from extended quiescent state!
1 lock held by swapper/0/0:
 #0:  (rcu_read_lock){......}, at: [&lt;ffffffff810e9fe0&gt;] __atomic_notifier_call_chain+0x0/0x140

stack backtrace:
Pid: 0, comm: swapper/0 Not tainted 3.6.5 #1
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff811259a2&gt;] lockdep_rcu_suspicious+0xe2/0x130
 [&lt;ffffffff810ea10c&gt;] __atomic_notifier_call_chain+0x12c/0x140
 [&lt;ffffffff810e9fe0&gt;] ? atomic_notifier_chain_unregister+0x90/0x90
 [&lt;ffffffff811216cd&gt;] ? trace_hardirqs_off+0xd/0x10
 [&lt;ffffffff810ea136&gt;] atomic_notifier_call_chain+0x16/0x20
 [&lt;ffffffff810777c3&gt;] exit_idle+0x43/0x50
 [&lt;ffffffff81568865&gt;] xen_evtchn_do_upcall+0x25/0x50
 [&lt;ffffffff81aa690e&gt;] xen_do_hypervisor_callback+0x1e/0x30
 &lt;EOI&gt;  [&lt;ffffffff810013aa&gt;] ? hypercall_page+0x3aa/0x1000
 [&lt;ffffffff810013aa&gt;] ? hypercall_page+0x3aa/0x1000
 [&lt;ffffffff81061540&gt;] ? xen_safe_halt+0x10/0x20
 [&lt;ffffffff81075cfa&gt;] ? default_idle+0xba/0x570
 [&lt;ffffffff810778af&gt;] ? cpu_idle+0xdf/0x140
 [&lt;ffffffff81a4d881&gt;] ? rest_init+0x135/0x144
 [&lt;ffffffff81a4d74c&gt;] ? csum_partial_copy_generic+0x16c/0x16c
 [&lt;ffffffff82520c45&gt;] ? start_kernel+0x3db/0x3e8
 [&lt;ffffffff8252066a&gt;] ? repair_env_string+0x5a/0x5a
 [&lt;ffffffff82520356&gt;] ? x86_64_start_reservations+0x131/0x135
 [&lt;ffffffff82524aca&gt;] ? xen_start_kernel+0x465/0x46

Git commit 98ad1cc14a5c4fd658f9d72c6ba5c86dfd3ce0d5
Author: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Date:   Fri Oct 7 18:22:09 2011 +0200

    x86: Call idle notifier after irq_enter()

did this, but it missed the Xen code.

Signed-off-by: Mojiong Qiu &lt;mjqiu@tencent.com&gt;
Cc: stable@vger.kernel.org # from 3.3 and newer.
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen: events: pirq_check_eoi_map is X86 specific</title>
<updated>2012-10-19T19:17:53Z</updated>
<author>
<name>Ian Campbell</name>
</author>
<published>2012-10-17T08:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf86ad8095d4684ada0d37bb1355ede2c88a5e4e'/>
<id>urn:sha1:bf86ad8095d4684ada0d37bb1355ede2c88a5e4e</id>
<content type='text'>
On ARM I see:
drivers/xen/events.c:280:13: warning: 'pirq_check_eoi_map' defined but not used
[-Wunused-function]

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: 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: mark xen_init_IRQ __init</title>
<updated>2012-10-02T16:34:56Z</updated>
<author>
<name>Stefano Stabellini</name>
</author>
<published>2012-10-02T14:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e3d88602814e5fd5b88d5c73be3305060c473b6'/>
<id>urn:sha1:2e3d88602814e5fd5b88d5c73be3305060c473b6</id>
<content type='text'>
xen_init_IRQ should be marked __init because it calls other functions
marked __init and is always called by functions marked __init (on both
x86 and arm).

Also remove the unused EXPORT_SYMBOL_GPL(xen_init_IRQ).

Both changes were introduced by "xen/arm: receive Xen events on ARM".

Signed-off-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/arm: receive Xen events on ARM</title>
<updated>2012-09-14T13:37:32Z</updated>
<author>
<name>Stefano Stabellini</name>
</author>
<published>2012-09-14T13:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ec53ecf38bcbf95b4b057328a8fbba4d22ef28b'/>
<id>urn:sha1:0ec53ecf38bcbf95b4b057328a8fbba4d22ef28b</id>
<content type='text'>
Compile events.c on ARM.
Parse, map and enable the IRQ to get event notifications from the device
tree (node "/xen").

Signed-off-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;

</content>
</entry>
<entry>
<title>xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST</title>
<updated>2012-08-23T14:18:12Z</updated>
<author>
<name>Stefano Stabellini</name>
</author>
<published>2012-08-22T16:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8636c0b2e57d4f31f71aa306b1ee701db3f3c85'/>
<id>urn:sha1:a8636c0b2e57d4f31f71aa306b1ee701db3f3c85</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.

Signed-off-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/events: fix unmask_evtchn for PV on HVM guests</title>
<updated>2012-08-23T14:18:07Z</updated>
<author>
<name>Stefano Stabellini</name>
</author>
<published>2012-08-22T16:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5e579232d635b79a3da052964cb357ccda8d9ea'/>
<id>urn:sha1:b5e579232d635b79a3da052964cb357ccda8d9ea</id>
<content type='text'>
When unmask_evtchn is called, if we already have an event pending, we
just set evtchn_pending_sel waiting for local_irq_enable to be called.
That is because PV guests set the irq_enable pvops to
xen_irq_enable_direct in xen_setup_vcpu_info_placement:
xen_irq_enable_direct is implemented in assembly in
arch/x86/xen/xen-asm.S and call xen_force_evtchn_callback if
XEN_vcpu_info_pending is set.

However HVM guests (and ARM guests) do not change or do not have the
irq_enable pvop, so evtchn_unmask cannot work properly for them.

Considering that having the pending_irq bit set when unmask_evtchn is
called is not very common, and it is simpler to keep the
native_irq_enable implementation for HVM guests (and ARM guests), the
best thing to do is just use the EVTCHNOP_unmask hypercall (Xen
re-injects pending events in response).

Signed-off-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>Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2012-06-16T00:17:15Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-06-16T00:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=069915b94642b05c9b45fee36862157026b36614'/>
<id>urn:sha1:069915b94642b05c9b45fee36862157026b36614</id>
<content type='text'>
Pull five Xen bug-fixes from Konrad Rzeszutek Wilk:

 - When booting as PVHVM we would try to use PV console - but would not validate
   the parameters causing us to crash during restore b/c we re-use the wrong event
   channel.
 - When booting on machines with SR-IOV PCI bridge we didn't check for the bridge
   and tried to use it.
 - Under AMD machines would advertise the APERFMPERF resulting in needless amount
   of MSRs from the guest.
 - A global value (xen_released_pages) was not subtracted at bootup when pages
   were added back in. This resulted in the balloon worker having the wrong
   account of how many pages were truly released.
 - Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback.

* tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: mark local pages as FOREIGN in the m2p_override
  xen/setup: filter APERFMPERF cpuid feature out
  xen/balloon: Subtract from xen_released_pages the count that is populated.
  xen/pci: Check for PCI bridge before using it.
  xen/events: Add WARN_ON when quick lookup found invalid type.
  xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
  xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
  xen/hvc: Collapse error logic.
</content>
</entry>
<entry>
<title>xen/events: Add WARN_ON when quick lookup found invalid type.</title>
<updated>2012-05-30T14:16:24Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2012-05-23T17:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e152e6c4b0da84c66cad56597b42c4ecedb0448'/>
<id>urn:sha1:5e152e6c4b0da84c66cad56597b42c4ecedb0448</id>
<content type='text'>
All of the bind_XYZ_to_irq do a quick lookup to see if the
event exists. And if it does, then the initialized IRQ number
is returned instead of initializing a new IRQ number.

This patch adds an extra logic to check that the type returned
is proper one and that there is an IRQ handler setup for it.

This patch has the benefit of being able to find drivers that
are doing something naught.

[v1: Enhanced based on Stefano's review]
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'stable/for-linus-3.5-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2012-05-24T23:02:08Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-05-24T23:02:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5f4035adfffbcc6b478de5b8c44b618b3124aff'/>
<id>urn:sha1:b5f4035adfffbcc6b478de5b8c44b618b3124aff</id>
<content type='text'>
Pull Xen updates from Konrad Rzeszutek Wilk:
 "Features:
   * Extend the APIC ops implementation and add IRQ_WORKER vector
     support so that 'perf' can work properly.
   * Fix self-ballooning code, and balloon logic when booting as initial
     domain.
   * Move array printing code to generic debugfs
   * Support XenBus domains.
   * Lazily free grants when a domain is dead/non-existent.
   * In M2P code use batching calls
  Bug-fixes:
   * Fix NULL dereference in allocation failure path (hvc_xen)
   * Fix unbinding of IRQ_WORKER vector during vCPU hot-unplug
   * Fix HVM guest resume - we would leak an PIRQ value instead of
     reusing the existing one."

Fix up add-add onflicts in arch/x86/xen/enlighten.c due to addition of
apic ipi interface next to the new apic_id functions.

* tag 'stable/for-linus-3.5-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: do not map the same GSI twice in PVHVM guests.
  hvc_xen: NULL dereference on allocation failure
  xen: Add selfballoning memory reservation tunable.
  xenbus: Add support for xenbus backend in stub domain
  xen/smp: unbind irqworkX when unplugging vCPUs.
  xen: enter/exit lazy_mmu_mode around m2p_override calls
  xen/acpi/sleep: Enable ACPI sleep via the __acpi_os_prepare_sleep
  xen: implement IRQ_WORK_VECTOR handler
  xen: implement apic ipi interface
  xen/setup: update VA mapping when releasing memory during setup
  xen/setup: Combine the two hypercall functions - since they are quite similar.
  xen/setup: Populate freed MFNs from non-RAM E820 entries and gaps to E820 RAM
  xen/setup: Only print "Freeing XXX-YYY pfn range: Z pages freed" if Z &gt; 0
  xen/gnttab: add deferred freeing logic
  debugfs: Add support to print u32 array in debugfs
  xen/p2m: An early bootup variant of set_phys_to_machine
  xen/p2m: Collapse early_alloc_p2m_middle redundant checks.
  xen/p2m: Allow alloc_p2m_middle to call reserve_brk depending on argument
  xen/p2m: Move code around to allow for better re-usage.
</content>
</entry>
<entry>
<title>xen: do not map the same GSI twice in PVHVM guests.</title>
<updated>2012-05-21T18:11:36Z</updated>
<author>
<name>Stefano Stabellini</name>
</author>
<published>2012-05-21T15:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68c2c39a76b094e9b2773e5846424ea674bf2c46'/>
<id>urn:sha1:68c2c39a76b094e9b2773e5846424ea674bf2c46</id>
<content type='text'>
PV on HVM guests map GSIs into event channels. At restore time the
event channels are resumed by restore_pirqs.

Device drivers might try to register the same GSI again through ACPI at
restore time, but the GSI has already been mapped and bound by
restore_pirqs. This patch detects these situations and avoids
 mapping the same GSI multiple times.

Without this patch we get:
(XEN) irq.c:2235: dom4: pirq 23 or emuirq 28 already mapped
and waste a pirq.

CC: stable@kernel.org
Signed-off-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
</feed>
