Skip to content

Commit d470e9f

Browse files
committed
Merge tag 's390-6.10-8' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Heiko Carstens: - Fix and add physical to virtual address translations in dasd and virtio_ccw drivers. For virtio_ccw this is just a minimal fix. More code cleanup will follow. - Small defconfig updates * tag 's390-6.10-8' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: Fix invalid dereferencing of indirect CCW data pointer s390/vfio_ccw: Fix target addresses of TIC CCWs s390: Update defconfigs
2 parents 2d19be0 + b3a58f3 commit d470e9f

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

arch/s390/configs/debug_defconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,17 +601,16 @@ CONFIG_WATCHDOG=y
601601
CONFIG_WATCHDOG_NOWAYOUT=y
602602
CONFIG_SOFT_WATCHDOG=m
603603
CONFIG_DIAG288_WATCHDOG=m
604+
CONFIG_DRM=m
605+
CONFIG_DRM_VIRTIO_GPU=m
604606
CONFIG_FB=y
605607
# CONFIG_FB_DEVICE is not set
606-
CONFIG_FRAMEBUFFER_CONSOLE=y
607-
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
608608
# CONFIG_HID_SUPPORT is not set
609609
# CONFIG_USB_SUPPORT is not set
610610
CONFIG_INFINIBAND=m
611611
CONFIG_INFINIBAND_USER_ACCESS=m
612612
CONFIG_MLX4_INFINIBAND=m
613613
CONFIG_MLX5_INFINIBAND=m
614-
CONFIG_SYNC_FILE=y
615614
CONFIG_VFIO=m
616615
CONFIG_VFIO_PCI=m
617616
CONFIG_MLX5_VFIO_PCI=m

arch/s390/configs/defconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,17 +592,16 @@ CONFIG_WATCHDOG_CORE=y
592592
CONFIG_WATCHDOG_NOWAYOUT=y
593593
CONFIG_SOFT_WATCHDOG=m
594594
CONFIG_DIAG288_WATCHDOG=m
595+
CONFIG_DRM=m
596+
CONFIG_DRM_VIRTIO_GPU=m
595597
CONFIG_FB=y
596598
# CONFIG_FB_DEVICE is not set
597-
CONFIG_FRAMEBUFFER_CONSOLE=y
598-
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
599599
# CONFIG_HID_SUPPORT is not set
600600
# CONFIG_USB_SUPPORT is not set
601601
CONFIG_INFINIBAND=m
602602
CONFIG_INFINIBAND_USER_ACCESS=m
603603
CONFIG_MLX4_INFINIBAND=m
604604
CONFIG_MLX5_INFINIBAND=m
605-
CONFIG_SYNC_FILE=y
606605
CONFIG_VFIO=m
607606
CONFIG_VFIO_PCI=m
608607
CONFIG_MLX5_VFIO_PCI=m

drivers/s390/block/dasd_eckd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4906,7 +4906,7 @@ dasd_eckd_free_cp(struct dasd_ccw_req *cqr, struct request *req)
49064906
ccw++;
49074907
if (dst) {
49084908
if (ccw->flags & CCW_FLAG_IDA)
4909-
cda = *((char **)dma32_to_virt(ccw->cda));
4909+
cda = dma64_to_virt(*((dma64_t *)dma32_to_virt(ccw->cda)));
49104910
else
49114911
cda = dma32_to_virt(ccw->cda);
49124912
if (dst != cda) {
@@ -5525,7 +5525,7 @@ dasd_eckd_dump_ccw_range(struct dasd_device *device, struct ccw1 *from,
55255525

55265526
/* get pointer to data (consider IDALs) */
55275527
if (from->flags & CCW_FLAG_IDA)
5528-
datap = (char *)*((addr_t *)dma32_to_virt(from->cda));
5528+
datap = dma64_to_virt(*((dma64_t *)dma32_to_virt(from->cda)));
55295529
else
55305530
datap = dma32_to_virt(from->cda);
55315531

drivers/s390/block/dasd_fba.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ dasd_fba_free_cp(struct dasd_ccw_req *cqr, struct request *req)
585585
ccw++;
586586
if (dst) {
587587
if (ccw->flags & CCW_FLAG_IDA)
588-
cda = *((char **)dma32_to_virt(ccw->cda));
588+
cda = dma64_to_virt(*((dma64_t *)dma32_to_virt(ccw->cda)));
589589
else
590590
cda = dma32_to_virt(ccw->cda);
591591
if (dst != cda) {

drivers/s390/cio/vfio_ccw_cp.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,14 @@ static int ccwchain_fetch_tic(struct ccw1 *ccw,
490490
struct channel_program *cp)
491491
{
492492
struct ccwchain *iter;
493-
u32 cda, ccw_head;
493+
u32 offset, ccw_head;
494494

495495
list_for_each_entry(iter, &cp->ccwchain_list, next) {
496496
ccw_head = iter->ch_iova;
497497
if (is_cpa_within_range(ccw->cda, ccw_head, iter->ch_len)) {
498-
cda = (u64)iter->ch_ccw + dma32_to_u32(ccw->cda) - ccw_head;
499-
ccw->cda = u32_to_dma32(cda);
498+
/* Calculate offset of TIC target */
499+
offset = dma32_to_u32(ccw->cda) - ccw_head;
500+
ccw->cda = virt_to_dma32((void *)iter->ch_ccw + offset);
500501
return 0;
501502
}
502503
}
@@ -914,7 +915,7 @@ void cp_update_scsw(struct channel_program *cp, union scsw *scsw)
914915
* in the ioctl directly. Path status changes etc.
915916
*/
916917
list_for_each_entry(chain, &cp->ccwchain_list, next) {
917-
ccw_head = (u32)(u64)chain->ch_ccw;
918+
ccw_head = dma32_to_u32(virt_to_dma32(chain->ch_ccw));
918919
/*
919920
* On successful execution, cpa points just beyond the end
920921
* of the chain.

0 commit comments

Comments
 (0)