kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Eric Farman <farman@linux.ibm.com>
Cc: linux-s390@vger.kernel.org,
	Alex Williamson <alex.williamson@redhat.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	kvm@vger.kernel.org, Farhan Ali <alifm@linux.ibm.com>,
	qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
	qemu-s390x@nongnu.org
Subject: Re: [PATCH v3 2/2] vfio-ccw: support async command subregion
Date: Tue, 2 Apr 2019 15:42:42 +0200	[thread overview]
Message-ID: <20190402154242.789ebfde.cohuck@redhat.com> (raw)
In-Reply-To: <559babc4-5b67-37c7-eced-c350fc28baf6@linux.ibm.com>

On Thu, 21 Mar 2019 21:38:16 -0400
Eric Farman <farman@linux.ibm.com> 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 <cohuck@redhat.com>
> > ---
> >   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);
> >   }
> >   

  reply	other threads:[~2019-04-02 13:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01  9:39 [PATCH v3 0/2] vfio-ccw: support hsch/csch (QEMU part) Cornelia Huck
2019-03-01  9:39 ` [PATCH v3 1/2] vfio-ccw: new capability chain support Cornelia Huck
2019-03-21 20:19   ` Eric Farman
2019-03-01  9:39 ` [PATCH v3 2/2] vfio-ccw: support async command subregion Cornelia Huck
2019-03-22  1:38   ` Eric Farman
2019-04-02 13:42     ` Cornelia Huck [this message]
2019-03-22  1:49 ` [PATCH v3 0/2] vfio-ccw: support hsch/csch (QEMU part) Eric Farman
2019-04-02 13:44   ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190402154242.789ebfde.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=alifm@linux.ibm.com \
    --cc=farman@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).