SRU request submitted:
https://lists.ubuntu.com/archives/kernel-team/2018-December/097301.html
** Description changed:
- Description: kernel: zcrypt: reinit ap queue state machine
-
- Symptom: Zcrypt ap queue device not operational at host level after a
- kvm guest used it.
-
- Problem: The vfio device driver when receiving an ap queue device does
+ == SRU Justification ==
+ The vfio device driver when receiving an ap queue device does
additional resets thereby removing the registration for
- interrupts for the ap device done by the ap bus core
+ interrupts for the ap device done by the ap bus core
code. So when later the vfio driver releases the device and
one of the default zcrypt drivers takes care of the device
the interrupt registration needs to get renewed. The current
code does no renew and result is that requests send into such
a queue will never see a reply processed - the application
hangs.
+ This commit has also been cc'd to upstream stable.
+
+ == Fix ==
+ 104f708fd ("s390/zcrypt: reinit ap queue state machine during device probe")
+
+ == Regression Potential ==
+ Low. Limited to s390.
+
+
+ == Original Bug Description ==
+ Description: kernel: zcrypt: reinit ap queue state machine
+
+ Symptom: Zcrypt ap queue device not operational at host level after a
+ kvm guest used it.
+
+ Problem: The vfio device driver when receiving an ap queue device does
+ additional resets thereby removing the registration for
+ interrupts for the ap device done by the ap bus core
+ code. So when later the vfio driver releases the device and
+ one of the default zcrypt drivers takes care of the device
+ the interrupt registration needs to get renewed. The current
+ code does no renew and result is that requests send into such
+ a queue will never see a reply processed - the application
+ hangs.
+
Solution: This patch adds a function which resets the aq queue state
- machine for the ap queue device and triggers the walk through
- the initial states (which are reset and registration for
- interrupts). This function is now called before the driver's
- probe function is invoked.
- When the association between driver and device is released,
- the driver's remove function is called. The current
- implementation calls a ap queue function
- ap_queue_remove(). This invokation has been moved to the ap
- bus function to make the probe / remove pair for ap bus and
- drivers more symmetric.
+ machine for the ap queue device and triggers the walk through
+ the initial states (which are reset and registration for
+ interrupts). This function is now called before the driver's
+ probe function is invoked.
+ When the association between driver and device is released,
+ the driver's remove function is called. The current
+ implementation calls a ap queue function
+ ap_queue_remove(). This invokation has been moved to the ap
+ bus function to make the probe / remove pair for ap bus and
+ drivers more symmetric.
Reproduction: Set up an kvm guest to use one or more ap queues in
- pass-through mode. Start the guest. Stop the guest. Reassign
- the ap resources back to the host system. Run an application
- which uses exactly this ap resources. Without the fix, the
- application hangs; with the fix the application should run
- fine.
+ pass-through mode. Start the guest. Stop the guest. Reassign
+ the ap resources back to the host system. Run an application
+ which uses exactly this ap resources. Without the fix, the
+ application hangs; with the fix the application should run
+ fine.
- Upstream commit(s):
+ Upstream commit(s):
104f708fd1241b22f808bdf066ab67dc5a051de5
Available on kernel.org
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1805414
Title:
[Ubuntu] kernel: zcrypt: reinit ap queue state machine
Status in Ubuntu on IBM z Systems:
In Progress
Status in linux package in Ubuntu:
In Progress
Status in linux source package in Bionic:
In Progress
Status in linux source package in Cosmic:
In Progress
Status in linux source package in Disco:
In Progress
Bug description:
== SRU Justification ==
The vfio device driver when receiving an ap queue device does
additional resets thereby removing the registration for
interrupts for the ap device done by the ap bus core
code. So when later the vfio driver releases the device and
one of the default zcrypt drivers takes care of the device
the interrupt registration needs to get renewed. The current
code does no renew and result is that requests send into such
a queue will never see a reply processed - the application
hangs.
This commit has also been cc'd to upstream stable.
== Fix ==
104f708fd ("s390/zcrypt: reinit ap queue state machine during device probe")
== Regression Potential ==
Low. Limited to s390.
== Original Bug Description ==
Description: kernel: zcrypt: reinit ap queue state machine
Symptom: Zcrypt ap queue device not operational at host level after a
kvm guest used it.
Problem: The vfio device driver when receiving an ap queue device does
additional resets thereby removing the registration for
interrupts for the ap device done by the ap bus core
code. So when later the vfio driver releases the device and
one of the default zcrypt drivers takes care of the device
the interrupt registration needs to get renewed. The current
code does no renew and result is that requests send into such
a queue will never see a reply processed - the application
hangs.
Solution: This patch adds a function which resets the aq queue state
machine for the ap queue device and triggers the walk through
the initial states (which are reset and registration for
interrupts). This function is now called before the driver's
probe function is invoked.
When the association between driver and device is released,
the driver's remove function is called. The current
implementation calls a ap queue function
ap_queue_remove(). This invokation has been moved to the ap
bus function to make the probe / remove pair for ap bus and
drivers more symmetric.
Reproduction: Set up an kvm guest to use one or more ap queues in
pass-through mode. Start the guest. Stop the guest. Reassign
the ap resources back to the host system. Run an application
which uses exactly this ap resources. Without the fix, the
application hangs; with the fix the application should run
fine.
Upstream commit(s):
104f708fd1241b22f808bdf066ab67dc5a051de5
Available on kernel.org
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1805414/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp