ccw.c (4d285821c5055ed68a6f6b7693fd11a06a1aa426) ccw.c (aff92b828647839b956dfa647a18b3ce10058e6a)
1/*
2 * vfio based subchannel assignment support
3 *
4 * Copyright 2017 IBM Corp.
5 * Copyright 2019 Red Hat, Inc.
6 *
7 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
8 * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>

--- 560 unchanged lines hidden (view full) ---

569 error_setg(errp, "vfio: subchannel %s has already been attached",
570 name);
571 goto out_err;
572 }
573 }
574
575 /*
576 * All vfio-ccw devices are believed to operate in a way compatible with
1/*
2 * vfio based subchannel assignment support
3 *
4 * Copyright 2017 IBM Corp.
5 * Copyright 2019 Red Hat, Inc.
6 *
7 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
8 * Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>

--- 560 unchanged lines hidden (view full) ---

569 error_setg(errp, "vfio: subchannel %s has already been attached",
570 name);
571 goto out_err;
572 }
573 }
574
575 /*
576 * All vfio-ccw devices are believed to operate in a way compatible with
577 * memory ballooning, ie. pages pinned in the host are in the current
578 * working set of the guest driver and therefore never overlap with pages
579 * available to the guest balloon driver. This needs to be set before
580 * vfio_get_device() for vfio common to handle the balloon inhibitor.
577 * discarding of memory in RAM blocks, ie. pages pinned in the host are
578 * in the current working set of the guest driver and therefore never
579 * overlap e.g., with pages available to the guest balloon driver. This
580 * needs to be set before vfio_get_device() for vfio common to handle
581 * ram_block_discard_disable().
581 */
582 */
582 vcdev->vdev.balloon_allowed = true;
583 vcdev->vdev.ram_block_discard_allowed = true;
583
584 if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) {
585 goto out_err;
586 }
587
588 vcdev->vdev.ops = &vfio_ccw_ops;
589 vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
590 vcdev->vdev.name = name;

--- 158 unchanged lines hidden ---
584
585 if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) {
586 goto out_err;
587 }
588
589 vcdev->vdev.ops = &vfio_ccw_ops;
590 vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
591 vcdev->vdev.name = name;

--- 158 unchanged lines hidden ---