Re: [PATCH v2 1/1] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/29/20 12:15 AM, Joe Komlodi wrote: > Hi Philippe, > > Comments marked inline with [Joe] > > -Original Message- > From: Philippe Mathieu-Daudé On Behalf Of > Philippe Mathieu-Daudé > Sent: Wednesday, October 28, 2020 2:27 AM > To: Joe Komlodi ; qemu-de...@nongnu.org > Cc: Francisco

Re: [PATCH v3 15/15] python/qemu: add qemu package itself to pipenv

2020-10-28 Thread John Snow
On 10/28/20 6:59 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:55PM -0400, John Snow wrote: This adds the python qemu packages themselves to the pipenv manifest. 'pipenv sync' will create a virtual environment sufficient to use the SDK. 'pipenv sync --dev' will create a virtual environmen

Re: [PATCH v3 14/15] python/qemu: add isort to pipenv

2020-10-28 Thread John Snow
On 10/28/20 6:46 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:54PM -0400, John Snow wrote: isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret certain "from ..." clauses that are not related to imports. Require 5.0.5 or greater. isort can be run with 'isort -c qemu' from

Re: [PATCH v3 08/15] python: add pylint to pipenv

2020-10-28 Thread John Snow
On 10/28/20 6:38 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:48PM -0400, John Snow wrote: We are specifying >= pylint 2.6.x for two reasons: 1. For setup.cfg support, added in pylint 2.5.x 2. To clarify that we are using a version that has incompatibly dropped bad-whitespace checks. S

Re: [PATCH v3 06/15] python: add pylint import exceptions

2020-10-28 Thread John Snow
On 10/28/20 6:24 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:46PM -0400, John Snow wrote: Pylint 2.5.x and 2.6.x have regressions that make import checking inconsistent, see: https: //github.com/PyCQA/pylint/issues/3609 https: //github.com/PyCQA/pylint/issues/3624 https: //github.com/P

Re: [PATCH v3 04/15] python: add directory structure README.rst files

2020-10-28 Thread John Snow
On 10/28/20 6:05 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:44PM -0400, John Snow wrote: Add short readmes to python/, python/qemu/, python/qemu/machine, and python/qemu/machine that explain the directory hierarchy. These readmes are visible when browsing the source on e.g. gitlab/gith

RE: [PATCH v2 1/1] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-10-28 Thread Joe Komlodi
Hi Philippe, Comments marked inline with [Joe] -Original Message- From: Philippe Mathieu-Daudé On Behalf Of Philippe Mathieu-Daudé Sent: Wednesday, October 28, 2020 2:27 AM To: Joe Komlodi ; qemu-de...@nongnu.org Cc: Francisco Eduardo Iglesias ; kw...@redhat.com; alist...@alistair23.me

Re: [PATCH v3 15/15] python/qemu: add qemu package itself to pipenv

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:55PM -0400, John Snow wrote: > This adds the python qemu packages themselves to the pipenv manifest. > 'pipenv sync' will create a virtual environment sufficient to use the SDK. > 'pipenv sync --dev' will create a virtual environment sufficient to use > and test the SD

Re: [PATCH v3 14/15] python/qemu: add isort to pipenv

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:54PM -0400, John Snow wrote: > isort 5.0.0 through 5.0.4 has a bug that causes it to misinterpret > certain "from ..." clauses that are not related to imports. > > Require 5.0.5 or greater. > > isort can be run with 'isort -c qemu' from the python root. > > Signed-o

Re: [PATCH v3 13/15] python: move .isort.cfg into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:53PM -0400, John Snow wrote: > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 10/15] python: Add flake8 to pipenv

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:50PM -0400, John Snow wrote: > flake8 3.5.x does not support the --extend-ignore syntax used in the > .flake8 file to gracefully extend default ignores, so 3.6.x is our > minimum requirement. There is no known upper bound. > > flake8 can be run from the python/ direct

Re: [PATCH v3 12/15] python: add mypy to pipenv

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:52PM -0400, John Snow wrote: > 0.730 appears to be about the oldest version that works with the > features we want, including nice human readable output (to make sure > iotest 297 passes), and type-parameterized Popen generics. > > 0.770, however, supports adding 'str

