From: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: cohuck@redhat.com, borntraeger@de.ibm.com,
bjsdjshi@linux.vnet.ibm.com,
Alex Williamson <alex.williamson@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] vfio/ccw: fix initialization of the Object DeviceState pointer in the common base-device
Date: Tue, 18 Jul 2017 03:49:26 +0200 [thread overview]
Message-ID: <20170718014926.44781-3-bjsdjshi@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170718014926.44781-1-bjsdjshi@linux.vnet.ibm.com>
Commit 7da624e2 ("vfio: Test realized when using VFIOGroup.device_list
iterator") introduced a pointer to the Object DeviceState in the VFIO
common base-device and skiped non-realized devices as we iterate
VFIOGroup.device_list. While it missed to initialize the pointer for
the vfio-ccw case. Let's fix it.
Fixes: 7da624e2 ("vfio: Test realized when using VFIOGroup.device_list
iterator")
Cc: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
---
hw/vfio/ccw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 8d97b53e77..a8baadf57a 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -338,6 +338,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
vcdev->vdev.name = g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid,
cdev->hostid.ssid, cdev->hostid.devid);
+ vcdev->vdev.dev = dev;
QLIST_FOREACH(vbasedev, &group->device_list, next) {
if (strcmp(vbasedev->name, vcdev->vdev.name) == 0) {
error_setg(&err, "vfio: subchannel %s has already been attached",
--
2.11.2
next prev parent reply other threads:[~2017-07-18 1:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 1:49 [Qemu-devel] [PATCH 0/2] vfio-ccw bugfixs Dong Jia Shi
2017-07-18 1:49 ` [Qemu-devel] [PATCH 1/2] vfio/ccw: allocate irq info with the right size Dong Jia Shi
2017-07-18 8:32 ` Cornelia Huck
2017-07-18 8:49 ` Dong Jia Shi
2017-07-18 9:07 ` Cornelia Huck
2017-07-19 0:32 ` Dong Jia Shi
2017-07-18 1:49 ` Dong Jia Shi [this message]
2017-07-18 2:26 ` [Qemu-devel] [PATCH 2/2] vfio/ccw: fix initialization of the Object DeviceState pointer in the common base-device Alex Williamson
2017-07-18 2:42 ` Dong Jia Shi
2017-07-18 8:37 ` Cornelia Huck
2017-07-18 9:26 ` [Qemu-devel] [PATCH 0/2] vfio-ccw bugfixs 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=20170718014926.44781-3-bjsdjshi@linux.vnet.ibm.com \
--to=bjsdjshi@linux.vnet.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=qemu-devel@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).