<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch, branch v3.5-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile</title>
<updated>2012-06-17T00:00:15+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-17T00:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c458175eb61843fe9fd37ac3d56b701e98a8cf15'/>
<id>c458175eb61843fe9fd37ac3d56b701e98a8cf15</id>
<content type='text'>
Pull arch/tile update from Chris Metcalf:
 "This one-line bug fix unbreaks glibc robust mutexes (among other
  things no doubt), from code merged in during the 3.5 merge window but
  which we had been running internally at Tilera for almost a year."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: fix bug in get_user() for 4-byte values
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull arch/tile update from Chris Metcalf:
 "This one-line bug fix unbreaks glibc robust mutexes (among other
  things no doubt), from code merged in during the 3.5 merge window but
  which we had been running internally at Tilera for almost a year."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: fix bug in get_user() for 4-byte values
</pre>
</div>
</content>
</entry>
<entry>
<title>tile: fix bug in get_user() for 4-byte values</title>
<updated>2012-06-16T20:56:13+00:00</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2012-06-16T20:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6699c8cda36f296e315068ed9bbe4f03e6ed4044'/>
<id>6699c8cda36f296e315068ed9bbe4f03e6ed4044</id>
<content type='text'>
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler.  Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().

This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The definition of 32-bit values in the 64-bit tilegx architecture is that
they should be sign-extended regardless of whether they are considered
signed or unsigned by the compiler.  Accordingly, we need to use an
"ld4s" rather than "ld4u" to load and sign-extend for get_user().