Re: [PATCH v3 11/15] python: move mypy.ini into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:51PM -0400, John Snow wrote: > mypy supports reading its configuration values from a central project > configuration file; do so. > > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa signature.asc Description: PGP signature

Re: [PATCH v3 09/15] python: move flake8 config to setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:49PM -0400, John Snow wrote: > Update the comment concerning the flake8 exception to match commit > 42c0dd12, whose commit message stated: > > A note on the flake8 exception: flake8 will warn on *any* bare except, > but pylint's is context-aware and will suppress the

Re: [PATCH v3 08/15] python: add pylint to pipenv

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:48PM -0400, John Snow wrote: > We are specifying >= pylint 2.6.x for two reasons: > > 1. For setup.cfg support, added in pylint 2.5.x > 2. To clarify that we are using a version that has incompatibly dropped > bad-whitespace checks. > > Signed-off-by: John Snow > --

Re: [PATCH v3 07/15] python: move pylintrc into setup.cfg

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:47PM -0400, John Snow wrote: > Delete the empty settings now that it's sharing a home with settings for > other tools. > > pylint can now be run from this folder as "pylint qemu". > Signed-off-by: John Snow > --- Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa s

Re: [PATCH v3 06/15] python: add pylint import exceptions

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:46PM -0400, John Snow wrote: > Pylint 2.5.x and 2.6.x have regressions that make import checking > inconsistent, see: > > https: //github.com/PyCQA/pylint/issues/3609 > https: //github.com/PyCQA/pylint/issues/3624 > https: //github.com/PyCQA/pylint/issues/3651 > Are

Re: [PATCH v3 05/15] python: Add pipenv support

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:45PM -0400, John Snow wrote: > pipenv is a tool used for managing virtual environments with pinned, > explicit dependencies. It is used for precisely recreating python > virtual environments. > > pipenv uses two files to do this: > > (1) Pipfile, which is similar in

Re: [PATCH v3 04/15] python: add directory structure README.rst files

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:44PM -0400, John Snow wrote: > Add short readmes to python/, python/qemu/, python/qemu/machine, and > python/qemu/machine that explain the directory hierarchy. These readmes > are visible when browsing the source on e.g. gitlab/github and are > designed to help new dev

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread John Snow
On 10/28/20 3:49 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: Add setup.cfg and setup.py, necessary for installing a package via pip. Add a rst document explaining the basics of what this package is for and who to contact for more information. This document w

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread John Snow
On 10/28/20 3:46 PM, Cleber Rosa wrote: On Wed, Oct 28, 2020 at 01:02:52PM -0400, John Snow wrote: On 10/28/20 11:10 AM, Cleber Rosa wrote: +mirror `_, but +contributions must be sent to the list for inclusion. IMO it's not clear if this branch/mir

Re: [PATCH v3 03/15] python: add VERSION file

2020-10-28 Thread John Snow
On 10/28/20 3:51 PM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:43PM -0400, John Snow wrote: Python infrastructure as it exists today is not capable reliably of single-sourcing a package version from a parent directory. The authors of pip are working to correct this, but as of today this i

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread John Snow
On 10/28/20 12:39 PM, Cleber Rosa wrote: On Wed, Oct 28, 2020 at 11:21:19AM -0400, John Snow wrote: On 10/28/20 10:46 AM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across t

Re: [PATCH v3 03/15] python: add VERSION file

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:43PM -0400, John Snow wrote: > Python infrastructure as it exists today is not capable reliably of > single-sourcing a package version from a parent directory. The authors > of pip are working to correct this, but as of today this is not possible > to my knowledge. >

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a rst document explaining the basics of what this package is > for and who to contact for more information. This document will be used > as the landing page for

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Wed, Oct 28, 2020 at 01:02:52PM -0400, John Snow wrote: > On 10/28/20 11:10 AM, Cleber Rosa wrote: > > > +mirror `_, but > > > +contributions must be sent to the list for inclusion. > > > > IMO it's not clear if this branch/mirror is your development

