summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorEric Farman <farman@linux.ibm.com>2019-04-18 20:26:15 +0200
committerHeiko Carstens <hca@linux.ibm.com>2023-01-09 14:34:07 +0100
commit155a4321c117e29d174893127ae84cd84cacf0f3 (patch)
treec556e03f564e0e0d2986c001e1aa089af91b61e6 /drivers/s390
parent9fbed59fcd16e60dde2528038cc343abd65c0948 (diff)
downloadlinux-stable-155a4321c117e29d174893127ae84cd84cacf0f3.tar.gz
linux-stable-155a4321c117e29d174893127ae84cd84cacf0f3.tar.bz2
linux-stable-155a4321c117e29d174893127ae84cd84cacf0f3.zip
vfio/ccw: allow non-zero storage keys
Currently, vfio-ccw copies the ORB from the io_region to the channel_program struct being built. It then adjusts various pieces of that ORB to the values needed to be used by the SSCH issued by vfio-ccw in the host. This includes setting the subchannel key to the default, presumably because Linux doesn't do anything with non-zero storage keys itself. But it seems wrong to convert every I/O to the default key if the guest itself requested a non-zero subchannel (access) key. Any channel program that sets a non-zero key would expect the same key returned in the SCSW of the IRB, not zero, so best to allow that to occur unimpeded. Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/vfio_ccw_cp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/s390/cio/vfio_ccw_cp.c b/drivers/s390/cio/vfio_ccw_cp.c
index a0060ef1119e..268a90252521 100644
--- a/drivers/s390/cio/vfio_ccw_cp.c
+++ b/drivers/s390/cio/vfio_ccw_cp.c
@@ -836,7 +836,6 @@ union orb *cp_get_orb(struct channel_program *cp, struct subchannel *sch)
orb->cmd.intparm = (u32)virt_to_phys(sch);
orb->cmd.fmt = 1;
- orb->cmd.key = PAGE_DEFAULT_KEY >> 4;
if (orb->cmd.lpm == 0)
orb->cmd.lpm = sch->lpm;