diff options
author | Tony Krowiak | 2019-12-11 15:35:54 -0500 |
---|---|---|
committer | Alexander Gordeev | 2022-07-19 16:18:09 +0200 |
commit | 49b0109fb399b78a424d76485194202f290bdece (patch) | |
tree | 1923c66fbd1f787d09cb93e259fd24fd03110303 /drivers/s390/crypto/zcrypt_debug.h | |
parent | 11cb2419fafe67f5ab965e2958475bce43c1529a (diff) |
s390/vfio-ap: introduce shadow APCB
The APCB is a field within the CRYCB that provides the AP configuration
to a KVM guest. Let's introduce a shadow copy of the KVM guest's APCB and
maintain it for the lifespan of the guest.
The shadow APCB serves the following purposes:
1. The shadow APCB can be maintained even when the mediated device is not
currently in use by a KVM guest. Since the mediated device's AP
configuration is filtered to ensure that no AP queues are passed through
to the KVM guest that are not bound to the vfio_ap device driver or
available to the host, the mediated device's AP configuration may differ
from the guest's. Having a shadow of a guest's APCB allows us to provide
a sysfs interface to view the guest's APCB even if the mediated device
is not currently passed through to a KVM guest. This can aid in
problem determination when the guest is unexpectedly missing AP
resources.
2. If filtering was done in-place for the real APCB, the guest could pick
up a transient state. Doing the filtering on a shadow and transferring
the AP configuration to the real APCB after the guest is started or when
AP resources are assigned to or unassigned from the mediated device, or
when the host configuration changes, the guest's AP configuration will
never be in a transient state.
Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_debug.h')
0 files changed, 0 insertions, 0 deletions