<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/xen, branch v3.14.64</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>xen/gntdev: Grant maps should not be subject to NUMA balancing</title>
<updated>2016-01-29T05:57:04+00:00</updated>
<author>
<name>Boris Ostrovsky</name>
<email>boris.ostrovsky@oracle.com</email>
</author>
<published>2015-11-10T20:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1ed23a9f93ba8b696a232ac9791025422ee0c45b'/>
<id>1ed23a9f93ba8b696a232ac9791025422ee0c45b</id>
<content type='text'>
commit 9c17d96500f78d7ecdb71ca6942830158bc75a2b upstream.

Doing so will cause the grant to be unmapped and then, during
fault handling, the fault to be mistakenly treated as NUMA hint
fault.

In addition, even if those maps could partcipate in NUMA
balancing, it wouldn't provide any benefit since we are unable
to determine physical page's node (even if/when VNUMA is
implemented).

Marking grant maps' VMAs as VM_IO will exclude them from being
part of NUMA balancing.

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9c17d96500f78d7ecdb71ca6942830158bc75a2b upstream.

Doing so will cause the grant to be unmapped and then, during
fault handling, the fault to be mistakenly treated as NUMA hint
fault.

In addition, even if those maps could partcipate in NUMA
balancing, it wouldn't provide any benefit since we are unable
to determine physical page's node (even if/when VNUMA is
implemented).

Marking grant maps' VMAs as VM_IO will exclude them from being
part of NUMA balancing.

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/gntdev: convert priv-&gt;lock to a mutex</title>
<updated>2015-10-01T09:36:15+00:00</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@citrix.com</email>
</author>
<published>2015-01-09T18:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=e254330e799f2745c6cb929c0df99644e5790d05'/>
<id>e254330e799f2745c6cb929c0df99644e5790d05</id>
<content type='text'>
commit 1401c00e59ea021c575f74612fe2dbba36d6a4ee upstream.

Unmapping may require sleeping and we unmap while holding priv-&gt;lock, so
convert it to a mutex.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Reviewed-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1401c00e59ea021c575f74612fe2dbba36d6a4ee upstream.

Unmapping may require sleeping and we unmap while holding priv-&gt;lock, so
convert it to a mutex.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Reviewed-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/gntdevt: Fix race condition in gntdev_release()</title>
<updated>2015-08-17T03:51:49+00:00</updated>
<author>
<name>Marek Marczykowski-Górecki</name>
<email>marmarek@invisiblethingslab.com</email>
</author>
<published>2015-06-26T01:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9e6c072a69d87100808d16279d60e9f857291340'/>
<id>9e6c072a69d87100808d16279d60e9f857291340</id>
<content type='text'>
commit 30b03d05e07467b8c6ec683ea96b5bffcbcd3931 upstream.

While gntdev_release() is called the MMU notifier is still registered
and can traverse priv-&gt;maps list even if no pages are mapped (which is
the case -- gntdev_release() is called after all). But
gntdev_release() will clear that list, so make sure that only one of
those things happens at the same time.

Signed-off-by: Marek Marczykowski-Górecki &lt;marmarek@invisiblethingslab.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 30b03d05e07467b8c6ec683ea96b5bffcbcd3931 upstream.

While gntdev_release() is called the MMU notifier is still registered
and can traverse priv-&gt;maps list even if no pages are mapped (which is
the case -- gntdev_release() is called after all). But
gntdev_release() will clear that list, so make sure that only one of
those things happens at the same time.

Signed-off-by: Marek Marczykowski-Górecki &lt;marmarek@invisiblethingslab.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/events: don't bind non-percpu VIRQs with percpu chip</title>
<updated>2015-06-06T15:19:32+00:00</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@citrix.com</email>
</author>
<published>2015-05-19T17:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8d3cbb90968e6fc0114b6666d393ad968eaeb16a'/>
<id>8d3cbb90968e6fc0114b6666d393ad968eaeb16a</id>
<content type='text'>
commit 77bb3dfdc0d554befad58fdefbc41be5bc3ed38a upstream.

A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
VCPU than it is bound to.  This can result in a race between
handle_percpu_irq() and removing the action in __free_irq() because
handle_percpu_irq() does not take desc-&gt;lock.  The interrupt handler
sees a NULL action and oopses.

Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).

  # cat /proc/interrupts | grep virq
   40:      87246          0  xen-percpu-virq      timer0
   44:          0          0  xen-percpu-virq      debug0
   47:          0      20995  xen-percpu-virq      timer1
   51:          0          0  xen-percpu-virq      debug1
   69:          0          0   xen-dyn-virq      xen-pcpu
   74:          0          0   xen-dyn-virq      mce
   75:         29          0   xen-dyn-virq      hvc_console

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 77bb3dfdc0d554befad58fdefbc41be5bc3ed38a upstream.

A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
VCPU than it is bound to.  This can result in a race between
handle_percpu_irq() and removing the action in __free_irq() because
handle_percpu_irq() does not take desc-&gt;lock.  The interrupt handler
sees a NULL action and oopses.

Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).

  # cat /proc/interrupts | grep virq
   40:      87246          0  xen-percpu-virq      timer0
   44:          0          0  xen-percpu-virq      debug0
   47:          0      20995  xen-percpu-virq      timer1
   51:          0          0  xen-percpu-virq      debug1
   69:          0          0   xen-dyn-virq      xen-pcpu
   74:          0          0   xen-dyn-virq      mce
   75:         29          0   xen-dyn-virq      hvc_console

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/events: Set irq_info-&gt;evtchn before binding the channel to CPU in __startup_pirq()</title>
<updated>2015-05-17T16:53:49+00:00</updated>
<author>
<name>Boris Ostrovsky</name>
<email>boris.ostrovsky@oracle.com</email>
</author>
<published>2015-04-29T21:10:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8b5006e44303d157cc6a280240ab48a3badbd760'/>
<id>8b5006e44303d157cc6a280240ab48a3badbd760</id>
<content type='text'>
commit 16e6bd5970c88a2ac018b84a5f1dd5c2ff1fdf2c upstream.

.. because bind_evtchn_to_cpu(evtchn, cpu) will map evtchn to
'info' and pass 'info' down to xen_evtchn_port_bind_to_cpu().

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Tested-by: Annie Li &lt;annie.li@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 16e6bd5970c88a2ac018b84a5f1dd5c2ff1fdf2c upstream.

.. because bind_evtchn_to_cpu(evtchn, cpu) will map evtchn to
'info' and pass 'info' down to xen_evtchn_port_bind_to_cpu().

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Tested-by: Annie Li &lt;annie.li@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/events: Clear cpu_evtchn_mask before resuming</title>
<updated>2015-05-17T16:53:49+00:00</updated>
<author>
<name>Boris Ostrovsky</name>
<email>boris.ostrovsky@oracle.com</email>
</author>
<published>2015-04-29T21:10:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1d7bed845185dfc8caf66c0b200b69d83741712f'/>
<id>1d7bed845185dfc8caf66c0b200b69d83741712f</id>
<content type='text'>
commit 5cec98834989a014a9560b1841649eaca95cf00e upstream.

When a guest is resumed, the hypervisor may change event channel
assignments. If this happens and the guest uses 2-level events it
is possible for the interrupt to be claimed by wrong VCPU since
cpu_evtchn_mask bits may be stale. This can happen even though
evtchn_2l_bind_to_cpu() attempts to clear old bits: irq_info that
is passed in is not necessarily the original one (from pre-migration
times) but instead is freshly allocated during resume and so any
information about which CPU the channel was bound to is lost.

Thus we should clear the mask during resume.

We also need to make sure that bits for xenstore and console channels
are set when these two subsystems are resumed. While rebind_evtchn_irq()
(which is invoked for both of them on a resume) calls irq_set_affinity(),
the latter will in fact postpone setting affinity until handling the
interrupt. But because cpu_evtchn_mask will have bits for these two
cleared we won't be able to take the interrupt.

With that in mind, we need to bind those two channels explicitly in
rebind_evtchn_irq(). We will keep irq_set_affinity() so that we have a
pass through generic irq affinity code later, in case something needs
to be updated there as well.

(Also replace cpumask_of(0) with cpumask_of(info-&gt;cpu) in
rebind_evtchn_irq(): it should be set to zero in preceding
xen_irq_info_evtchn_setup().)

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Reported-by: Annie Li &lt;annie.li@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5cec98834989a014a9560b1841649eaca95cf00e upstream.

When a guest is resumed, the hypervisor may change event channel
assignments. If this happens and the guest uses 2-level events it
is possible for the interrupt to be claimed by wrong VCPU since
cpu_evtchn_mask bits may be stale. This can happen even though
evtchn_2l_bind_to_cpu() attempts to clear old bits: irq_info that
is passed in is not necessarily the original one (from pre-migration
times) but instead is freshly allocated during resume and so any
information about which CPU the channel was bound to is lost.

Thus we should clear the mask during resume.

We also need to make sure that bits for xenstore and console channels
are set when these two subsystems are resumed. While rebind_evtchn_irq()
(which is invoked for both of them on a resume) calls irq_set_affinity(),
the latter will in fact postpone setting affinity until handling the
interrupt. But because cpu_evtchn_mask will have bits for these two
cleared we won't be able to take the interrupt.

With that in mind, we need to bind those two channels explicitly in
rebind_evtchn_irq(). We will keep irq_set_affinity() so that we have a
pass through generic irq affinity code later, in case something needs
to be updated there as well.

(Also replace cpumask_of(0) with cpumask_of(info-&gt;cpu) in
rebind_evtchn_irq(): it should be set to zero in preceding
xen_irq_info_evtchn_setup().)

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Reported-by: Annie Li &lt;annie.li@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen-pciback: limit guest control of command register</title>
<updated>2015-03-26T14:06:57+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2015-03-11T13:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9cb8c24e612f1724fa85872205a1dfae7603d874'/>
<id>9cb8c24e612f1724fa85872205a1dfae7603d874</id>
<content type='text'>
commit af6fc858a35b90e89ea7a7ee58e66628c55c776b upstream.

Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal to the
host.

Note that to alter any of the bits collected together as
PCI_COMMAND_GUEST permissive mode is now required to be enabled
globally or on the specific device.

This is CVE-2015-2150 / XSA-120.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit af6fc858a35b90e89ea7a7ee58e66628c55c776b upstream.

Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal to the
host.

Note that to alter any of the bits collected together as
PCI_COMMAND_GUEST permissive mode is now required to be enabled
globally or on the specific device.

This is CVE-2015-2150 / XSA-120.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/events: avoid NULL pointer dereference in dom0 on large machines</title>
<updated>2015-03-26T14:06:56+00:00</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2015-02-26T05:52:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a5b8311fe0adc3d83b353c8e13899ea71bc51723'/>
<id>a5b8311fe0adc3d83b353c8e13899ea71bc51723</id>
<content type='text'>
commit 85e40b0539b24518c8bdf63e2605c8522377d00f upstream.

Using the pvops kernel a NULL pointer dereference was detected on a
large machine (144 processors) when booting as dom0 in
evtchn_fifo_unmask() during assignment of a pirq.

The event channel in question was the first to need a new entry in
event_array[] in events_fifo.c. Unfortunately xen_irq_info_pirq_setup()
is called with evtchn being 0 for a new pirq and the real event channel
number is assigned to the pirq only during __startup_pirq().

It is mandatory to call xen_evtchn_port_setup() after assigning the
event channel number to the pirq to make sure all memory needed for the
event channel is allocated.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 85e40b0539b24518c8bdf63e2605c8522377d00f upstream.

Using the pvops kernel a NULL pointer dereference was detected on a
large machine (144 processors) when booting as dom0 in
evtchn_fifo_unmask() during assignment of a pirq.

The event channel in question was the first to need a new entry in
event_array[] in events_fifo.c. Unfortunately xen_irq_info_pirq_setup()
is called with evtchn being 0 for a new pirq and the real event channel
number is assigned to the pirq only during __startup_pirq().

