[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 2/8] vfio-ccw: Don't inject an I/O interrupt if the su
From: |
Cornelia Huck |
Subject: |
Re: [RFC PATCH v1 2/8] vfio-ccw: Don't inject an I/O interrupt if the subchannel is not enabled |
Date: |
Mon, 18 Nov 2019 19:23:10 +0100 |
On Fri, 15 Nov 2019 04:34:31 +0100
Eric Farman <address@hidden> wrote:
> From: Farhan Ali <address@hidden>
>
> According to PoPs, when the SCHIB.PMCW bit 8 is 0 status presented by
> the device is not made available to the program. So don't inject an
> interrupt in the guest if the guest OS has not enabled the
> subchannel.
Have you managed to trigger this state in real life?
>
> Signed-off-by: Farhan Ali <address@hidden>
> Signed-off-by: Eric Farman <address@hidden>
> ---
>
> Notes:
> v0->v1: [EF]
> - Update commit message, as the bit in question is bit 8 not 15
>
> hw/vfio/ccw.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index 0919ddbeb8..0590a6f512 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -230,6 +230,11 @@ static void vfio_ccw_io_notifier_handler(void *opaque)
> return;
> }
>
> + /* Virtual subchannel is not enabled */
> + if (!(schib->pmcw.flags & PMCW_FLAGS_MASK_ENA)) {
How can that happen? We should not be able to disable the subchannel
while it is in active use, should we? I fear I'm missing something
here...
> + return;
> + }
> +
> size = pread(vcdev->vdev.fd, region, vcdev->io_region_size,
> vcdev->io_region_offset);
> if (size == -1) {
- [RFC PATCH v1 0/8] s390x/vfio-ccw: Channel Path Handling, Eric Farman, 2019/11/14
- [RFC PATCH v1 3/8] linux-headers: update, Eric Farman, 2019/11/14
- [RFC PATCH v1 2/8] vfio-ccw: Don't inject an I/O interrupt if the subchannel is not enabled, Eric Farman, 2019/11/14
- Re: [RFC PATCH v1 2/8] vfio-ccw: Don't inject an I/O interrupt if the subchannel is not enabled,
Cornelia Huck <=
- [RFC PATCH v1 8/8] vfio-ccw: Add support for the CRW irq, Eric Farman, 2019/11/14
- [RFC PATCH v1 5/8] vfio-ccw: Add support for the schib region, Eric Farman, 2019/11/14
- [RFC PATCH v1 6/8] vfio-ccw: Add support for the crw region, Eric Farman, 2019/11/14
- [RFC PATCH v1 1/8] vfio-ccw: Return IOINST_CC_NOT_OPERATIONAL for EIO, Eric Farman, 2019/11/14