Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes and cleanups from Michael Tsirkin:
"This fixes the virtio-test tool, and improves the error handling for
virtio-ccw"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio/s390: handle failures of READ_VQ_CONF ccw
tools/virtio: propagate V=X to kernel build
vhost: move features to core
tools/virtio: fix build after 4.2 changes

+31 -8
+9 -1
drivers/s390/virtio/virtio_ccw.c
··· 400 400 static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev, 401 401 struct ccw1 *ccw, int index) 402 402 { 403 + int ret; 404 + 403 405 vcdev->config_block->index = index; 404 406 ccw->cmd_code = CCW_CMD_READ_VQ_CONF; 405 407 ccw->flags = 0; 406 408 ccw->count = sizeof(struct vq_config_block); 407 409 ccw->cda = (__u32)(unsigned long)(vcdev->config_block); 408 - ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); 410 + ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); 411 + if (ret) 412 + return ret; 409 413 return vcdev->config_block->num; 410 414 } 411 415 ··· 507 503 goto out_err; 508 504 } 509 505 info->num = virtio_ccw_read_vq_conf(vcdev, ccw, i); 506 + if (info->num < 0) { 507 + err = info->num; 508 + goto out_err; 509 + } 510 510 size = PAGE_ALIGN(vring_size(info->num, KVM_VIRTIO_CCW_RING_ALIGN)); 511 511 info->queue = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); 512 512 if (info->queue == NULL) {
+1 -2
drivers/vhost/net.c
··· 61 61 enum { 62 62 VHOST_NET_FEATURES = VHOST_FEATURES | 63 63 (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | 64 - (1ULL << VIRTIO_NET_F_MRG_RXBUF) | 65 - (1ULL << VIRTIO_F_VERSION_1), 64 + (1ULL << VIRTIO_NET_F_MRG_RXBUF) 66 65 }; 67 66 68 67 enum {
+1 -3
drivers/vhost/scsi.c
··· 166 166 /* Note: can't set VIRTIO_F_VERSION_1 yet, since that implies ANY_LAYOUT. */ 167 167 enum { 168 168 VHOST_SCSI_FEATURES = VHOST_FEATURES | (1ULL << VIRTIO_SCSI_F_HOTPLUG) | 169 - (1ULL << VIRTIO_SCSI_F_T10_PI) | 170 - (1ULL << VIRTIO_F_ANY_LAYOUT) | 171 - (1ULL << VIRTIO_F_VERSION_1) 169 + (1ULL << VIRTIO_SCSI_F_T10_PI) 172 170 }; 173 171 174 172 #define VHOST_SCSI_MAX_TARGET 256
+3
drivers/vhost/test.c
··· 277 277 return -EFAULT; 278 278 return 0; 279 279 case VHOST_SET_FEATURES: 280 + printk(KERN_ERR "1\n"); 280 281 if (copy_from_user(&features, featurep, sizeof features)) 281 282 return -EFAULT; 283 + printk(KERN_ERR "2\n"); 282 284 if (features & ~VHOST_FEATURES) 283 285 return -EOPNOTSUPP; 286 + printk(KERN_ERR "3\n"); 284 287 return vhost_test_set_features(n, features); 285 288 case VHOST_RESET_OWNER: 286 289 return vhost_test_reset_owner(n);
+3 -1
drivers/vhost/vhost.h
··· 173 173 VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | 174 174 (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | 175 175 (1ULL << VIRTIO_RING_F_EVENT_IDX) | 176 - (1ULL << VHOST_F_LOG_ALL), 176 + (1ULL << VHOST_F_LOG_ALL) | 177 + (1ULL << VIRTIO_F_ANY_LAYOUT) | 178 + (1ULL << VIRTIO_F_VERSION_1) 177 179 }; 178 180 179 181 static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
+1 -1
tools/virtio/Makefile
··· 6 6 CFLAGS += -g -O2 -Werror -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE 7 7 vpath %.c ../../drivers/virtio ../../drivers/vhost 8 8 mod: 9 - ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test 9 + ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V} 10 10 .PHONY: all test mod clean 11 11 clean: 12 12 ${RM} *.o vringh_test virtio_test vhost_test/*.o vhost_test/.*.cmd \
+2
tools/virtio/asm/barrier.h
··· 3 3 #define mb() __sync_synchronize() 4 4 5 5 #define smp_mb() mb() 6 + # define dma_rmb() barrier() 7 + # define dma_wmb() barrier() 6 8 # define smp_rmb() barrier() 7 9 # define smp_wmb() barrier() 8 10 /* Weak barriers should be used. If not - it's a bug */
+3
tools/virtio/linux/export.h
··· 1 + #define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym 2 + #define EXPORT_SYMBOL(sym) extern typeof(sym) sym 3 +
+8
tools/virtio/linux/kernel.h
··· 22 22 23 23 typedef unsigned long long dma_addr_t; 24 24 typedef size_t __kernel_size_t; 25 + typedef unsigned int __wsum; 25 26 26 27 struct page { 27 28 unsigned long long dummy; ··· 47 46 if (__kmalloc_fake) 48 47 return __kmalloc_fake; 49 48 return malloc(s); 49 + } 50 + static inline void *kzalloc(size_t s, gfp_t gfp) 51 + { 52 + void *p = kmalloc(s, gfp); 53 + 54 + memset(p, 0, s); 55 + return p; 50 56 } 51 57 52 58 static inline void kfree(void *p)