This fixes glibc bug 14238 (see http://sourceware.org/bugzilla),
introduced during the 3.5 merge window.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping</title>
<updated>2012-06-16T00:35:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-16T00:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=56b880e2e38da6c76c454052a93c0a92aa3586f7'/>
<id>56b880e2e38da6c76c454052a93c0a92aa3586f7</id>
<content type='text'>
Pull DMA-mapping fixes from Marek Szyprowski:
 "A set of minor fixes for dma-mapping code (ARM and x86) required for
  Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."

* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  x86: dma-mapping: fix broken allocation when dma_mask has been provided
  ARM: dma-mapping: fix debug messages in dmabounce code
  ARM: mm: fix type of the arm_dma_limit global variable
  ARM: dma-mapping: Add missing static storage class specifier
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull DMA-mapping fixes from Marek Szyprowski:
 "A set of minor fixes for dma-mapping code (ARM and x86) required for
  Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."

* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  x86: dma-mapping: fix broken allocation when dma_mask has been provided
  ARM: dma-mapping: fix debug messages in dmabounce code
  ARM: mm: fix type of the arm_dma_limit global variable
  ARM: dma-mapping: Add missing static storage class specifier
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc</title>
<updated>2012-06-16T00:28:20+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-16T00:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1043e3becfbae0bee618f9b4f9598b145c4774e1'/>
<id>1043e3becfbae0bee618f9b4f9598b145c4774e1</id>
<content type='text'>
Pull PowerPC fix from Paul Mackerras:
 "Just one commit, and a one-liner at that, but an important one;
  without it hard_irq_disable() does nothing on powerpc."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  Make hard_irq_disable() actually hard-disable interrupts
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull PowerPC fix from Paul Mackerras:
 "Just one commit, and a one-liner at that, but an important one;
  without it hard_irq_disable() does nothing on powerpc."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  Make hard_irq_disable() actually hard-disable interrupts
</pre>
</div>
</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:15+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-16T00:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=069915b94642b05c9b45fee36862157026b36614'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc</title>
<updated>2012-06-16T00:07:06+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-16T00:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=06da03510e0cf669a2c434484b90c0ab09d2b086'/>
<id>06da03510e0cf669a2c434484b90c0ab09d2b086</id>
<content type='text'>
Pull sparc update from David S. Miller:
 "This just removes some sparc headers that were never, ever, used."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: remove two unused headers
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull sparc update from David S. Miller:
 "This just removes some sparc headers that were never, ever, used."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: remove two unused headers
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-06-15T23:59:19+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-15T23:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c83119a980166539bc14033d89e83cd2e4f2da52'/>
<id>c83119a980166539bc14033d89e83cd2e4f2da52</id>
<content type='text'>
Pull x86 fixes from Ingo Molnar.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/smp: Fix topology checks on AMD MCM CPUs
  x86/mm: Fix some kernel-doc warnings
  x86, um: Correct syscall table type attributes breaking gcc 4.8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull x86 fixes from Ingo Molnar.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/smp: Fix topology checks on AMD MCM CPUs
  x86/mm: Fix some kernel-doc warnings
  x86, um: Correct syscall table type attributes breaking gcc 4.8
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-06-15T23:58:10+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-15T23:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed21a66c1862499bb21c8e48a450e13fb830f46b'/>
<id>ed21a66c1862499bb21c8e48a450e13fb830f46b</id>
<content type='text'>
Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  watchdog: Quiet down the boot messages
  perf/x86: Fix broken LBR fixup code
  tracing: Have tracing_off() actually turn tracing off
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  watchdog: Quiet down the boot messages
  perf/x86: Fix broken LBR fixup code
  tracing: Have tracing_off() actually turn tracing off
</pre>
</div>
</content>
</entry>
<entry>
<title>Make hard_irq_disable() actually hard-disable interrupts</title>
<updated>2012-06-15T05:27:41+00:00</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2012-06-15T04:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f948501b36c6b3d9352ce212a197098a7e958971'/>
<id>f948501b36c6b3d9352ce212a197098a7e958971</id>
<content type='text'>
At present, hard_irq_disable() does nothing on powerpc because of
this code in include/linux/interrupt.h:

    #ifndef hard_irq_disable
    #define hard_irq_disable()      do { } while(0)
    #endif

So we need to make our hard_irq_disable be a macro.  It was previously
a macro until commit 7230c56441 ("powerpc: Rework lazy-interrupt
handling") changed it to a static inline function.

Cc: stable@vger.kernel.org
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
--
 arch/powerpc/include/asm/hw_irq.h |    3 +++
 1 file changed, 3 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present, hard_irq_disable() does nothing on powerpc because of
this code in include/linux/interrupt.h:

    #ifndef hard_irq_disable
    #define hard_irq_disable()      do { } while(0)
    #endif

So we need to make our hard_irq_disable be a macro.  It was previously
a macro until commit 7230c56441 ("powerpc: Rework lazy-interrupt
handling") changed it to a static inline function.

Cc: stable@vger.kernel.org
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
--
 arch/powerpc/include/asm/hw_irq.h |    3 +++
 1 file changed, 3 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>xen: mark local pages as FOREIGN in the m2p_override</title>
<updated>2012-06-14T18:03:41+00:00</updated>
<author>
<name>Stefano Stabellini</name>
<email>stefano.stabellini@eu.citrix.com</email>
</author>
<published>2012-05-23T17:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b9e0d95c041ca2d7ad297ee37c2e9cfab67a188f'/>
<id>b9e0d95c041ca2d7ad297ee37c2e9cfab67a188f</id>
<content type='text'>
When the frontend and the backend reside on the same domain, even if we
add pages to the m2p_override, these pages will never be returned by
mfn_to_pfn because the check "get_phys_to_machine(pfn) != mfn" will
always fail, so the pfn of the frontend will be returned instead
(resulting in a deadlock because the frontend pages are already locked).

INFO: task qemu-system-i38:1085 blocked for more than 120 seconds.
"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
qemu-system-i38 D ffff8800cfc137c0     0  1085      1 0x00000000
 ffff8800c47ed898 0000000000000282 ffff8800be4596b0 00000000000137c0
 ffff8800c47edfd8 ffff8800c47ec010 00000000000137c0 00000000000137c0
 ffff8800c47edfd8 00000000000137c0 ffffffff82213020 ffff8800be4596b0
Call Trace:
 [&lt;ffffffff81101ee0&gt;] ? __lock_page+0x70/0x70
 [&lt;ffffffff81a0fdd9&gt;] schedule+0x29/0x70
 [&lt;ffffffff81a0fe80&gt;] io_schedule+0x60/0x80
 [&lt;ffffffff81101eee&gt;] sleep_on_page+0xe/0x20
 [&lt;ffffffff81a0e1ca&gt;] __wait_on_bit_lock+0x5a/0xc0
 [&lt;ffffffff81101ed7&gt;] __lock_page+0x67/0x70
 [&lt;ffffffff8106f750&gt;] ? autoremove_wake_function+0x40/0x40
 [&lt;ffffffff811867e6&gt;] ? bio_add_page+0x36/0x40
 [&lt;ffffffff8110b692&gt;] set_page_dirty_lock+0x52/0x60
 [&lt;ffffffff81186021&gt;] bio_set_pages_dirty+0x51/0x70
 [&lt;ffffffff8118c6b4&gt;] do_blockdev_direct_IO+0xb24/0xeb0
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff8118ca95&gt;] __blockdev_direct_IO+0x55/0x60
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff811e91c8&gt;] ext3_direct_IO+0xf8/0x390
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff81004b60&gt;] ? xen_mc_flush+0xb0/0x1b0
 [&lt;ffffffff81104027&gt;] generic_file_aio_read+0x737/0x780
 [&lt;ffffffff813bedeb&gt;] ? gnttab_map_refs+0x15b/0x1e0
 [&lt;ffffffff811038f0&gt;] ? find_get_pages+0x150/0x150
 [&lt;ffffffff8119736c&gt;] aio_rw_vect_retry+0x7c/0x1d0
 [&lt;ffffffff811972f0&gt;] ? lookup_ioctx+0x90/0x90
 [&lt;ffffffff81198856&gt;] aio_run_iocb+0x66/0x1a0
 [&lt;ffffffff811998b8&gt;] do_io_submit+0x708/0xb90
 [&lt;ffffffff81199d50&gt;] sys_io_submit+0x10/0x20
 [&lt;ffffffff81a18d69&gt;] system_call_fastpath+0x16/0x1b

The explanation is in the comment within the code:

