[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v3 2/2] vfio-ccw: support async command subregio
From: |
Cornelia Huck |
Subject: |
Re: [qemu-s390x] [PATCH v3 2/2] vfio-ccw: support async command subregion |
Date: |
Tue, 2 Apr 2019 15:42:42 +0200 |
On Thu, 21 Mar 2019 21:38:16 -0400
Eric Farman <address@hidden> wrote:
> On 3/1/19 4:39 AM, Cornelia Huck wrote:
> > A vfio-ccw device may provide an async command subregion for
> > issuing halt/clear subchannel requests. If it is present, use
> > it for sending halt/clear request to the device; if not, fall
> > back to emulation (as done today).
> >
> > Signed-off-by: Cornelia Huck <address@hidden>
> > ---
> > hw/s390x/css.c | 27 +++++++--
> > hw/vfio/ccw.c | 109 +++++++++++++++++++++++++++++++++++-
> > include/hw/s390x/s390-ccw.h | 3 +
> > 3 files changed, 133 insertions(+), 6 deletions(-)
> > @@ -307,6 +398,20 @@ static void vfio_ccw_get_region(VFIOCCWDevice *vcdev,
> > Error **errp)
> > vcdev->io_region_offset = info->offset;
> > vcdev->io_region = g_malloc0(info->size);
> >
> > + /* check for the optional async command region */
> > + ret = vfio_get_dev_region_info(vdev, VFIO_REGION_TYPE_CCW,
> > + VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD,
> > &info);
> > + if (!ret) {
> > + vcdev->async_cmd_region_size = info->size;
> > + if (sizeof(*vcdev->async_cmd_region) !=
> > vcdev->async_cmd_region_size) {
> > + error_setg(errp, "vfio: Unexpected size of the async cmd
> > region");
> > + g_free(info);
> > + return;
> > + }
> > + vcdev->async_cmd_region_offset = info->offset;
> > + vcdev->async_cmd_region = g_malloc0(info->size);
>
> Probably need to g_free() this in vfio_ccw_put_region()
Ah yes, thanks. Will add.
>
> > + }
> > +
> > g_free(info);
> > }
> >
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [qemu-s390x] [PATCH v3 2/2] vfio-ccw: support async command subregion,
Cornelia Huck <=