It is mandatory to call xen_evtchn_port_setup() after assigning the
event channel number to the pirq to make sure all memory needed for the
event channel is allocated.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>xen/manage: Fix USB interaction issues when resuming</title>
<updated>2015-03-06T22:43:24+00:00</updated>
<author>
<name>Ross Lagerwall</name>
<email>ross.lagerwall@citrix.com</email>
</author>
<published>2015-01-19T13:19:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=053987b6e09119b5d323f720941670b8d878a776'/>
<id>053987b6e09119b5d323f720941670b8d878a776</id>
<content type='text'>
commit 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 upstream.

Commit 61a734d305e1 ("xen/manage: Always freeze/thaw processes when
suspend/resuming") ensured that userspace processes were always frozen
before suspending to reduce interaction issues when resuming devices.
However, freeze_processes() does not freeze kernel threads.  Freeze
kernel threads as well to prevent deadlocks with the khubd thread when
resuming devices.

This is what native suspend and resume does.

Example deadlock:
[ 7279.648010]  [&lt;ffffffff81446bde&gt;] ? xen_poll_irq_timeout+0x3e/0x50
[ 7279.648010]  [&lt;ffffffff81448d60&gt;] xen_poll_irq+0x10/0x20
[ 7279.648010]  [&lt;ffffffff81011723&gt;] xen_lock_spinning+0xb3/0x120
[ 7279.648010]  [&lt;ffffffff810115d1&gt;] __raw_callee_save_xen_lock_spinning+0x11/0x20
[ 7279.648010]  [&lt;ffffffff815620b6&gt;] ? usb_control_msg+0xe6/0x120
[ 7279.648010]  [&lt;ffffffff81747e50&gt;] ? _raw_spin_lock_irq+0x50/0x60
[ 7279.648010]  [&lt;ffffffff8174522c&gt;] wait_for_completion+0xac/0x160
[ 7279.648010]  [&lt;ffffffff8109c520&gt;] ? try_to_wake_up+0x2c0/0x2c0
[ 7279.648010]  [&lt;ffffffff814b60f2&gt;] dpm_wait+0x32/0x40
[ 7279.648010]  [&lt;ffffffff814b6eb0&gt;] device_resume+0x90/0x210
[ 7279.648010]  [&lt;ffffffff814b7d71&gt;] dpm_resume+0x121/0x250
[ 7279.648010]  [&lt;ffffffff8144c570&gt;] ? xenbus_dev_request_and_reply+0xc0/0xc0
[ 7279.648010]  [&lt;ffffffff814b80d5&gt;] dpm_resume_end+0x15/0x30
[ 7279.648010]  [&lt;ffffffff81449fba&gt;] do_suspend+0x10a/0x200
[ 7279.648010]  [&lt;ffffffff8144a2f0&gt;] ? xen_pre_suspend+0x20/0x20
[ 7279.648010]  [&lt;ffffffff8144a1d0&gt;] shutdown_handler+0x120/0x150
[ 7279.648010]  [&lt;ffffffff8144c60f&gt;] xenwatch_thread+0x9f/0x160
[ 7279.648010]  [&lt;ffffffff810ac510&gt;] ? finish_wait+0x80/0x80
[ 7279.648010]  [&lt;ffffffff8108d189&gt;] kthread+0xc9/0xe0
[ 7279.648010]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80
[ 7279.648010]  [&lt;ffffffff8175087c&gt;] ret_from_fork+0x7c/0xb0
[ 7279.648010]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80

[ 7441.216287] INFO: task khubd:89 blocked for more than 120 seconds.
[ 7441.219457]       Tainted: G            X 3.13.11-ckt12.kz #1
[ 7441.222176] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 7441.225827] khubd           D ffff88003f433440     0    89      2 0x00000000
[ 7441.229258]  ffff88003ceb9b98 0000000000000046 ffff88003ce83000 0000000000013440
[ 7441.232959]  ffff88003ceb9fd8 0000000000013440 ffff88003cd13000 ffff88003ce83000
[ 7441.236658]  0000000000000286 ffff88003d3e0000 ffff88003ceb9bd0 00000001001aa01e
[ 7441.240415] Call Trace:
[ 7441.241614]  [&lt;ffffffff817442f9&gt;] schedule+0x29/0x70
[ 7441.243930]  [&lt;ffffffff81743406&gt;] schedule_timeout+0x166/0x2c0
[ 7441.246681]  [&lt;ffffffff81075b80&gt;] ? call_timer_fn+0x110/0x110
[ 7441.249339]  [&lt;ffffffff8174357e&gt;] schedule_timeout_uninterruptible+0x1e/0x20
[ 7441.252644]  [&lt;ffffffff81077710&gt;] msleep+0x20/0x30
[ 7441.254812]  [&lt;ffffffff81555f00&gt;] hub_port_reset+0xf0/0x580
[ 7441.257400]  [&lt;ffffffff81558465&gt;] hub_port_init+0x75/0xb40
[ 7441.259981]  [&lt;ffffffff814bb3c9&gt;] ? update_autosuspend+0x39/0x60
[ 7441.262817]  [&lt;ffffffff814bb4f0&gt;] ? pm_runtime_set_autosuspend_delay+0x50/0xa0
[ 7441.266212]  [&lt;ffffffff8155a64a&gt;] hub_thread+0x71a/0x1750
[ 7441.268728]  [&lt;ffffffff810ac510&gt;] ? finish_wait+0x80/0x80
[ 7441.271272]  [&lt;ffffffff81559f30&gt;] ? usb_port_resume+0x670/0x670
[ 7441.274067]  [&lt;ffffffff8108d189&gt;] kthread+0xc9/0xe0
[ 7441.276305]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80
[ 7441.279131]  [&lt;ffffffff8175087c&gt;] ret_from_fork+0x7c/0xb0
[ 7441.281659]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80