We need to do this because the pages shared by the frontend
(xen-blkfront) can be already locked (lock_page, called by
do_read_cache_page); when the userspace backend tries to use them
with direct_IO, mfn_to_pfn returns the pfn of the frontend, so
do_blockdev_direct_IO is going to try to lock the same pages
again resulting in a deadlock.

A simplified call graph looks like this:

pygrub                          QEMU
-----------------------------------------------
do_read_cache_page              io_submit
  |                              |
lock_page                       ext3_direct_IO
                                 |
                                bio_add_page
                                 |
                                lock_page

Internally the xen-blkback uses m2p_add_override to swizzle (temporarily)
a 'struct page' to have a different MFN (so that it can point to another
guest). It also can easily find out whether another pfn corresponding
to the mfn exists in the m2p, and can set the FOREIGN bit
in the p2m, making sure that mfn_to_pfn returns the pfn of the backend.

This allows the backend to perform direct_IO on these pages, but as a
side effect prevents the frontend from using get_user_pages_fast on
them while they are being shared with the backend.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the frontend and the backend reside on the same domain, even if we
add pages to the m2p_override, these pages will never be returned by
mfn_to_pfn because the check "get_phys_to_machine(pfn) != mfn" will
always fail, so the pfn of the frontend will be returned instead
(resulting in a deadlock because the frontend pages are already locked).

INFO: task qemu-system-i38:1085 blocked for more than 120 seconds.
"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
qemu-system-i38 D ffff8800cfc137c0     0  1085      1 0x00000000
 ffff8800c47ed898 0000000000000282 ffff8800be4596b0 00000000000137c0
 ffff8800c47edfd8 ffff8800c47ec010 00000000000137c0 00000000000137c0
 ffff8800c47edfd8 00000000000137c0 ffffffff82213020 ffff8800be4596b0
Call Trace:
 [&lt;ffffffff81101ee0&gt;] ? __lock_page+0x70/0x70
 [&lt;ffffffff81a0fdd9&gt;] schedule+0x29/0x70
 [&lt;ffffffff81a0fe80&gt;] io_schedule+0x60/0x80
 [&lt;ffffffff81101eee&gt;] sleep_on_page+0xe/0x20
 [&lt;ffffffff81a0e1ca&gt;] __wait_on_bit_lock+0x5a/0xc0
 [&lt;ffffffff81101ed7&gt;] __lock_page+0x67/0x70
 [&lt;ffffffff8106f750&gt;] ? autoremove_wake_function+0x40/0x40
 [&lt;ffffffff811867e6&gt;] ? bio_add_page+0x36/0x40
 [&lt;ffffffff8110b692&gt;] set_page_dirty_lock+0x52/0x60
 [&lt;ffffffff81186021&gt;] bio_set_pages_dirty+0x51/0x70
 [&lt;ffffffff8118c6b4&gt;] do_blockdev_direct_IO+0xb24/0xeb0
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff8118ca95&gt;] __blockdev_direct_IO+0x55/0x60
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff811e91c8&gt;] ext3_direct_IO+0xf8/0x390
 [&lt;ffffffff811e71a0&gt;] ? ext3_get_blocks_handle+0xe00/0xe00
 [&lt;ffffffff81004b60&gt;] ? xen_mc_flush+0xb0/0x1b0
 [&lt;ffffffff81104027&gt;] generic_file_aio_read+0x737/0x780
 [&lt;ffffffff813bedeb&gt;] ? gnttab_map_refs+0x15b/0x1e0
 [&lt;ffffffff811038f0&gt;] ? find_get_pages+0x150/0x150
 [&lt;ffffffff8119736c&gt;] aio_rw_vect_retry+0x7c/0x1d0
 [&lt;ffffffff811972f0&gt;] ? lookup_ioctx+0x90/0x90
 [&lt;ffffffff81198856&gt;] aio_run_iocb+0x66/0x1a0
 [&lt;ffffffff811998b8&gt;] do_io_submit+0x708/0xb90
 [&lt;ffffffff81199d50&gt;] sys_io_submit+0x10/0x20
 [&lt;ffffffff81a18d69&gt;] system_call_fastpath+0x16/0x1b

The explanation is in the comment within the code:

We need to do this because the pages shared by the frontend
(xen-blkfront) can be already locked (lock_page, called by
do_read_cache_page); when the userspace backend tries to use them
with direct_IO, mfn_to_pfn returns the pfn of the frontend, so
do_blockdev_direct_IO is going to try to lock the same pages
again resulting in a deadlock.

A simplified call graph looks like this:

pygrub                          QEMU
-----------------------------------------------
do_read_cache_page              io_submit
  |                              |
lock_page                       ext3_direct_IO
                                 |
                                bio_add_page
                                 |
                                lock_page

Internally the xen-blkback uses m2p_add_override to swizzle (temporarily)
a 'struct page' to have a different MFN (so that it can point to another
guest). It also can easily find out whether another pfn corresponding
to the mfn exists in the m2p, and can set the FOREIGN bit
in the p2m, making sure that mfn_to_pfn returns the pfn of the backend.

This allows the backend to perform direct_IO on these pages, but as a
side effect prevents the frontend from using get_user_pages_fast on
them while they are being shared with the backend.

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