[PATCH v9 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-10-28 Thread Lukas Straub
A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case yank_register_i

[PATCH v9 7/8] MAINTAINERS: Add myself as maintainer for yank feature

2020-10-28 Thread Lukas Straub
I'll maintain this for now as the colo usecase is the first user of this functionality. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ef6f5c7399..59

[PATCH v9 6/8] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-10-28 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4 in

[PATCH v9 1/8] Introduce yank feature

2020-10-28 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a 'qu

[PATCH v9 5/8] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-10-28 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c b/io/c

[PATCH v9 2/8] block/nbd.c: Add yank feature

2020-10-28 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- block/nbd.c | 154 +++- 1 file changed, 93 inser

[PATCH v9 3/8] chardev/char-socket.c: Add yank feature

2020-10-28 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 95e45812d5..5947c

[PATCH v9 4/8] migration: Add yank feature

2020-10-28 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 25 + migration/multifd.c | 10 ++

[PATCH v9 0/8] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-10-28 Thread Lukas Straub
Hello Everyone, I finally found time again to work on this, so here is v9 with the new qmp api. We still need ACKs from NBD and chardev maintainers. Changes: v9: -rebase onto master -implemented new qmp api as proposed by Markus v8: -add Reviewed-by and Acked-by tags -rebase onto master -m

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/28/20 4:16 PM, Stefan Hajnoczi wrote: > On Tue, Oct 27, 2020 at 02:55:35PM +0100, Philippe Mathieu-Daudé wrote: >> Rename Submission Queue flags with 'Sq' and introduce >> Completion Queue flag definitions. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> include/block/nvme.h | 17 ++

Re: [PATCH 00/25] block/nvme: Fix Aarch64 host

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Add a bit of tracing, clean around to finally fix few bugs. > In particular, restore NVMe on Aarch64 host. > > Eric Auger (4): > block/nvme: Change size and alignment of IDENTIFY response buffer > block/nvme: Change size and al

Re: [PATCH v2] xen: rework pci_piix3_xen_ide_unplug

2020-10-28 Thread Anthony PERARD via
On Tue, Oct 27, 2020 at 01:33:32PM -0400, John Snow wrote: > On 10/27/20 11:40 AM, Anthony PERARD wrote: > > From: Anthony PERARD > > > > This is to allow IDE disks to be unplugged when adding to QEMU via: > > -drive file=/root/disk_file,if=none,id=ide-disk0,format=raw > > -device ide-h

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread John Snow
On 10/28/20 11:10 AM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: Add setup.cfg and setup.py, necessary for installing a package via pip. Add a rst document explaining the basics of what this package is for and who to contact for more information. This document

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread Cleber Rosa
On Wed, Oct 28, 2020 at 11:21:19AM -0400, John Snow wrote: > On 10/28/20 10:46 AM, Cleber Rosa wrote: > > On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: > > > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > > > directives across the tree. > > > > > > This i

Re: [RFC PATCH 25/25] block/nvme: Fix use of write-only doorbells page on Aarch64 arch

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > qemu_vfio_pci_map_bar() calls mmap(), and mmap(2) states: > > 'offset' must be a multiple of the page size as returned >by sysconf(_SC_PAGE_SIZE). > > In commit f68453237b9 we started to use an offset of 4K which > broke this contrac

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Paolo Bonzini
On 28/10/20 16:39, Kevin Wolf wrote: >> I don't disagree with that, but it's a problem you have to solve anyway, >> isn't it? Once you figure out how to introspect QOM classes, that would >> apply just as well to character devices. > Yes, it's the problem I tried to address with my series, and Mar

Re: [PATCH 07/25] block/nvme: Trace queue pair creation/deletion

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:29PM +0100, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 3 +++ > block/trace-events | 2 ++ > 2 files changed, 5 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 10/25] block/nvme: Use unsigned integer for queue counter/size

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:32PM +0100, Philippe Mathieu-Daudé wrote: > We can not have negative queue count/size/index, use unsigned type. > Rename 'nr_queues' as 'queue_count' to match the spec naming. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 38

Re: [PATCH 09/25] block/nvme: Move definitions before structure declarations

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:31PM +0100, Philippe Mathieu-Daudé wrote: > To be able to use some definitions in structure declarations, > move them earlier. No logical change. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 19 ++- > 1 file changed, 10 insertions

Re: [PATCH 02/25] block/nvme: Use hex format to display offset in trace events

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:24PM +0100, Philippe Mathieu-Daudé wrote: > Use the same format used for the hw/vfio/ trace events. > > Suggested-by: Eric Auger > Signed-off-by: Philippe Mathieu-Daudé > --- > block/trace-events | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-)

