From 35569cea79fd3f5ccb5b23ca024c7d3aa4d24e75 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Thu, 7 Mar 2013 17:21:41 +0100 Subject: Allow virtio-net features for legacy s390 virtio bus Enable all virtio-net features for the legacy s390 virtio bus. This also fixes kernel BUG at /usr/src/packages/BUILD/kernel-default-3.0.58/linux-3.0/drivers/s390/kvm/kvm_virtio.c:121! Signed-off-by: Christian Borntraeger Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf --- hw/s390x/s390-virtio-bus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/s390x') diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 089ed92006..d9b7f83878 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bus.c @@ -402,6 +402,7 @@ static const VirtIOBindings virtio_s390_bindings = { static Property s390_virtio_net_properties[] = { DEFINE_NIC_PROPERTIES(VirtIOS390Device, nic), + DEFINE_VIRTIO_NET_FEATURES(VirtIOS390Device, host_features), DEFINE_PROP_UINT32("x-txtimer", VirtIOS390Device, net.txtimer, TX_TIMER_INTERVAL), DEFINE_PROP_INT32("x-txburst", VirtIOS390Device, -- cgit v1.2.3 From 38dd7cc776bbde7edbe60ba5d0abbd156e7e0f2f Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Fri, 22 Feb 2013 09:01:32 +0000 Subject: s390/css: Fix subchannel detection We have to consider the m bit to find the real channel subsystem when determining the last subchannel. If we fail to take this into account, removal of a subchannel in the middle of a big list of devices will stop device detection after a reboot. Signed-off-by: Christian Borntraeger Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck Signed-off-by: Alexander Graf --- hw/s390x/css.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'hw/s390x') diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 85f6f22a7f..e526a1c86c 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -988,15 +988,18 @@ int css_do_rchp(uint8_t cssid, uint8_t chpid) return 0; } -bool css_schid_final(uint8_t cssid, uint8_t ssid, uint16_t schid) +bool css_schid_final(int m, uint8_t cssid, uint8_t ssid, uint16_t schid) { SubchSet *set; + uint8_t real_cssid; - if (cssid > MAX_CSSID || ssid > MAX_SSID || !channel_subsys->css[cssid] || - !channel_subsys->css[cssid]->sch_set[ssid]) { + real_cssid = (!m && (cssid == 0)) ? channel_subsys->default_cssid : cssid; + if (real_cssid > MAX_CSSID || ssid > MAX_SSID || + !channel_subsys->css[real_cssid] || + !channel_subsys->css[real_cssid]->sch_set[ssid]) { return true; } - set = channel_subsys->css[cssid]->sch_set[ssid]; + set = channel_subsys->css[real_cssid]->sch_set[ssid]; return schid > find_last_bit(set->schids_used, (MAX_SCHID + 1) / sizeof(unsigned long)); } -- cgit v1.2.3 From 8a7df84f9ff4342cae30f4e515e6ac82a0eb0bea Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Fri, 22 Feb 2013 09:01:33 +0000 Subject: s390/virtio-ccw: remove redundant call to blockdev_mark_auto_del blockdev_mark_auto_del is already called in virtio-blk-exit. Remove the redundant call. Signed-off-by: Christian Borntraeger Signed-off-by: Jens Freimann Signed-off-by: Alexander Graf --- hw/s390x/virtio-ccw.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/s390x') diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index d92e42735c..a9cf703d53 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -585,7 +585,6 @@ static int virtio_ccw_blk_init(VirtioCcwDevice *dev) static int virtio_ccw_blk_exit(VirtioCcwDevice *dev) { virtio_blk_exit(dev->vdev); - blockdev_mark_auto_del(dev->blk.conf.bs); return virtio_ccw_exit(dev); } -- cgit v1.2.3