From: Farhan Ali <al...@linux.ibm.com> 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.
Signed-off-by: Farhan Ali <al...@linux.ibm.com> Signed-off-by: Eric Farman <far...@linux.ibm.com> --- 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)) { + return; + } + size = pread(vcdev->vdev.fd, region, vcdev->io_region_size, vcdev->io_region_offset); if (size == -1) { -- 2.17.1