Signed-off-by: Ross Lagerwall &lt;ross.lagerwall@citrix.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 upstream.

Commit 61a734d305e1 ("xen/manage: Always freeze/thaw processes when
suspend/resuming") ensured that userspace processes were always frozen
before suspending to reduce interaction issues when resuming devices.
However, freeze_processes() does not freeze kernel threads.  Freeze
kernel threads as well to prevent deadlocks with the khubd thread when
resuming devices.

This is what native suspend and resume does.

Example deadlock:
[ 7279.648010]  [&lt;ffffffff81446bde&gt;] ? xen_poll_irq_timeout+0x3e/0x50
[ 7279.648010]  [&lt;ffffffff81448d60&gt;] xen_poll_irq+0x10/0x20
[ 7279.648010]  [&lt;ffffffff81011723&gt;] xen_lock_spinning+0xb3/0x120
[ 7279.648010]  [&lt;ffffffff810115d1&gt;] __raw_callee_save_xen_lock_spinning+0x11/0x20
[ 7279.648010]  [&lt;ffffffff815620b6&gt;] ? usb_control_msg+0xe6/0x120
[ 7279.648010]  [&lt;ffffffff81747e50&gt;] ? _raw_spin_lock_irq+0x50/0x60
[ 7279.648010]  [&lt;ffffffff8174522c&gt;] wait_for_completion+0xac/0x160
[ 7279.648010]  [&lt;ffffffff8109c520&gt;] ? try_to_wake_up+0x2c0/0x2c0
[ 7279.648010]  [&lt;ffffffff814b60f2&gt;] dpm_wait+0x32/0x40
[ 7279.648010]  [&lt;ffffffff814b6eb0&gt;] device_resume+0x90/0x210
[ 7279.648010]  [&lt;ffffffff814b7d71&gt;] dpm_resume+0x121/0x250
[ 7279.648010]  [&lt;ffffffff8144c570&gt;] ? xenbus_dev_request_and_reply+0xc0/0xc0
[ 7279.648010]  [&lt;ffffffff814b80d5&gt;] dpm_resume_end+0x15/0x30
[ 7279.648010]  [&lt;ffffffff81449fba&gt;] do_suspend+0x10a/0x200
[ 7279.648010]  [&lt;ffffffff8144a2f0&gt;] ? xen_pre_suspend+0x20/0x20
[ 7279.648010]  [&lt;ffffffff8144a1d0&gt;] shutdown_handler+0x120/0x150
[ 7279.648010]  [&lt;ffffffff8144c60f&gt;] xenwatch_thread+0x9f/0x160
[ 7279.648010]  [&lt;ffffffff810ac510&gt;] ? finish_wait+0x80/0x80
[ 7279.648010]  [&lt;ffffffff8108d189&gt;] kthread+0xc9/0xe0
[ 7279.648010]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80
[ 7279.648010]  [&lt;ffffffff8175087c&gt;] ret_from_fork+0x7c/0xb0
[ 7279.648010]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80

[ 7441.216287] INFO: task khubd:89 blocked for more than 120 seconds.
[ 7441.219457]       Tainted: G            X 3.13.11-ckt12.kz #1
[ 7441.222176] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 7441.225827] khubd           D ffff88003f433440     0    89      2 0x00000000
[ 7441.229258]  ffff88003ceb9b98 0000000000000046 ffff88003ce83000 0000000000013440
[ 7441.232959]  ffff88003ceb9fd8 0000000000013440 ffff88003cd13000 ffff88003ce83000
[ 7441.236658]  0000000000000286 ffff88003d3e0000 ffff88003ceb9bd0 00000001001aa01e
[ 7441.240415] Call Trace:
[ 7441.241614]  [&lt;ffffffff817442f9&gt;] schedule+0x29/0x70
[ 7441.243930]  [&lt;ffffffff81743406&gt;] schedule_timeout+0x166/0x2c0
[ 7441.246681]  [&lt;ffffffff81075b80&gt;] ? call_timer_fn+0x110/0x110
[ 7441.249339]  [&lt;ffffffff8174357e&gt;] schedule_timeout_uninterruptible+0x1e/0x20
[ 7441.252644]  [&lt;ffffffff81077710&gt;] msleep+0x20/0x30
[ 7441.254812]  [&lt;ffffffff81555f00&gt;] hub_port_reset+0xf0/0x580
[ 7441.257400]  [&lt;ffffffff81558465&gt;] hub_port_init+0x75/0xb40
[ 7441.259981]  [&lt;ffffffff814bb3c9&gt;] ? update_autosuspend+0x39/0x60
[ 7441.262817]  [&lt;ffffffff814bb4f0&gt;] ? pm_runtime_set_autosuspend_delay+0x50/0xa0
[ 7441.266212]  [&lt;ffffffff8155a64a&gt;] hub_thread+0x71a/0x1750
[ 7441.268728]  [&lt;ffffffff810ac510&gt;] ? finish_wait+0x80/0x80
[ 7441.271272]  [&lt;ffffffff81559f30&gt;] ? usb_port_resume+0x670/0x670
[ 7441.274067]  [&lt;ffffffff8108d189&gt;] kthread+0xc9/0xe0
[ 7441.276305]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80
[ 7441.279131]  [&lt;ffffffff8175087c&gt;] ret_from_fork+0x7c/0xb0
[ 7441.281659]  [&lt;ffffffff8108d0c0&gt;] ? flush_kthread_worker+0x80/0x80

Signed-off-by: Ross Lagerwall &lt;ross.lagerwall@citrix.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single"</title>
<updated>2015-01-30T01:40:50+00:00</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@citrix.com</email>
</author>
<published>2014-12-10T14:48:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=98047ad0dcb515a19dec0d9179ef3f7c0c0f3cee'/>
<id>98047ad0dcb515a19dec0d9179ef3f7c0c0f3cee</id>
<content type='text'>
commit dbdd74763f1faf799fbb9ed30423182e92919378 upstream.

This reverts commit 2c3fc8d26dd09b9d7069687eead849ee81c78e46.

This commit broke on x86 PV because entries in the generic SWIOTLB are
indexed using (pseudo-)physical address not DMA address and these are
not the same in a x86 PV guest.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Reviewed-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit dbdd74763f1faf799fbb9ed30423182e92919378 upstream.

This reverts commit 2c3fc8d26dd09b9d7069687eead849ee81c78e46.

This commit broke on x86 PV because entries in the generic SWIOTLB are
indexed using (pseudo-)physical address not DMA address and these are
not the same in a x86 PV guest.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Reviewed-by: Stefano Stabellini &lt;stefano.stabellini@eu.citrix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