Re: [PATCH 05/25] block/nvme: Trace nvme_poll_queue() per queue

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:27PM +0100, Philippe Mathieu-Daudé wrote: > As we want to enable multiple queues, report the event > in each nvme_poll_queue() call, rather than once in > the callback calling nvme_poll_queues(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c |

Re: [PATCH 06/25] block/nvme: Improve nvme_free_req_queue_wait() trace information

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:28PM +0100, Philippe Mathieu-Daudé wrote: > What we want to trace is the block driver state and the queue index. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 2 +- > block/trace-events | 2 +- > 2 files chan

Re: [PATCH 03/25] block/nvme: Report warning with warn_report()

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:25PM +0100, Philippe Mathieu-Daudé wrote: > Instead of displaying warning on stderr, use warn_report() > which also displays it on the monitor. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [RFC PATCH 25/25] block/nvme: Fix use of write-only doorbells page on Aarch64 arch

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:47PM +0100, Philippe Mathieu-Daudé wrote: > qemu_vfio_pci_map_bar() calls mmap(), and mmap(2) states: > > 'offset' must be a multiple of the page size as returned >by sysconf(_SC_PAGE_SIZE). > > In commit f68453237b9 we started to use an offset of 4K which > br

Re: [PATCH 01/25] MAINTAINERS: Cover 'block/nvme.h' file

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:23PM +0100, Philippe Mathieu-Daudé wrote: > The "block/nvme.h" header is shared by both the NVMe block > driver and the NVMe emulated device. Add the 'F:' entry on > both sections, so all maintainers/reviewers are notified > when it is changed. > > Reviewed-by: Klaus

Re: [PATCH 24/25] block/nvme: Align iov's va and size on host page size

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:46PM +0100, Philippe Mathieu-Daudé wrote: > From: Eric Auger > > Make sure iov's va and size are properly aligned on the > host page size. > > Signed-off-by: Eric Auger > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Philippe Mathieu-Daudé > --- > block/n

Re: [PATCH 23/25] block/nvme: Change size and alignment of prp_list_pages

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:45PM +0100, Philippe Mathieu-Daudé wrote: > From: Eric Auger > > In preparation of 64kB host page support, let's change the size > and alignment of the prp_list_pages so that the VFIO DMA MAP succeeds > with 64kB host page size. We align on the host page size. > > R

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Kevin Wolf
Am 28.10.2020 um 16:09 hat Paolo Bonzini geschrieben: > On 28/10/20 15:59, Kevin Wolf wrote: > >> Making more use of QOM will make this a non-problem. You'll just use > >> object-add and -object and, when you figure out the QOM schema, it will > >> just work. > > > > Yes, but figuring out the QOM

Re: [PATCH 22/25] block/nvme: Change size and alignment of queue

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:44PM +0100, Philippe Mathieu-Daudé wrote: > From: Eric Auger > > In preparation of 64kB host page support, let's change the size > and alignment of the queue so that the VFIO DMA MAP succeeds. > We align on the host page size. > > Signed-off-by: Eric Auger > Signed

Re: [PATCH 21/25] block/nvme: Change size and alignment of IDENTIFY response buffer

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:43PM +0100, Philippe Mathieu-Daudé wrote: > From: Eric Auger > > In preparation of 64kB host page support, let's change the size > and alignment of the IDENTIFY command response buffer so that > the VFIO DMA MAP succeeds. We align on the host page size. > > Signed-o

Re: [PATCH 18/25] block/nvme: Pass AioContext argument to nvme_add_io_queue()

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:40PM +0100, Philippe Mathieu-Daudé wrote: > We want to get ride of the BlockDriverState pointer at some point, > so pass aio_context along. Potential future changes are a weak justification. Someone else might decide that the aio_context argument is redundant and reve

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread John Snow
On 10/28/20 10:46 AM, Cleber Rosa wrote: On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import directives across the tree. This is done to create a PEP420 namespace package, in which we may create subpackages. To do

Re: [PATCH 17/25] block/nvme: Simplify nvme_cmd_sync()

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:39PM +0100, Philippe Mathieu-Daudé wrote: > As all commands use the ADMIN queue, it is pointless to pass > it as argument each time. Remove the argument. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 15 --- > 1 file changed, 8 inserti

Re: [PATCH 15/25] block/nvme: Correctly initialize Admin Queue Attributes

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:37PM +0100, Philippe Mathieu-Daudé wrote: > From the specification chapter 3.1.8 "AQA - Admin Queue Attributes" > the Admin Submission Queue Size field is a 0’s based value: > > Admin Submission Queue Size (ASQS): > > Defines the size of the Admin Submission Qu

Re: [PATCH 16/25] block/nvme: Simplify ADMIN queue access

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:38PM +0100, Philippe Mathieu-Daudé wrote: > We don't need to dereference from BDRVNVMeState each time. > Use a NVMeQueuePair pointer to the admin queue and use it. > The nvme_init() becomes easier to review, matching the style > of nvme_add_io_queue(). > > Signed-off-

Re: [PATCH 12/25] block/nvme: Make nvme_init_queue() return boolean indicating error

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:34PM +0100, Philippe Mathieu-Daudé wrote: > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. > This simplifies a bit nvme_create_queue

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:35PM +0100, Philippe Mathieu-Daudé wrote: > Rename Submission Queue flags with 'Sq' and introduce > Completion Queue flag definitions. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/nvme.h | 17 +++-- > 1 file changed, 11 insertions(+),

Re: [PATCH 14/25] block/nvme: Use definitions instead of magic values in add_io_queue()

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:36PM +0100, Philippe Mathieu-Daudé wrote: > Replace magic values by definitions, and simplifiy since the > number of queues will never reach 64K. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 9 + > 1 file changed, 5 insertions(+), 4 delet

Re: [PATCH 08/25] block/nvme: Simplify device reset

2020-10-28 Thread Keith Busch
On Wed, Oct 28, 2020 at 03:02:09PM +, Stefan Hajnoczi wrote: > On Tue, Oct 27, 2020 at 09:55:34AM -0700, Keith Busch wrote: > > On Tue, Oct 27, 2020 at 04:53:31PM +0100, Philippe Mathieu-Daudé wrote: > > > On 10/27/20 3:58 PM, Keith Busch wrote: > > > > On Tue, Oct 27, 2020 at 02:55:30PM +0100,

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 02:55:35PM +0100, Philippe Mathieu-Daudé wrote: > Rename Submission Queue flags with 'Sq' and introduce > Completion Queue flag definitions. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/nvme.h | 17 +++-- > 1 file changed, 11 insertions(+),

Re: [PATCH 11/25] block/nvme: Make nvme_identify() return boolean indicating error

2020-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2020 at 12:03:00PM +0100, Auger Eric wrote: > On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > > Just for consistency, following the example documented since > > commit e3fe3988d7 ("error: Document Error API usage rules"), > > return a boolean value indicating an error is set or

Re: [PATCH v3 02/15] python: add qemu package installer

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:42PM -0400, John Snow wrote: > Add setup.cfg and setup.py, necessary for installing a package via > pip. Add a rst document explaining the basics of what this package is > for and who to contact for more information. This document will be used > as the landing page for

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Paolo Bonzini
On 28/10/20 15:59, Kevin Wolf wrote: >> Making more use of QOM will make this a non-problem. You'll just use >> object-add and -object and, when you figure out the QOM schema, it will >> just work. > > Yes, but figuring out the QOM schema (or rather, what the interface > represented by the schema

Re: [PATCH 08/25] block/nvme: Simplify device reset

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 09:55:34AM -0700, Keith Busch wrote: > On Tue, Oct 27, 2020 at 04:53:31PM +0100, Philippe Mathieu-Daudé wrote: > > On 10/27/20 3:58 PM, Keith Busch wrote: > > > On Tue, Oct 27, 2020 at 02:55:30PM +0100, Philippe Mathieu-Daudé wrote: > > >> Avoid multiple endianess conversion

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Kevin Wolf
Am 28.10.2020 um 15:39 hat Paolo Bonzini geschrieben: > On 28/10/20 12:46, Kevin Wolf wrote: > > I don't think this is the right thing to do at this point. Making more > > use of QOM is an orthogonal problem and would only make solving this one > > harder. > > Making more use of QOM will make this

Re: [PATCH v3 01/15] python: create qemu packages

2020-10-28 Thread Cleber Rosa
On Tue, Oct 20, 2020 at 03:35:41PM -0400, John Snow wrote: > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > directives across the tree. > > This is done to create a PEP420 namespace package, in which we may > create subpackages. To do this, the namespace directory ("q

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Paolo Bonzini
On 28/10/20 12:46, Kevin Wolf wrote: > I don't think this is the right thing to do at this point. Making more > use of QOM is an orthogonal problem and would only make solving this one > harder. Making more use of QOM will make this a non-problem. You'll just use object-add and -object and, when

Re: [PATCH 18/25] block/nvme: Pass AioContext argument to nvme_add_io_queue()

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > We want to get ride of the BlockDriverState pointer at some point, s/ride/rid > so pass aio_context along. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 9 + > 1 file changed, 5 insertions(+), 4 deletio

Re: [PATCH 17/25] block/nvme: Simplify nvme_cmd_sync()

2020-10-28 Thread Auger Eric
On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > As all commands use the ADMIN queue, it is pointless to pass > it as argument each time. Remove the argument. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 15 --- > 1 file chang

Re: [PATCH 16/25] block/nvme: Simplify ADMIN queue access

2020-10-28 Thread Auger Eric
On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > We don't need to dereference from BDRVNVMeState each time. > Use a NVMeQueuePair pointer to the admin queue and use it. double "use" > The nvme_init() becomes easier to review, matching the style > of nvme_add_io_queue().> > Signed-off-by: Phi

Re: [PATCH 15/25] block/nvme: Correctly initialize Admin Queue Attributes

2020-10-28 Thread Auger Eric
On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > From the specification chapter 3.1.8 "AQA - Admin Queue Attributes" > the Admin Submission Queue Size field is a 0’s based value: > > Admin Submission Queue Size (ASQS): > > Defines the size of the Admin Submission Queue in entries. >

Re: [PATCH 14/25] block/nvme: Use definitions instead of magic values in add_io_queue()

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Replace magic values by definitions, and simplifiy since the > number of queues will never reach 64K. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 9 + > 1 file changed,

Re: [PATCH] block: Move bdrv_drain_all_end_quiesce() to block_int.h

2020-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2020 at 09:07:34AM +0100, Greg Kurz wrote: > This function is really an internal helper for bdrv_close(). Update its > doc comment to make this clear and make the function private. > > Signed-off-by: Greg Kurz > --- > > As suggested by Stefan here: > > https://lists.gnu.org/arch

Re: [PATCH v3 7/7] block: check availablity for preadv/pwritev on mac

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 08:07:01PM -0700, Joelle van Dyne wrote: > macOS 11/iOS 14 added preadv/pwritev APIs. Due to weak linking, configure > will succeed with CONFIG_PREADV even when targeting a lower OS version. We > therefore need to check at run time if we can actually use these APIs. > > Sig

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-28 Thread Kevin Wolf
Am 28.10.2020 um 08:01 hat Markus Armbruster geschrieben: > Paolo Bonzini writes: > > > On 26/10/20 11:10, Markus Armbruster wrote: > >> Kevin's "[PATCH v2 0/6] qemu-storage-daemon: QAPIfy --chardev" > >> involves surgery to the QAPI generator. Some (most?) of it should go > >> away if we deprec

Re: [PATCH v3 3/7] qemu: add support for iOS host

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 08:06:57PM -0700, Joelle van Dyne wrote: > This introduces support for building for iOS hosts. When the correct Xcode > toolchain is used, iOS host will be detected automatically. > > block: disable features not supported by iOS sandbox > slirp: disable SMB features for iOS

Re: [PATCH v3 1/7] configure: option to disable host block devices

2020-10-28 Thread Stefan Hajnoczi
On Tue, Oct 27, 2020 at 08:06:55PM -0700, Joelle van Dyne wrote: > Some hosts (iOS) have a sandboxed filesystem and do not provide low-level > APIs for interfacing with host block devices. > > Signed-off-by: Joelle van Dyne > --- > configure | 4 > meson.build| 1 + > block

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Rename Submission Queue flags with 'Sq' ... to differentiate submission queue flags from command queue flags. and introduce > Completion Queue flag definitions. besides Reviewed-by: Eric Auger Thanks Eric > > Signed-off-by: Philippe M

Re: [PATCH 12/25] block/nvme: Make nvme_init_queue() return boolean indicating error

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. > This simplifies a bit nvme_create_queue_pair(). also dir

Re: [PATCH 11/25] block/nvme: Make nvme_identify() return boolean indicating error

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. Then I think the returned value should be used by the cal

Re: [PATCH 10/25] block/nvme: Use unsigned integer for queue counter/size

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > We can not have negative queue count/size/index, use unsigned type. > Rename 'nr_queues' as 'queue_count' to match the spec naming. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c

Re: [PATCH 09/25] block/nvme: Move definitions before structure declarations

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > To be able to use some definitions in structure declarations, > move them earlier. No logical change. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 19 ++- > 1 file change

Re: [PATCH 04/25] block/nvme: Trace controller capabilities

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/28/20 11:25 AM, Philippe Mathieu-Daudé wrote: > On 10/28/20 11:20 AM, Auger Eric wrote: >> Hi Philippe, >> >> On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: >>> Controllers have different capabilities and report them in the >>> CAP register. We are particularly interested by

Re: [PATCH 06/25] block/nvme: Improve nvme_free_req_queue_wait() trace information

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > What we want to trace is the block driver state and the queue index. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 2 +- > block/trace-event

Re: [PATCH 04/25] block/nvme: Trace controller capabilities

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/28/20 11:20 AM, Auger Eric wrote: > Hi Philippe, > > On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: >> Controllers have different capabilities and report them in the >> CAP register. We are particularly interested by the page size >> limits. >> >> Reviewed-by: Stefan Hajnoczi >> Signed-

Re: [PATCH 05/25] block/nvme: Trace nvme_poll_queue() per queue

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > As we want to enable multiple queues, report the event > in each nvme_poll_queue() call, rather than once in > the callback calling nvme_poll_queues(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > ---

Re: [PATCH 07/25] block/nvme: Trace queue pair creation/deletion

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 3 +++ > block/trace-events | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/block/nvme.c b/block/nvme.c > inde

Re: [PATCH 03/25] block/nvme: Report warning with warn_report()

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Instead of displaying warning on stderr, use warn_report() > which also displays it on the monitor. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 4 ++-- > 1 file changed

Re: [PATCH 04/25] block/nvme: Trace controller capabilities

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Controllers have different capabilities and report them in the > CAP register. We are particularly interested by the page size > limits. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme

Re: [PATCH 02/25] block/nvme: Use hex format to display offset in trace events

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Use the same format used for the hw/vfio/ trace events. > > Suggested-by: Eric Auger > Signed-off-by: Philippe Mathieu-Daudé > --- > block/trace-events | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > di

Re: [PATCH] hw/sd: Zero out function selection fields before being populated

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/28/20 2:36 AM, Bin Meng wrote: > Hi Niek, > > On Wed, Oct 28, 2020 at 3:55 AM Niek Linnenbank > wrote: >> >> Hello Philippe, Bin, >> >> Thanks for your support on this. I've just tried this patch and >> unfortunately it doesn't seem to >> resolve the issue, at least on my machine. This is

Re: [PATCH v3 00/15] python: create installable package

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/27/20 11:08 PM, John Snow wrote: > Ping O:-) > > Looking for feedback from at least Cleber and Eduardo before I barge > ahead and send a PR to include this on master. Additional packaging and > versioning feedback from Dan would be nice. > > (I know we have a very busy two weeks here; I wil

Re: [PATCH 3/3] iotests: Use Python 3 style super()

2020-10-28 Thread Philippe Mathieu-Daudé
On 10/27/20 5:38 PM, Kevin Wolf wrote: > pylint complains about the use of super with the current class and > instance as arguments in VM.__init__(): > > iotests.py:546:8: R1725: Consider using Python 3 style super() without > arguments (super-with-arguments) > > No reason not to follow the advi

Re: [PATCH v2 1/1] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-10-28 Thread Philippe Mathieu-Daudé
Hi Joe, On 10/28/20 12:43 AM, Joe Komlodi wrote: > Numonyx chips determine the number of cycles to wait based on bits 7:4 in the > volatile configuration register. > > However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is > 10 on a QIOR or QIOR4 command, or 8 on any other c

  1   2   >