[PULL v3 06/15] vhost: recheck dev state in the vhost_migration_log routine

2020-09-21 Thread Michael S. Tsirkin
-Id: <9fbfba06791a87813fcee3e2315f0b904cc6789a.1599813294.git.dimas...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-user-blk.h | 10 ++ hw/block/vhost-user-blk.c | 19 --- hw/virtio/v

[PULL v2 06/15] vhost: recheck dev state in the vhost_migration_log routine

2020-09-18 Thread Michael S. Tsirkin
-Id: <9fbfba06791a87813fcee3e2315f0b904cc6789a.1599813294.git.dimas...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-user-blk.h | 10 ++ hw/block/vhost-user-blk.c | 19 --- hw/virtio/v

[PULL 06/15] vhost: recheck dev state in the vhost_migration_log routine

2020-09-18 Thread Michael S. Tsirkin
Norwitz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-user-blk.h | 10 ++ hw/block/vhost-user-blk.c | 19 --- hw/virtio/vhost.c | 27 --- 3 files changed, 50 insertions(+), 6

[PULL 10/13] virtio-blk-pci: default num_queues to -smp N

2020-08-27 Thread Michael S. Tsirkin
with NVMe storage). Signed-off-by: Stefan Hajnoczi Reviewed-by: Cornelia Huck Reviewed-by: Pankaj Gupta Message-Id: <20200818143348.310613-7-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 2 ++ hw/block/virtio

[PULL 11/13] vhost-user-blk-pci: default num_queues to -smp N

2020-08-27 Thread Michael S. Tsirkin
number of MSI-X vectors and virtqueues limit are respected. Signed-off-by: Stefan Hajnoczi Reviewed-by: Cornelia Huck Reviewed-by: Raphael Norwitz Message-Id: <20200818143348.310613-8-stefa...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/

