Skip to content

Commit df3d92e

Browse files
committed
Merge: Fix virtio-gpu call traces in recent kernels on s390x
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/65 JIRA: https://issues.redhat.com/browse/RHEL-69815 Fix call traces that occur when using a virtio-gpu device in KVM guests on s390x. Signed-off-by: Thomas Huth <thuth@redhat.com> Resolves: RHEL-69815 Approved-by: Cédric Le Goater <clg@redhat.com> Approved-by: Cornelia Huck <cohuck@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents 843c482 + 188281e commit df3d92e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/s390/virtio/virtio_ccw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ struct virtio_ccw_device {
5858
struct virtio_device vdev;
5959
__u8 config[VIRTIO_CCW_CONFIG_SIZE];
6060
struct ccw_device *cdev;
61+
/* we make cdev->dev.dma_parms point to this */
62+
struct device_dma_parameters dma_parms;
6163
__u32 curr_io;
6264
int err;
6365
unsigned int revision; /* Transport revision */
@@ -1303,6 +1305,7 @@ static int virtio_ccw_offline(struct ccw_device *cdev)
13031305
unregister_virtio_device(&vcdev->vdev);
13041306
spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
13051307
dev_set_drvdata(&cdev->dev, NULL);
1308+
cdev->dev.dma_parms = NULL;
13061309
spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
13071310
return 0;
13081311
}
@@ -1366,6 +1369,7 @@ static int virtio_ccw_online(struct ccw_device *cdev)
13661369
}
13671370
vcdev->vdev.dev.parent = &cdev->dev;
13681371
vcdev->cdev = cdev;
1372+
cdev->dev.dma_parms = &vcdev->dma_parms;
13691373
vcdev->dma_area = ccw_device_dma_zalloc(vcdev->cdev,
13701374
sizeof(*vcdev->dma_area),
13711375
&vcdev->dma_area_addr);

0 commit comments

Comments
 (0)