Re: [PATCH] iotests: fix usage -machine accel= together with -accel option

2019-12-23 Thread Paolo Bonzini
On 23/12/19 08:43, Vladimir Sementsov-Ogievskiy wrote: > diff --git a/vl.c b/vl.c > index 86474a55c9..9fb859969c 100644 > --- a/vl.c > +++ b/vl.c > @@ -2779,7 +2779,7 @@ static void configure_accelerators(const char *progname) > for (tmp = accel_list; !accel_initialised && tmp && *tmp; tmp

Re: [PATCH] iotests: fix usage -machine accel= together with -accel option

2019-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2019 11:39, Paolo Bonzini wrote: > On 23/12/19 08:43, Vladimir Sementsov-Ogievskiy wrote: >> diff --git a/vl.c b/vl.c >> index 86474a55c9..9fb859969c 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -2779,7 +2779,7 @@ static void configure_accelerators(const char >> *progname) >> for (tmp

Re: [PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2019-12-23 Thread Vladimir Sementsov-Ogievskiy
23.12.2019 12:06, Eiichi Tsukata wrote: > bdrv_open_driver() allocates bs->opaque according to drv->instance_size. > There is no need to allocate it and overwrite opaque in > bdrv_backup_top_append(). > > Reproducer: > >$ QTEST_QEMU_BINARY=./x86_64-softmmu/qemu-system-x86_64 valgrind -q > --

[PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2019-12-23 Thread Eiichi Tsukata
bdrv_open_driver() allocates bs->opaque according to drv->instance_size. There is no need to allocate it and overwrite opaque in bdrv_backup_top_append(). Reproducer: $ QTEST_QEMU_BINARY=./x86_64-softmmu/qemu-system-x86_64 valgrind -q --leak-check=full tests/test-replication -p /replication/se

Re: [PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2019-12-23 Thread Eiichi Tsukata
On 2019/12/23 21:40, Vladimir Sementsov-Ogievskiy wrote: > 23.12.2019 12:06, Eiichi Tsukata wrote: >> bdrv_open_driver() allocates bs->opaque according to drv->instance_size. >> There is no need to allocate it and overwrite opaque in >> bdrv_backup_top_append(). >> >> Reproducer: >> >>$ QTES

[PULL v2 10/27] virtio: don't enable notifications during polling

2019-12-23 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Virtqueue notifications are not necessary during polling, so we disable them. This allows the guest driver to avoid MMIO vmexits. Unfortunately the virtio-blk and virtio-scsi handler functions re-enable notifications, defeating this optimization. Fix virtio-blk and virtio-

[PULL v2 26/27] virtio: make seg_max virtqueue size dependent

2019-12-23 Thread Michael S. Tsirkin
From: Denis Plotnikov Before the patch, seg_max parameter was immutable and hardcoded to 126 (128 - 2) without respect to queue size. This has two negative effects: 1. when queue size is < 128, we have Virtio 1.1 specfication violation: (2.6.5.3.1 Driver Requirements) seq_max must be <= queue

[PATCH v3 2/2] tests/ide-test: Create a single unit-test covering more PRDT cases

2019-12-23 Thread Alexander Popov
Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in ide_dma_cb() introduced in the commit a718978ed58a in July 2015. Currently this bug is not reproduced by the unit tests. Let's improve the ide-test to cover m

[PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test

2019-12-23 Thread Alexander Popov
Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in ide_dma_cb() introduced in the commit a718978ed58a in July 2015. This patch series fixes incorrect handling of some PRDTs in ide_dma_cb() and improves the ide

[PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb()

2019-12-23 Thread Alexander Popov
The commit a718978ed58a from July 2015 introduced the assertion which implies that the size of successful DMA transfers handled in ide_dma_cb() should be multiple of 512 (the size of a sector). But guest systems can initiate DMA transfers that don't fit this requirement. For fixing that let's chec

Re: [PATCH v2] iotests.py: Let wait_migration wait even more

2019-12-23 Thread John Snow
On 12/19/19 1:36 PM, Max Reitz wrote: > The "migration completed" event may be sent (on the source, to be > specific) before the migration is actually completed, so the VM runstate > will still be "finish-migrate" instead of "postmigrate". So ask the > users of VM.wait_migration() to specify th

Re: [PATCH] iotests/279: Fix for non-qcow2 formats

2019-12-23 Thread John Snow
On 12/19/19 9:42 AM, Max Reitz wrote: > First, driver=qcow2 will not work so well with non-qcow2 formats (and > this test claims to support qcow, qed, and vmdk). > > Second, vmdk will always report the backing file format to be vmdk. > Filter that out so the output looks like for all other form

Re: [PATCH v2 2/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb()

2019-12-23 Thread John Snow
On 12/19/19 10:01 AM, Kevin Wolf wrote: > Am 16.12.2019 um 19:14 hat Alexander Popov geschrieben: >> The commit a718978ed58a from July 2015 introduced the assertion which >> implies that the size of successful DMA transfers handled in ide_dma_cb() >> should be multiple of 512 (the size of a sect

Re: [PATCH v2 2/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb()

2019-12-23 Thread Alexander Popov
On 24.12.2019 03:20, John Snow wrote: > On 12/19/19 10:01 AM, Kevin Wolf wrote: >> >> John, what do you think? >> > > I've been out to lunch for a little while. There are some issues that I > recall with IDE, but couldn't find the time to fix prior to 4.2. Hello John. > I'll review all the outst