Re: [PATCH v1 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-27 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 01:36:45PM +0300, Dima Stepanov wrote: > Reference e-mail threads: > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html > > If vhost-user daemon is used as a backend for the vhost

Re: [PATCH v1 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-04 Thread Michael S. Tsirkin
On Tue, Aug 04, 2020 at 01:36:45PM +0300, Dima Stepanov wrote: > Reference e-mail threads: > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html > > If vhost-user daemon is used as a backend for the vhost

Re: [PATCH 1/2] pci: pass along the return value of dma_memory_rw

2020-07-22 Thread Michael S. Tsirkin
gt; safe. > > Signed-off-by: Klaus Jensen > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Michael S. Tsirkin > Acked-by: Keith Busch Please feel free to merge this with the patch that uses the return value. > --- > include/hw/pci/pci.h | 3 +-- > 1 file chan

Re: [PATCH v5 0/5] virtio-pci: enable blk and scsi multi-queue by default

2020-07-08 Thread Michael S. Tsirkin
On Mon, Jul 06, 2020 at 02:56:45PM +0100, Stefan Hajnoczi wrote: > v4: > * Sorry for the long delay. I considered replacing this series with a simpler >approach. Real hardware ships with a fixed number of queues (e.g. 128). The >equivalent can be done in QEMU too. That way we don't need to

Re: [PATCH 1/2] pci: pass along the return value of dma_memory_rw

2020-07-01 Thread Michael S. Tsirkin
gt; safe. > > Signed-off-by: Klaus Jensen > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Michael S. Tsirkin > Acked-by: Keith Busch Feel free to merge with patch 2/2. > --- > include/hw/pci/pci.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >

Re: [PATCH v10 12/12] tests/acpi: update expected data files

2020-06-29 Thread Michael S. Tsirkin
On Mon, Jun 29, 2020 at 01:54:33PM +0200, Andrew Jones wrote: > On Fri, Jun 19, 2020 at 11:19:05AM +0200, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > tests/data/acpi/pc/DSDT | Bin 5014 -> 4934 bytes > > tests/data/acpi/pc/DSDT.acpihmat | Bin 6338 -> 6258 bytes >

[PULL 03/19] acpi: move aml builder code for floppy device

2020-06-24 Thread Michael S. Tsirkin
From: Gerd Hoffmann DSDT change: isa device order changes in case MI1 (ipmi) is present. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Message-Id: <20200619091905.21676-4-kra...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block

[PULL 05/19] floppy: move cmos_get_fd_drive_type() from pc

2020-06-24 Thread Michael S. Tsirkin
From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Acked-by: John Snow Message-Id: <20200619091905.21676-6-kra...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/block/fdc.h | 1 + include/hw/i386/pc.h

[PULL 04/19] floppy: make isa_fdc_get_drive_max_chs static

2020-06-24 Thread Michael S. Tsirkin
viewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/block/fdc.h | 2 -- hw/block/fdc.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index c15ff4c623..5d71cf9722 100644 --- a/include/hw

Re: [PATCH v10 00/12] acpi: i386 tweaks

2020-06-19 Thread Michael S. Tsirkin
On Fri, Jun 19, 2020 at 02:51:51AM -0700, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20200619091905.21676-1-kra...@redhat.com/ > > > > Hi, > > This series failed the asan build test. Please find the testing commands and > their output below. If you have Docker instal

Re: [PATCH v9 00/10] acpi: i386 tweaks

2020-06-18 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 09:11:28AM +0200, Gerd Hoffmann wrote: > First batch of microvm patches, some generic acpi stuff. > Split the acpi-build.c monster, specifically split the > pc and q35 and pci bits into a separate file which we > can skip building at some point in the future. Thanks for the

Re: [PATCH v9 08/10] acpi: drop serial/parallel enable bits from dsdt

2020-06-18 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 09:11:36AM +0200, Gerd Hoffmann wrote: > The _STA methods for COM+LPT used to reference them, > but that isn't the case any more. > > piix4 DSDT changes: > > Scope (_SB.PCI0) > { > Device (ISA) > { > Name (_ADR, 0x0001) // _ADR

Re: [PATCH v9 02/10] acpi: move aml builder code for floppy device

2020-06-18 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 09:11:30AM +0200, Gerd Hoffmann wrote: > DSDT change: isa device order changes in case MI1 (ipmi) is present. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Igor Mammedov > --- Pls follow process outlined at the top of tests/qtest/bios-tables-test.c Don't change expecte

Re: [PATCH v9 05/10] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-06-18 Thread Michael S. Tsirkin
On Wed, Jun 17, 2020 at 09:11:33AM +0200, Gerd Hoffmann wrote: > DSDT change: isa device order changes in case MI1 (ipmi) is present. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c| 39 -

[PULL v2 35/58] vhost-user-blk: delay vhost_user_blk_disconnect

2020-06-12 Thread Michael S. Tsirkin
e7c83a885f865128ae3cf1946f8cb538b63cbfba "vhost-user: delay vhost_user_stop" Signed-off-by: Dima Stepanov Message-Id: <69b73b94dcd066065595266c852810e0863a0895.1590396396.git.dimas...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Li F

Re: [PATCH v8 01/10] qtest: allow DSDT acpi table changes

2020-06-11 Thread Michael S. Tsirkin
On Thu, Jun 11, 2020 at 09:29:10AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann OK, thanks! What is still missing is resulting ASL differences in the expected files for reviewers. See ./tests/qtest/bios-tables-test.c step 7. I'm working on a tool that will show the changes more eas

Re: [PATCH v8 10/10] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.

2020-06-11 Thread Michael S. Tsirkin
On Thu, Jun 11, 2020 at 10:31:01AM +0200, Philippe Mathieu-Daudé wrote: > On 6/11/20 10:27 AM, Philippe Mathieu-Daudé wrote: > > Hi Gerd, > > > > On 6/11/20 9:29 AM, Gerd Hoffmann wrote: > >> Seems to be unused. > >> > >> Signed-off-by: Gerd Hoffmann > >> Reviewed-by: Igor Mammedov > >> --- >

Re: [PATCH v7 0/9] acpi: i386 tweaks

2020-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 05:53:46PM +0200, Gerd Hoffmann wrote: > On Wed, Jun 10, 2020 at 10:54:26AM -0400, Michael S. Tsirkin wrote: > > On Wed, Jun 10, 2020 at 01:40:02PM +0200, Igor Mammedov wrote: > > > On Wed, 10 Jun 2020 11:41:22 +0200 > > > Gerd Hoffmann wrote: &g

Re: [PATCH v7 0/9] acpi: i386 tweaks

2020-06-10 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 01:40:02PM +0200, Igor Mammedov wrote: > On Wed, 10 Jun 2020 11:41:22 +0200 > Gerd Hoffmann wrote: > > > First batch of microvm patches, some generic acpi stuff. > > Split the acpi-build.c monster, specifically split the > > pc and q35 and pci bits into a separate file whi

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:15PM +0100, Stefan Hajnoczi wrote: > Many vhost devices in QEMU currently do not involve the device backend > in feature negotiation. This seems fine at first glance when no > device-specific feature bits are defined (virtio-net has many but some > devices have none).

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-09 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 01:53:57PM +0800, Jason Wang wrote: > > On 2020/6/10 下午12:15, Michael S. Tsirkin wrote: > > On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote: > > > On 2020/6/10 上午2:07, Michael S. Tsirkin wrote: > > > > > +/* > > >

Re: [PATCH v2 0/7] virtio: enable VIRTIO_F_RING_PACKED for all devices

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:11PM +0100, Stefan Hajnoczi wrote: > v2: > * Add libvhost-user VHOST_USER_GET_FEATURES patch to start reporting feature >bits correctly (already reviewed by Marc-André Lureau) > * Rephrase doc comments and drop vhost_get_default_features() [Jason] > * Simplify

Re: [PATCH v2 3/7] docs: document non-net VHOST_USER_GET_FEATURES behavior

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:14PM +0100, Stefan Hajnoczi wrote: > QEMU enabled several feature bits for non-net devices without allowing > the device backend to control them. This only works when the device > backend implements support for those features. It won't work for new > features like the

[PULL 35/56] vhost-user-blk: delay vhost_user_blk_disconnect

2020-06-09 Thread Michael S. Tsirkin
e7c83a885f865128ae3cf1946f8cb538b63cbfba "vhost-user: delay vhost_user_stop" Signed-off-by: Dima Stepanov Message-Id: <69b73b94dcd066065595266c852810e0863a0895.1590396396.git.dimas...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Li F

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-09 Thread Michael S. Tsirkin
On Wed, Jun 10, 2020 at 11:21:50AM +0800, Jason Wang wrote: > > On 2020/6/10 上午2:07, Michael S. Tsirkin wrote: > > > +/* > > > + * Default vhost_get_features() feature bits for existing device types > > > that do > > > + * not define their own. &g

Re: [PATCH v2 4/7] vhost: involve device backends in feature negotiation

2020-06-09 Thread Michael S. Tsirkin
On Tue, Jun 09, 2020 at 06:02:15PM +0100, Stefan Hajnoczi wrote: > Many vhost devices in QEMU currently do not involve the device backend > in feature negotiation. This seems fine at first glance when no > device-specific feature bits are defined (virtio-net has many but some > devices have none).

Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper

2020-06-09 Thread Michael S. Tsirkin
On Thu, May 28, 2020 at 05:35:55PM +0200, Cornelia Huck wrote: > On Wed, 27 May 2020 11:29:21 +0100 > Stefan Hajnoczi wrote: > > > Multi-queue devices achieve the best performance when each vCPU has a > > dedicated queue. This ensures that virtqueue used notifications are > > handled on the same

Re: [PATCH v4 5/5] vhost-user-blk: default num_queues to -smp N

2020-06-09 Thread Michael S. Tsirkin
On Sat, May 30, 2020 at 10:42:05PM -0400, Raphael Norwitz wrote: > I'm happy with the code but as David pointed out with virtio-scsi, we > should probably add a comment about virtio_pci_optimal_num_queues() > capping the number of VQs here too. Stefan could you add this tweak and repost pls? Thank

Re: [PATCH v6 00/16] acpi: i386 tweaks

2020-06-09 Thread Michael S. Tsirkin
On Fri, May 15, 2020 at 05:04:05PM +0200, Gerd Hoffmann wrote: > First batch of microvm patches, some generic acpi stuff. > Split the acpi-build.c monster, specifically split the > pc and q35 and pci bits into a separate file which we > can skip building at some point in the future. Applied patch

Re: [PATCH v6 08/16] acpi: move aml builder code for floppy device

2020-06-09 Thread Michael S. Tsirkin
On Fri, May 15, 2020 at 05:04:13PM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > Reviewed-by: Igor Mammedov > --- > hw/block/fdc.c | 83 > hw/i386/acpi-build.c | 83 > stubs/cmos.c

Re: [PATCH v6 00/16] acpi: i386 tweaks

2020-06-08 Thread Michael S. Tsirkin
On Mon, Jun 08, 2020 at 03:22:45PM +0200, Gerd Hoffmann wrote: > On Fri, May 15, 2020 at 05:04:05PM +0200, Gerd Hoffmann wrote: > > First batch of microvm patches, some generic acpi stuff. > > Split the acpi-build.c monster, specifically split the > > pc and q35 and pci bits into a separate file wh

Re: [PATCH v4 1/3] virtio-blk: store opt_io_size with correct size

2020-05-20 Thread Michael S. Tsirkin
On Wed, May 20, 2020 at 11:06:55AM +0300, Roman Kagan wrote: > The width of opt_io_size in virtio_blk_topology is 32bit. > > Use the appropriate accessor to store it. > > Signed-off-by: Roman Kagan Thanks for the patch! Could you add a bit of analysis - when does this cause bugs? I'm guessing

Re: [PATCH v6 10/16] floppy: move cmos_get_fd_drive_type() from pc

2020-05-20 Thread Michael S. Tsirkin
On Wed, May 20, 2020 at 10:43:03AM +0200, Gerd Hoffmann wrote: > On Tue, May 19, 2020 at 04:51:44PM +0200, Philippe Mathieu-Daudé wrote: > > Missing "Signed-off-by: Gerd Hoffmann ", > > otherwise: > > Signed-off-by: Gerd Hoffmann > > mst, can you pick that up or should I respin? > > thanks, >

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-19 Thread Michael S. Tsirkin
On Fri, May 15, 2020 at 07:54:57PM +0300, Dima Stepanov wrote: > On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: > > > > On 2020/5/13 下午5:47, Dima Stepanov wrote: > > >>> case CHR_EVENT_CLOSED: > > >>> /* a close event may happen during a read/write, but vhost > > >>>

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote: > On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > > > > On 2020/5/11 下午5:25, Dima Stepanov wrote: > > >On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: > > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > > >>>If

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-07 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 06:08:34PM -0400, Raphael Norwitz wrote: > As you correctly point out, this code needs to be looked at more > carefully so that > if the device does disconnect in the background we can handle the migration > path > gracefully. In particular, we need to decide whether a migr

[PULL 11/29] vhost-user-blk: fix invalid memory access

2020-05-04 Thread Michael S. Tsirkin
707.14467-1-fen...@smartx.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 hw/virtio/vhost.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhos

Re: [PATCH RESEND v3 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-05-04 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 10:30:37AM +, Stefan Hajnoczi wrote: > v3: > * Add new performance results that demonstrate the scalability > * Mention that this is PCI-specific [Cornelia] > v2: > * Let the virtio-DEVICE-pci device select num-queues because the optimal >multi-queue configuration

Re: [PATCH v3 00/15] acpi: i386 tweaks

2020-05-04 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 03:59:48PM +0200, Gerd Hoffmann wrote: > First batch of microvm patches, some generic acpi stuff. > Split the acpi-build.c monster, specifically split the > pc and q35 and pci bits into a separate file which we > can skip building at some point in the future. OK I applied 1

Re: [PATCH] vhost-user-blk: fix invalid memory access

2020-04-17 Thread Michael S. Tsirkin
t; Stack after return: f5 > Stack use after scope: f8 > Global redzone: f9 > Global init order: f6 > Poisoned by user:f7 > Container overflow: fc > Array cookie:ac > Intra object redzone:bb > ASan internal:

Re: [PATCH 0/4] fix crashes when inject errors to vhost-user-blk chardev

2020-04-17 Thread Michael S. Tsirkin
On Wed, Apr 15, 2020 at 11:28:22AM +0800, Li Feng wrote: > The following patches fix various crashes happened when injecting errors to > chardev unix domain socket. I think these are mostly unrelated fixes right? If so pls post them separately so I know I can just apply some and wait for others to

Re: [PATCH-for-5.0 00/12] various bugfixes

2020-04-16 Thread Michael S. Tsirkin
On Tue, Apr 14, 2020 at 03:30:40PM +0200, Philippe Mathieu-Daudé wrote: > Collection of bugfixes for 5.0. > > Only vhost-user-gpu/grlib_ahb_apb_pnp patches are reviewed. > > As 5.0-rc3 is tomorrow, I thought it could help to gather > them and resend altogether. So who's applying all this stuff?

Re: [PATCH-for-5.0 05/12] vhost-user-gpu: Release memory returned by vu_queue_pop() with free()

2020-04-16 Thread Michael S. Tsirkin
Marc-André Lureau > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin > --- > contrib/vhost-user-gpu/vhost-user-gpu.c | 4 ++-- > contrib/vhost-user-gpu/virgl.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/contrib/vhost

Re: hotplug issue of vhost-user-blk

2020-04-09 Thread Michael S. Tsirkin
On Wed, Apr 08, 2020 at 10:25:42AM +0800, Li Feng wrote: > Hi all, > > Hotplug of vhost-user-blk doesn't not work in qemu master branch and > all previous version. > > The action I insert a vhost-user-blk disk is: > (qemu) chardev-add socket,id=spdk_vhost_blk2,path=/vhost-blk.0,reconnect=1 > (qem

[PULL 05/10] virtio-blk: delete vqs on the error path in realize()

2020-03-31 Thread Michael S. Tsirkin
hael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 142863a3b2..97ba8a2187 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -1204,6 +1204,9 @@ stati

[PULL 08/10] fix vhost_user_blk_watch crash

2020-03-31 Thread Michael S. Tsirkin
hael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-user-blk.h | 1 - hw/block/vhost-user-blk.c | 19 --- 2 files changed, 20 deletions(-) diff --git a/include/hw/virtio/vhost-user-blk.h b/include/hw/virtio/vhost-user-blk.h index 05ea0ad183..34ad

Re: [PATCH] fix vhost_user_blk_watch crash

2020-03-31 Thread Michael S. Tsirkin
On Wed, Mar 25, 2020 at 06:30:08PM -0400, Raphael Norwitz wrote: > On Sun, Mar 29, 2020 at 09:30:24AM -0400, Michael S. Tsirkin wrote: > > > > On Mon, Mar 23, 2020 at 01:29:24PM +0800, Li Feng wrote: > > > the G_IO_HUP is watched in tcp_chr_connect, and the callback >

Re: [PATCH RESEND v3 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-03-29 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 10:30:37AM +, Stefan Hajnoczi wrote: > v3: > * Add new performance results that demonstrate the scalability > * Mention that this is PCI-specific [Cornelia] > v2: > * Let the virtio-DEVICE-pci device select num-queues because the optimal >multi-queue configuration

Re: [PATCH] fix vhost_user_blk_watch crash

2020-03-29 Thread Michael S. Tsirkin
On Mon, Mar 23, 2020 at 01:29:24PM +0800, Li Feng wrote: > the G_IO_HUP is watched in tcp_chr_connect, and the callback > vhost_user_blk_watch is not needed, because tcp_chr_hup is registered as > callback. And it will close the tcp link. > > Signed-off-by: Li Feng Raphael would you like to revi

Re: [PATCH 2/8] hw/ide: Get rid of piix4_init function

2020-03-14 Thread Michael S. Tsirkin
On Fri, Mar 13, 2020 at 10:14:34PM +0100, BALATON Zoltan wrote: > This removes pci_piix4_ide_init() function similar to clean up done to > other ide devices. > > Signed-off-by: BALATON Zoltan > --- > hw/ide/piix.c| 12 +--- > hw/isa/piix4.c | 5 - > include/hw/ide.h | 1 - >

Re: [PATCH v4 3/4] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-10 Thread Michael S. Tsirkin
at needs to set a constant value for this reg and this patch allows > to do that without additional workaround in device emulation to > reverse the effect of this PCI bus reset function. > > Suggested-by: Mark Cave-Ayland > Signed-off-by: BALATON Zoltan Looks ok to me Reviewed-by

Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-09 Thread Michael S. Tsirkin
On Mon, Mar 09, 2020 at 09:54:27PM +0100, BALATON Zoltan wrote: > On Mon, 9 Mar 2020, Michael S. Tsirkin wrote: > > On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: > > > The pci_do_device_reset() function (called from pci_device_reset) > > > clears the PC

Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode

2020-03-09 Thread Michael S. Tsirkin
On Mon, Mar 09, 2020 at 09:50:57PM +0100, BALATON Zoltan wrote: > On Mon, 9 Mar 2020, Michael S. Tsirkin wrote: > > On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: > > > Some machines operate in "non 100% native mode" where interrupts are > > &g

Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-09 Thread Michael S. Tsirkin
On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: > The pci_do_device_reset() function (called from pci_device_reset) > clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did > this without taking wmask into account. We'll have a device model now > that needs to set a

Re: [PATCH v3 3/3] via-ide: Also emulate non 100% native mode

2020-03-09 Thread Michael S. Tsirkin
On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: > Some machines operate in "non 100% native mode" where interrupts are > fixed at legacy IDE interrupts and some guests expect this behaviour > without checking based on knowledge about hardware. Even Linux has > arch specific workarou

Re: [PULL 00/33] Trivial branch patches

2020-03-09 Thread Michael S. Tsirkin
On Mon, Mar 09, 2020 at 04:08:04PM +0100, Laurent Vivier wrote: > The following changes since commit 7a5853cec479a448edae0fb2aaf4e2f78c9c774d: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2020-03-09 10:32:53 +) > > are available in the Git repository at:

Re: [PATCH v2 2/2] misc: Replace zero-length arrays with flexible array member (manual)

2020-03-07 Thread Michael S. Tsirkin
/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=17642a2fbd2c1 > > Inspired-by: Gustavo A. R. Silva > Reviewed-by: David Hildenbrand > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin > --- > v2: Do not modify block/qed.h: > > blo

Re: [PATCH v2 1/2] misc: Replace zero-length arrays with flexible array member (automatic)

2020-03-07 Thread Michael S. Tsirkin
nu.org/onlinedocs/gcc/Zero-Length.html > [2] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f > [3] > https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=17642a2fbd2c1 > > Inspired-by: Gustavo A. R. Silva > Rev

[PULL v2 10/30] vhost-user-blk: convert to new virtio_delete_queue

2020-02-26 Thread Michael S. Tsirkin
From: Pan Nengyuan use the new virtio_delete_queue function to cleanup. Signed-off-by: Pan Nengyuan Message-Id: <20200224041336.30790-3-pannengy...@huawei.com> Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhos

[PULL v2 09/30] vhost-user-blk: delete virtioqueues in unrealize to fix memleaks

2020-02-26 Thread Michael S. Tsirkin
Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/vhost-user-blk.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index d8c459c575..2eba8b9db0 100644 --- a/hw/block/vhost-user-blk.c ++

[PULL 10/32] vhost-user-blk: convert to new virtio_delete_queue

2020-02-25 Thread Michael S. Tsirkin
From: Pan Nengyuan use the new virtio_delete_queue function to cleanup. Signed-off-by: Pan Nengyuan Message-Id: <20200224041336.30790-3-pannengy...@huawei.com> Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhos

[PULL 09/32] vhost-user-blk: delete virtioqueues in unrealize to fix memleaks

2020-02-25 Thread Michael S. Tsirkin
Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/block/vhost-user-blk.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index d8c459c575..2eba8b9db0 100644 --- a/hw/block/vhost-user-blk.c ++

Re: [PATCH 2/2] vhost-use-blk: convert to new virtio_delete_queue

2020-02-25 Thread Michael S. Tsirkin
On Thu, Feb 13, 2020 at 09:28:07AM +0800, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > use the new virtio_delete_queue function to cleanup. > > Signed-off-by: Pan Nengyuan typo in subject use-blk->user-blk > --- > hw/block/vhost-user-blk.c | 11 +++ > include/hw/v

Re: [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 02:05:29PM +0100, Philippe Mathieu-Daudé wrote: > When we use a Coccinelle semantic script to do automatic > code modifications, it makes sense to look at the semantic > patch first. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mic

Re: [PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-02-11 Thread Michael S. Tsirkin
On Tue, Feb 11, 2020 at 04:20:41PM +, Stefan Hajnoczi wrote: > On Mon, Feb 03, 2020 at 12:39:49PM +0100, Sergio Lopez wrote: > > On Mon, Feb 03, 2020 at 10:57:44AM +, Daniel P. Berrangé wrote: > > > On Mon, Feb 03, 2020 at 11:25:29AM +0100, Sergio Lopez wrote: > > > > On Thu, Jan 30, 2020 a

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2020-02-11 Thread Michael S. Tsirkin
On Mon, Feb 10, 2020 at 06:34:15PM +0300, Denis Plotnikov wrote: > > > On 09.02.2020 10:49, Michael S. Tsirkin wrote: > > On Fri, Feb 07, 2020 at 11:48:05AM +0300, Denis Plotnikov wrote: > > > > > > On 05.02.2020 14:19, Stefan Hajnoczi wrote: > > >

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2020-02-08 Thread Michael S. Tsirkin
On Fri, Feb 07, 2020 at 11:48:05AM +0300, Denis Plotnikov wrote: > > > On 05.02.2020 14:19, Stefan Hajnoczi wrote: > > On Tue, Feb 04, 2020 at 12:59:04PM +0300, Denis Plotnikov wrote: > > > > > > On 30.01.2020 17:58, Stefan Hajnoczi wrote: > > > > On Wed, Jan 29, 2020 at 05:07:00PM +0300, Denis

Re: [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants

2020-02-03 Thread Michael S. Tsirkin
On Mon, Feb 03, 2020 at 03:17:07PM +0300, Denis Plotnikov wrote: > > > On 30.01.2020 16:38, Michael S. Tsirkin wrote: > > On Wed, Jan 29, 2020 at 05:06:59PM +0300, Denis Plotnikov wrote: > > > Signed-off-by: Denis Plotnikov > > > > I'm not sure what th

Re: [PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-02-03 Thread Michael S. Tsirkin
On Mon, Feb 03, 2020 at 12:39:49PM +0100, Sergio Lopez wrote: > On Mon, Feb 03, 2020 at 10:57:44AM +, Daniel P. Berrangé wrote: > > On Mon, Feb 03, 2020 at 11:25:29AM +0100, Sergio Lopez wrote: > > > On Thu, Jan 30, 2020 at 10:52:35AM +, Stefan Hajnoczi wrote: > > > > On Thu, Jan 30, 2020 a

Re: [PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-02-03 Thread Michael S. Tsirkin
On Mon, Feb 03, 2020 at 11:25:29AM +0100, Sergio Lopez wrote: > On Thu, Jan 30, 2020 at 10:52:35AM +, Stefan Hajnoczi wrote: > > On Thu, Jan 30, 2020 at 01:29:16AM +0100, Paolo Bonzini wrote: > > > On 29/01/20 16:44, Stefan Hajnoczi wrote: > > > > On Mon, Jan 27, 2020 at 02:10:31PM +0100, Corne

Re: [PATCH v1 3/4] tests: add virtuqueue size checking to virtio_seg_max_adjust test

2020-01-30 Thread Michael S. Tsirkin
On Wed, Jan 29, 2020 at 05:07:01PM +0300, Denis Plotnikov wrote: > This is due to the change in the default virtqueue_size in the > latest machine type to improve guest disks performance. > Sorry what is due to the change? > Signed-off-by: Denis Plotnikov > --- > tests/acceptance/virtio_seg_ma

Re: [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants

2020-01-30 Thread Michael S. Tsirkin
On Wed, Jan 29, 2020 at 05:06:59PM +0300, Denis Plotnikov wrote: > Signed-off-by: Denis Plotnikov I'm not sure what the point is. It's more or less an accident that these two devices share the queue size, this constance makes no sense to me. > --- > hw/block/virtio-blk.c | 6 -- > hw/

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2020-01-30 Thread Michael S. Tsirkin
On Wed, Jan 29, 2020 at 05:07:00PM +0300, Denis Plotnikov wrote: > The goal is to reduce the amount of requests issued by a guest on > 1M reads/writes. This rises the performance up to 4% on that kind of > disk access pattern. > > The maximum chunk size to be used for the guest disk accessing is >

[PULL v3 26/32] virtio: make seg_max virtqueue size dependent

2020-01-07 Thread Michael S. Tsirkin
<20191220140905.1718-2-dplotni...@virtuozzo.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 1 + include/hw/virtio/virtio-scsi.h | 1 + hw/block/virtio-blk.c | 9 - hw/core/machine.c |

[PULL v3 10/32] virtio: don't enable notifications during polling

2020-01-07 Thread Michael S. Tsirkin
mance improvement of 5-10% with the null-co block driver. Real-life storage configurations will see a smaller improvement because the MMIO vmexit overhead contributes less to latency. Signed-off-by: Stefan Hajnoczi Message-Id: <20191209210957.65087-1-stefa...@redhat.com> Reviewed-by: Michael S. Tsir

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

2020-01-07 Thread Michael S. Tsirkin
<20191220140905.1718-2-dplotni...@virtuozzo.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 1 + include/hw/virtio/virtio-scsi.h | 1 + hw/block/virtio-blk.c | 9 - hw/core/machine.c |

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

2020-01-07 Thread Michael S. Tsirkin
mance improvement of 5-10% with the null-co block driver. Real-life storage configurations will see a smaller improvement because the MMIO vmexit overhead contributes less to latency. Signed-off-by: Stefan Hajnoczi Message-Id: <20191209210957.65087-1-stefa...@redhat.com> Reviewed-by: Michael S. Tsir

[PULL v3 26/32] virtio: make seg_max virtqueue size dependent

2020-01-05 Thread Michael S. Tsirkin
<20191220140905.1718-2-dplotni...@virtuozzo.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 1 + include/hw/virtio/virtio-scsi.h | 1 + hw/block/virtio-blk.c | 9 - hw/core/machine.c |

[PULL v3 10/32] virtio: don't enable notifications during polling

2020-01-05 Thread Michael S. Tsirkin
mance improvement of 5-10% with the null-co block driver. Real-life storage configurations will see a smaller improvement because the MMIO vmexit overhead contributes less to latency. Signed-off-by: Stefan Hajnoczi Message-Id: <20191209210957.65087-1-stefa...@redhat.com> Reviewed-by: Michael S. Tsir

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

2019-12-23 Thread Michael S. Tsirkin
<20191220140905.1718-2-dplotni...@virtuozzo.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 1 + include/hw/virtio/virtio-scsi.h | 1 + hw/block/virtio-blk.c | 9 - hw/core/machine.c |

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

2019-12-23 Thread Michael S. Tsirkin
mance improvement of 5-10% with the null-co block driver. Real-life storage configurations will see a smaller improvement because the MMIO vmexit overhead contributes less to latency. Signed-off-by: Stefan Hajnoczi Message-Id: <20191209210957.65087-1-stefa...@redhat.com> Reviewed-by: Michael S. Tsir

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

2019-12-19 Thread Michael S. Tsirkin
mance improvement of 5-10% with the null-co block driver. Real-life storage configurations will see a smaller improvement because the MMIO vmexit overhead contributes less to latency. Signed-off-by: Stefan Hajnoczi Message-Id: <20191209210957.65087-1-stefa...@redhat.com> Reviewed-by: Michael S. Tsir

Re: [RFC PATCH v2 09/14] vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandler

2019-12-19 Thread Michael S. Tsirkin
> cc1: all warnings being treated as errors > > Signed-off-by: Philippe Mathieu-Daudé > --- > v2: Add all missing enums > > Cc: "Michael S. Tsirkin" > Cc: Kevin Wolf > Cc: Max Reitz > Cc: qemu-block@nongnu.org Acked-by: Michael S. Tsirkin > --- > hw/blo

Re: [PATCH 12/12] hw/i386/pc: Move PC-machine specific declarations to 'pc_internal.h'

2019-12-15 Thread Michael S. Tsirkin
On Fri, Dec 13, 2019 at 05:47:28PM +0100, Philippe Mathieu-Daudé wrote: > On 12/13/19 5:17 PM, Philippe Mathieu-Daudé wrote: > > Historically, QEMU started with only one X86 machine: the PC. > > The 'hw/i386/pc.h' header was used to store all X86 and PC > > declarations. Since we have now multiple

Re: [PATCH] virtio: don't enable notifications during polling

2019-12-11 Thread Michael S. Tsirkin
On Mon, Dec 09, 2019 at 09:09:57PM +, Stefan Hajnoczi wrote: > 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, defeati

Re: [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent

2019-11-08 Thread Michael S. Tsirkin
On Fri, Nov 08, 2019 at 04:42:49PM +0300, Denis Plotnikov wrote: > seg_max has a restriction to be less or equal to virtqueue size > according to Virtio 1.0 specification > > Although seg_max can't be set directly, it's worth to express this > dependancy directly in the code for sanity purpose. >

Re: [PATCH v1 2/4] virtio: make seg_max virtqueue size dependent

2019-11-08 Thread Michael S. Tsirkin
posted in the thread. OK, and I think we should make it machine type dependent. > Any objections are welcome. > > Denis > > On 06.11.2019 14:54, Michael S. Tsirkin wrote: > > On Wed, Nov 06, 2019 at 10:07:02AM +, Denis Lunev wrote: > >> On 11/5/19 9:51 PM, Mich

Re: [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2019 at 01:17:51PM +0300, Alexander Popov wrote: > On 27.07.2019 00:09, Alexander Popov wrote: > > On 26.07.2019 2:25:03 GMT+02:00, John Snow wrote: > >> Oh, this is fun. > > ... > >> I can worry about a proper fix for 4.2+. > > > > Hello John, > > > > Thanks for your letter. > > >

Re: [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-11-06 Thread Michael S. Tsirkin
On Thu, Jul 25, 2019 at 08:25:03PM -0400, John Snow wrote: > > > On 7/5/19 10:07 AM, Alexander Popov wrote: > > This assertion was introduced in the commit a718978ed58a in July 2015. > > It implies that the size of successful DMA transfers handled in > > ide_dma_cb() should be multiple of 512 (th

Re: [PATCH v1 2/4] virtio: make seg_max virtqueue size dependent

2019-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2019 at 10:07:02AM +, Denis Lunev wrote: > On 11/5/19 9:51 PM, Michael S. Tsirkin wrote: > > On Tue, Nov 05, 2019 at 07:11:03PM +0300, Denis Plotnikov wrote: > >> seg_max has a restriction to be less or equal to virtqueue size > >> according

Re: [PATCH v1 1/4] virtio: protect non-modern devices from too big virtqueue size setting

2019-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2019 at 10:18:12AM +0100, Stefan Hajnoczi wrote: > On Tue, Nov 05, 2019 at 03:56:43PM -0500, Michael S. Tsirkin wrote: > > On Tue, Nov 05, 2019 at 07:11:02PM +0300, Denis Plotnikov wrote: > > > @@ -47,6 +48,15 @@ static void virtio_scsi_pci_realize(VirtIOPCIProx

Re: [PATCH v1 1/4] virtio: protect non-modern devices from too big virtqueue size setting

2019-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2019 at 07:46:31AM +, Denis Plotnikov wrote: > > On 05.11.2019 23:56, Michael S. Tsirkin wrote: > > On Tue, Nov 05, 2019 at 07:11:02PM +0300, Denis Plotnikov wrote: > >> The patch protects from creating illegal virtio device configuration > >

Re: [PATCH v1 1/4] virtio: protect non-modern devices from too big virtqueue size setting

2019-11-05 Thread Michael S. Tsirkin
On Tue, Nov 05, 2019 at 07:11:02PM +0300, Denis Plotnikov wrote: > The patch protects from creating illegal virtio device configuration > via direct virtqueue size property setting. > > Signed-off-by: Denis Plotnikov > --- > hw/virtio/virtio-blk-pci.c | 9 + > hw/virtio/virtio-scsi-pci

Re: [PATCH v1 3/4] virtio: increase virtuqueue sizes in new machine types

2019-11-05 Thread Michael S. Tsirkin
On Tue, Nov 05, 2019 at 07:11:04PM +0300, Denis Plotnikov wrote: > Linux guests submit IO requests no longer than PAGE_SIZE * max_seg > field reported by SCSI controler. Thus typical sequential read with > 1 MB size results in the following pattern of the IO from the guest: > 8,16 115754

Re: [PATCH v1 2/4] virtio: make seg_max virtqueue size dependent

2019-11-05 Thread Michael S. Tsirkin
On Tue, Nov 05, 2019 at 07:11:03PM +0300, Denis Plotnikov wrote: > seg_max has a restriction to be less or equal to virtqueue size > according to Virtio 1.0 specification > > Although seg_max can't be set directly, it's worth to express this > dependancy directly in the code for sanity purpose. >

<    1   2   3   4   5   6   7   8   9   >