Re: [PATCH 9/9] qapi: Extend -compat to set policy for unstable interfaces

2021-10-26 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> New option parameters unstable-input and unstable-output set policy >> for unstable interfaces just like deprecated-input and >> deprecated-output set policy for deprecated interfaces (see commit >> 6dd75472d5

Re: [PATCH 5/9] qapi: Generalize struct member policy checking

2021-10-26 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 10/25/21 07:25, Markus Armbruster wrote: >> The generated visitor functions call visit_deprecated_accept() and >> visit_deprecated() when visiting a struct member with special feature >> flag 'deprecated'. This makes the feature flag visible to the actual >>

Re: [PATCH 2/9] qapi: Mark unstable QMP parts with feature 'unstable'

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Tue, Oct 26, 2021 at 3:56 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster >> wrote: >> > >> >> Add special feature 'unstable' everywhere the name starts with 'x-', >> >> except for InputBarrierProperties

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Oct 26, 2021 at 05:15:10PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Oct 26, 2021 at 11:37:19AM +0200, Markus Armbruster wrote: [...] >> >> Management applications are better off with a feature flag than with a >> >>

Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-10-26 Thread Markus Armbruster
Stefano Garzarella writes: > Commit d7ddd0a161 ("linux-aio: limit the batch size using > `aio-max-batch` parameter") added a way to limit the batch size > of Linux AIO backend for the entire AIO context. > > The same AIO context can be shared by multiple devices, so > latency-sensitive devices

Re: [PATCH v2 12/15] iotests/linters: Add entry point for linting via Python CI

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 2:36 PM John Snow wrote: > > > On Tue, Oct 26, 2021 at 6:57 AM Hanna Reitz wrote: > >> On 19.10.21 16:49, John Snow wrote: >> > We need at least a tiny little shim here to join test file discovery >> > with test invocation. This logic could conceivably be hosted

Re: [PATCH v2 0/2] pylint: fix new errors and warnings in qemu-iotests

2021-10-26 Thread John Snow
On Mon, Oct 11, 2021 at 5:58 AM Emanuele Giuseppe Esposito < eespo...@redhat.com> wrote: > > > On 11/10/2021 11:29, Hanna Reitz wrote: > > On 08.10.21 08:28, Emanuele Giuseppe Esposito wrote: > >> There are some warnings and errors that we either miss or > >> are new in pylint. Anyways, test 297

Re: [PATCH 9/9] qapi: Extend -compat to set policy for unstable interfaces

2021-10-26 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > New option parameters unstable-input and unstable-output set policy > for unstable interfaces just like deprecated-input and > deprecated-output set policy for deprecated interfaces (see commit > 6dd75472d5 "qemu-options: New -compat to set policy

Re: [PATCH v2 12/15] iotests/linters: Add entry point for linting via Python CI

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 6:57 AM Hanna Reitz wrote: > On 19.10.21 16:49, John Snow wrote: > > We need at least a tiny little shim here to join test file discovery > > with test invocation. This logic could conceivably be hosted somewhere > > in python/, but I felt it was strictly the least-rude

Re: [PATCH v2 11/15] iotests: split linters.py out from 297

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 6:51 AM Hanna Reitz wrote: > On 19.10.21 16:49, John Snow wrote: > > Now, 297 is just the iotests-specific incantations and linters.py is as > > minimal as I can think to make it. The only remaining element in here > > that ought to be configuration and not code is the

Re: [PATCH 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-10-26 Thread Klaus Jensen
On Oct 7 18:23, Lukasz Maniak wrote: > Hi, > > This series of patches is an attempt to add support for the following > sections of NVMe specification revision 1.4: > > 8.5 Virtualization Enhancements (Optional) > 8.5.1 VQ Resource Definition > 8.5.2 VI Resource Definition > 8.5.3

[PATCH v5 6/8] iotests/300: avoid abnormal shutdown race condition

2021-10-26 Thread John Snow
Wait for the destination VM to close itself instead of racing to shut it down first, which produces different error log messages from AQMP depending on precisely when we tried to shut it down. (For example: We may try to issue 'quit' immediately prior to the target VM closing its QMP socket,

Re: [PATCH v2 08/15] iotests/297: Change run_linter() to raise an exception on failure

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 6:10 AM Hanna Reitz wrote: > On 19.10.21 16:49, John Snow wrote: > > Instead of using a process return code as the python function return > > value (or just not returning anything at all), allow run_linter() to > > raise an exception instead. > > > > The responsibility

[PATCH v5 7/8] python/aqmp: Create sync QMP wrapper for iotests

2021-10-26 Thread John Snow
This is a wrapper around the async QMPClient that mimics the old, synchronous QEMUMonitorProtocol class. It is designed to be interchangeable with the old implementation. It does not, however, attempt to mimic Exception compatibility. Signed-off-by: John Snow Acked-by: Hanna Reitz ---

[PATCH v5 5/8] iotests: Conditionally silence certain AQMP errors

2021-10-26 Thread John Snow
AQMP likes to be very chatty about errors it encounters. In general, this is good because it allows us to get good diagnostic information for otherwise complex async failures. For example, during a failed QMP connection attempt, we might see: +ERROR:qemu.aqmp.qmp_client.qemub-2536319:Negotiation

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Richard Henderson
On 10/26/21 10:26 AM, Thomas Huth wrote: Would it maybe make sense to tweak check_patch.pl to forbid __thread in certain folders only, e.g. block/ and util/ (i.e. where we know that there might be code that the iothreads are using)? This sounds plausible; hw/ too, perhaps. r~

[PATCH v5 2/8] python/machine: Handle QMP errors on close more meticulously

2021-10-26 Thread John Snow
To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may return errors encountered in the async bottom half on incoming message receipt, etc. (AQMP's disconnect,

Re: [PATCH v2 10/15] iotests/297: split test into sub-cases

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 6:29 AM Hanna Reitz wrote: > On 19.10.21 16:49, John Snow wrote: > > Take iotest 297's main() test function and split it into two sub-cases > > that can be skipped individually. We can also drop custom environment > > setup from the pylint test as it isn't needed. > > > >

[PATCH v5 4/8] iotests: Accommodate async QMP Exception classes

2021-10-26 Thread John Snow
(But continue to support the old ones for now, too.) There are very few cases of any user of QEMUMachine or a subclass thereof relying on a QMP Exception type. If you'd like to check for yourself, you want to grep for all of the derivatives of QMPError, excluding 'AQMPError' and its derivatives.

[PATCH v5 3/8] python/aqmp: Remove scary message

2021-10-26 Thread John Snow
The scary message interferes with the iotests output. Coincidentally, if iotests works by removing this, then it's good evidence that we don't really need to scare people away from using it. Signed-off-by: John Snow Acked-by: Hanna Reitz --- python/qemu/aqmp/__init__.py | 12 1

[PATCH v5 1/8] python/machine: remove has_quit argument

2021-10-26 Thread John Snow
If we spy on the QMP commands instead, we don't need callers to remember to pass it. Seems like a fair trade-off. The one slightly weird bit is overloading this instance variable for wait(), where we use it to mean "don't issue the qmp 'quit' command". This means that wait() will "fail" if the

[PATCH v5 0/8] Switch iotests to using Async QMP

2021-10-26 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-iotest-wrapper CI: https://gitlab.com/jsnow/qemu/-/pipelines/395925703 Hiya, This series continues where the last two AQMP series left off and adds a synchronous 'legacy' wrapper around the new AQMP interface, then drops it straight

[PATCH v5 8/8] python, iotests: replace qmp with aqmp

2021-10-26 Thread John Snow
Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync wrapper from qemu.aqmp instead. Add an escape hatch in the form of the environment variable QEMU_PYTHON_LEGACY_QMP which allows you to cajole QEMUMachine into using the old implementation, proving that both implementations

Re: [PATCH 01/15] pcie: Set default and supported MaxReadReq to 512

2021-10-26 Thread Knut Omang
On Tue, 2021-10-26 at 16:36 +0200, Lukasz Maniak wrote: > On Thu, Oct 07, 2021 at 06:12:41PM -0400, Michael S. Tsirkin wrote: > > On Thu, Oct 07, 2021 at 06:23:52PM +0200, Lukasz Maniak wrote: > > > From: Knut Omang > > > > > > Make the default PCI Express Capability for PCIe devices set > > >

Re: [PATCH 13/15] pcie: Add helpers to the SR/IOV API

2021-10-26 Thread Knut Omang
On Thu, 2021-10-07 at 18:24 +0200, Lukasz Maniak wrote: > From: Łukasz Gieryk > > Two convenience functions for retrieving: >  - the total number of VFs, >  - the PCIDevice object of the N-th VF. > > Signed-off-by: Łukasz Gieryk > --- >  hw/pci/pcie_sriov.c | 14 ++ >  

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Thomas Huth
On 26/10/2021 19.10, Richard Henderson wrote: On 10/26/21 9:34 AM, Stefan Hajnoczi wrote: On Tue, Oct 26, 2021 at 08:10:16AM -0700, Richard Henderson wrote: On 10/26/21 6:22 AM, Stefan Hajnoczi wrote: If "safe" TLS variables are opt-in then we'll likely have obscure bugs when code changes to

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Richard Henderson
On 10/26/21 9:34 AM, Stefan Hajnoczi wrote: On Tue, Oct 26, 2021 at 08:10:16AM -0700, Richard Henderson wrote: On 10/26/21 6:22 AM, Stefan Hajnoczi wrote: If "safe" TLS variables are opt-in then we'll likely have obscure bugs when code changes to access a TLS variable that was previously never

Re: [PATCH v4 6/8] iotests/300: avoid abnormal shutdown race condition

2021-10-26 Thread John Snow
On Mon, Oct 25, 2021 at 9:20 AM Hanna Reitz wrote: > On 13.10.21 23:57, John Snow wrote: > > Wait for the destination VM to close itself instead of racing to shut it > > down first, which produces different error log messages from AQMP > > depending on precisely when we tried to shut it down. >

Re: [PATCH 2/9] qapi: Mark unstable QMP parts with feature 'unstable'

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 3:56 AM Markus Armbruster wrote: > John Snow writes: > > > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster > wrote: > > > >> Add special feature 'unstable' everywhere the name starts with 'x-', > >> except for InputBarrierProperties member x-origin and > >>

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 08:10:16AM -0700, Richard Henderson wrote: > On 10/26/21 6:22 AM, Stefan Hajnoczi wrote: > > If "safe" TLS variables are opt-in then we'll likely have obscure bugs > > when code changes to access a TLS variable that was previously never > > accessed from a coroutine. There

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 08:32:11AM -0700, Richard Henderson wrote: > On 10/26/21 6:30 AM, Stefan Hajnoczi wrote: > > On Mon, Oct 25, 2021 at 10:19:04AM -0700, Richard Henderson wrote: > > > On 10/25/21 7:07 AM, Stefan Hajnoczi wrote: > > > > Compiler optimizations can cache TLS values across

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 04:10:16PM +0200, Kevin Wolf wrote: > Am 26.10.2021 um 15:41 hat Stefan Hajnoczi geschrieben: > > Actually, nevermind what I said about the callback scenario. I don't > > think that is a problem because the compiler cannot assume the __thread > > variable remains unchanged

[PATCH v2 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

2021-10-26 Thread Stefano Garzarella
Between the submission of a request and the unplug, other devices with larger limits may have been queued new requests without flushing the batch. Using the new `dev_max_batch` parameter, laio_io_unplug() can check if the batch exceeds the device limit to flush the current batch. Reviewed-by:

[PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-10-26 Thread Stefano Garzarella
Commit d7ddd0a161 ("linux-aio: limit the batch size using `aio-max-batch` parameter") added a way to limit the batch size of Linux AIO backend for the entire AIO context. The same AIO context can be shared by multiple devices, so latency-sensitive devices may want to limit the batch size even

[PATCH v2 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit()

2021-10-26 Thread Stefano Garzarella
This new parameter can be used by block devices to limit the Linux AIO batch size more than the limit set by the AIO context. file-posix backend supports this, passing its `aio-max-batch` option previously added. Add an helper function to calculate the maximum batch size. Reviewed-by: Stefan

[PATCH v2 0/3] linux-aio: allow block devices to limit aio-max-batch

2021-10-26 Thread Stefano Garzarella
v1: https://lore.kernel.org/qemu-devel/20210923143100.182979-1-sgarz...@redhat.com v2: - @aio-max-batch documentation rewrite [Stefan, Kevin] - added Stefan and Kevin R-b tags Commit d7ddd0a161 ("linux-aio: limit the batch size using `aio-max-batch` parameter") added a way to limit the batch

Re: [PATCH 7/9] qapi: Generalize enum member policy checking

2021-10-26 Thread John Snow
On Tue, Oct 26, 2021 at 5:43 AM Markus Armbruster wrote: > John Snow writes: > > > On Mon, Oct 25, 2021 at 1:26 AM Markus Armbruster > wrote: > > > >> The code to check enumeration value policy can see special feature > >> flag 'deprecated' in QEnumLookup member flags[value]. I want to make >

Re: [PATCH 5/9] qapi: Generalize struct member policy checking

2021-10-26 Thread Philippe Mathieu-Daudé
On 10/25/21 07:25, Markus Armbruster wrote: > The generated visitor functions call visit_deprecated_accept() and > visit_deprecated() when visiting a struct member with special feature > flag 'deprecated'. This makes the feature flag visible to the actual > visitors. I want to make feature flag

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Daniel P . Berrangé
On Tue, Oct 26, 2021 at 05:15:10PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Oct 26, 2021 at 11:37:19AM +0200, Markus Armbruster wrote: > >> Kevin Wolf writes: > >> > >> > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > >> >> By convention, names

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Richard Henderson
On 10/26/21 6:30 AM, Stefan Hajnoczi wrote: On Mon, Oct 25, 2021 at 10:19:04AM -0700, Richard Henderson wrote: On 10/25/21 7:07 AM, Stefan Hajnoczi wrote: Compiler optimizations can cache TLS values across coroutine yield points, resulting in stale values from the previous thread when a

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Oct 26, 2021 at 11:37:19AM +0200, Markus Armbruster wrote: >> Kevin Wolf writes: >> >> > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: >> >> By convention, names starting with "x-" are experimental. The parts >> >> of external interfaces so

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Richard Henderson
On 10/26/21 6:22 AM, Stefan Hajnoczi wrote: If "safe" TLS variables are opt-in then we'll likely have obscure bugs when code changes to access a TLS variable that was previously never accessed from a coroutine. There is no compiler error and no way to detect this. When it happens debugging it is

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Daniel P . Berrangé
On Tue, Oct 26, 2021 at 11:37:19AM +0200, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > >> By convention, names starting with "x-" are experimental. The parts > >> of external interfaces so named may be withdrawn or changed > >>

Re: [PATCH v5 0/6] block/rbd: migrate to coroutines and add write zeroes support

2021-10-26 Thread Peter Lieven
Am 25.10.21 um 14:58 schrieb Kevin Wolf: > Am 25.10.2021 um 13:39 hat Peter Lieven geschrieben: >> Am 16.09.21 um 14:34 schrieb Peter Lieven: >>> Am 09.07.21 um 12:21 schrieb Kevin Wolf: Am 08.07.2021 um 20:23 hat Peter Lieven geschrieben: > Am 08.07.2021 um 14:18 schrieb Kevin Wolf :

Re: [PATCH 01/15] pcie: Set default and supported MaxReadReq to 512

2021-10-26 Thread Lukasz Maniak
On Thu, Oct 07, 2021 at 06:12:41PM -0400, Michael S. Tsirkin wrote: > On Thu, Oct 07, 2021 at 06:23:52PM +0200, Lukasz Maniak wrote: > > From: Knut Omang > > > > Make the default PCI Express Capability for PCIe devices set > > MaxReadReq to 512. > > code says 256 > > > Tyipcal modern devices

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Kevin Wolf
Am 26.10.2021 um 15:41 hat Stefan Hajnoczi geschrieben: > Actually, nevermind what I said about the callback scenario. I don't > think that is a problem because the compiler cannot assume the __thread > variable remains unchanged across the callback. Therefore it cannot > safely cache the value.

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
Actually, nevermind what I said about the callback scenario. I don't think that is a problem because the compiler cannot assume the __thread variable remains unchanged across the callback. Therefore it cannot safely cache the value. So I think only the header file scenario is a problem. Stefan

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Mon, Oct 25, 2021 at 03:14:36PM +0100, Daniel P. Berrangé wrote: > On Mon, Oct 25, 2021 at 03:07:15PM +0100, Stefan Hajnoczi wrote: > > Compiler optimizations can cache TLS values across coroutine yield > > points, resulting in stale values from the previous thread when a > > coroutine is

Re: [RFC 1/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Mon, Oct 25, 2021 at 10:19:04AM -0700, Richard Henderson wrote: > On 10/25/21 7:07 AM, Stefan Hajnoczi wrote: > > Compiler optimizations can cache TLS values across coroutine yield > > points, resulting in stale values from the previous thread when a > > coroutine is re-entered by a new thread.

Re: [RFC 0/2] tls: add macros for coroutine-safe TLS variables

2021-10-26 Thread Stefan Hajnoczi
On Mon, Oct 25, 2021 at 05:27:29PM -0600, Warner Losh wrote: > On Mon, Oct 25, 2021 at 10:18 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > > > On 10/25/21 7:07 AM, Stefan Hajnoczi wrote: > > > This is a preview of how we can solve the coroutines TLS problem. > > Coroutines > > >

Re: [RFC PATCH: v4 1/2] add mi device in qemu

2021-10-26 Thread Padmakar Kalghatgi
This patch addresses most of the review comments raised by Klaus. Mainly, I have ensured that the emulated mi device in qemu posts the response rather than waiting for the guest-os(mi utility) to ask for the response. For the same purpose, I have added a new device called nvme-mi-slave which

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kevin Wolf
Am 26.10.2021 um 11:37 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > >> By convention, names starting with "x-" are experimental. The parts > >> of external interfaces so named may be withdrawn or changed > >>

Re: [PATCH v2 11/15] iotests: split linters.py out from 297

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: Now, 297 is just the iotests-specific incantations and linters.py is as minimal as I can think to make it. The only remaining element in here that ought to be configuration and not code is the list of skip files, but they're still numerous enough that

Re: [PATCH 8/9] qapi: Factor out compat_policy_input_ok()

2021-10-26 Thread Philippe Mathieu-Daudé
On 10/26/21 11:46, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 10/25/21 07:25, Markus Armbruster wrote: >>> The code to check policy for handling deprecated input is triplicated. >>> Factor it out into compat_policy_input_ok() before I mess with it in >>> the next commit.

Re: [PATCH] block-backend: Silence clang -m32 compiler warning

2021-10-26 Thread Philippe Mathieu-Daudé
On 10/26/21 11:07, Hanna Reitz wrote: > Similarly to e7e588d432d31ecebc26358e47201dd108db964c, there is a > warning in block/block-backend.c that qiov->size <= INT64_MAX is always > true on machines where size_t is narrower than a uint64_t. In said > commit, we silenced this warning by casting to

Re: [PATCH v2 12/15] iotests/linters: Add entry point for linting via Python CI

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: We need at least a tiny little shim here to join test file discovery with test invocation. This logic could conceivably be hosted somewhere in python/, but I felt it was strictly the least-rude thing to keep the test logic here in iotests/, even if this small

Re: [PATCH v2 10/15] iotests/297: split test into sub-cases

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: Take iotest 297's main() test function and split it into two sub-cases that can be skipped individually. We can also drop custom environment setup from the pylint test as it isn't needed. Signed-off-by: John Snow --- tests/qemu-iotests/297 | 63

Re: [PATCH v2 09/15] iotests/297: update tool availability checks

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: As mentioned in 'iotests/297: Don't rely on distro-specific linter binaries', these checks are overly strict. Update them to be in-line with how we actually invoke the linters themselves. Signed-off-by: John Snow --- tests/qemu-iotests/297 | 9 +

Re: [PATCH v2 08/15] iotests/297: Change run_linter() to raise an exception on failure

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: Instead of using a process return code as the python function return value (or just not returning anything at all), allow run_linter() to raise an exception instead. The responsibility for printing output on error shifts from the function itself to the

Re: [PATCH v2 07/15] iotests/297: refactor run_[mypy|pylint] as generic execution shim

2021-10-26 Thread Hanna Reitz
On 19.10.21 16:49, John Snow wrote: There's virtually nothing special here anymore; we can combine these into a single, rather generic function. Signed-off-by: John Snow --- tests/qemu-iotests/297 | 42 ++ 1 file changed, 22 insertions(+), 20

Re: [PATCH 8/9] qapi: Factor out compat_policy_input_ok()

2021-10-26 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 10/25/21 07:25, Markus Armbruster wrote: >> The code to check policy for handling deprecated input is triplicated. >> Factor it out into compat_policy_input_ok() before I mess with it in >> the next commit. >> >> Signed-off-by: Markus Armbruster >> --- >>

Re: [PATCH 7/9] qapi: Generalize enum member policy checking

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Mon, Oct 25, 2021 at 1:26 AM Markus Armbruster wrote: > >> The code to check enumeration value policy can see special feature >> flag 'deprecated' in QEnumLookup member flags[value]. I want to make >> feature flag 'unstable' visible there as well, so I can add policy for

Re: [PATCH 6/9] qapi: Generalize command policy checking

2021-10-26 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 10/25/21 07:25, Markus Armbruster wrote: >> The code to check command policy can see special feature flag >> 'deprecated' as command flag QCO_DEPRECATED. I want to make feature >> flag 'unstable' visible there as well, so I can add policy for it. >> >> To

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Markus Armbruster
Kevin Wolf writes: > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: >> By convention, names starting with "x-" are experimental. The parts >> of external interfaces so named may be withdrawn or changed >> incompatibly in future releases. >> >> Drawback: promoting something from

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Daniel P . Berrangé
On Tue, Oct 26, 2021 at 10:22:15AM +0100, Dr. David Alan Gilbert wrote: > * Kevin Wolf (kw...@redhat.com) wrote: > > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > > > By convention, names starting with "x-" are experimental. The parts > > > of external interfaces so named may be

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > > By convention, names starting with "x-" are experimental. The parts > > of external interfaces so named may be withdrawn or changed > > incompatibly in future releases. > > > > Drawback:

Re: [PATCH v2 1/4] qemu-img: implement compare --stat

2021-10-26 Thread Vladimir Sementsov-Ogievskiy
26.10.2021 11:47, Hanna Reitz wrote: On 26.10.21 09:53, Vladimir Sementsov-Ogievskiy wrote: 25.10.2021 19:40, Hanna Reitz wrote: On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: With new option qemu-img compare will not stop at first mismatch, but instead calculate statistics: how many

Re: [PATCH 5/9] qapi: Generalize struct member policy checking

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster wrote: > >> The generated visitor functions call visit_deprecated_accept() and >> visit_deprecated() when visiting a struct member with special feature >> flag 'deprecated'. This makes the feature flag visible to the actual

[PATCH] block-backend: Silence clang -m32 compiler warning

2021-10-26 Thread Hanna Reitz
Similarly to e7e588d432d31ecebc26358e47201dd108db964c, there is a warning in block/block-backend.c that qiov->size <= INT64_MAX is always true on machines where size_t is narrower than a uint64_t. In said commit, we silenced this warning by casting to uint64_t. The commit introducing this

Re: [PATCH 4/9] qapi: Tools for sets of special feature flags in generated code

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster wrote: > >> New enum QapiSpecialFeature enumerates the special feature flags. >> >> New helper gen_special_features() returns code to represent a >> collection of special feature flags as a bitset. >> >> The next few commits

Re: [PATCH v2 1/4] qemu-img: implement compare --stat

2021-10-26 Thread Hanna Reitz
On 26.10.21 09:53, Vladimir Sementsov-Ogievskiy wrote: 25.10.2021 19:40, Hanna Reitz wrote: On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: With new option qemu-img compare will not stop at first mismatch, but instead calculate statistics: how many clusters with different data, how many

Re: [Libguestfs] [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kashyap Chamarthy
On Tue, Oct 26, 2021 at 09:37:29AM +0200, Kevin Wolf wrote: > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: [...] > > This commit updates documentation and prepares tests. The next commit > > updates the QAPI schema. The remaining patches update the QAPI > > generator and wire up

Re: [PATCH v2 4/4] iotests: add qemu-img-compare-stat test

2021-10-26 Thread Hanna Reitz
On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: Test new feature qemu-img compare --stat. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/tests/qemu-img-compare-stat | 88 +++ .../tests/qemu-img-compare-stat.out | 106 ++ 2

Re: [PATCH v2 2/4] qemu-img: make --block-size optional for compare --stat

2021-10-26 Thread Hanna Reitz
On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: Let's detect block-size automatically if not specified by user: If both files define cluster-size, use minimum to be more precise. If both files don't specify cluster-size, use default of 64K If only one file specify cluster-size,

Re: [PATCH v2 3/4] qemu-img: add --shallow option for qemu-img compare

2021-10-26 Thread Hanna Reitz
On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: Allow compare only top images of backing chains. This is useful to compare images with same backing file or to compare incremental images from the chain of incremental backups with "--stat" option. Signed-off-by: Vladimir

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Markus Armbruster
Kashyap Chamarthy writes: > On Mon, Oct 25, 2021 at 07:25:24AM +0200, Markus Armbruster wrote: >> By convention, names starting with "x-" are experimental. The parts >> of external interfaces so named may be withdrawn or changed >> incompatibly in future releases. >> >> Drawback: promoting

Re: [PATCH 2/9] qapi: Mark unstable QMP parts with feature 'unstable'

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster wrote: > >> Add special feature 'unstable' everywhere the name starts with 'x-', >> except for InputBarrierProperties member x-origin and >> MemoryBackendProperties member x-use-canonical-path-for-ramblock-id, >> because

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kashyap Chamarthy
On Tue, Oct 26, 2021 at 09:15:30AM +0200, Markus Armbruster wrote: > Kashyap Chamarthy writes: > > > On Mon, Oct 25, 2021 at 07:25:24AM +0200, Markus Armbruster wrote: [...] > > Looks like there's another stable property with an "x-" prefix: > > "x-remote-object", part of QOM type

Re: [PATCH 3/9] qapi: Eliminate QCO_NO_OPTIONS for a slight simplification

2021-10-26 Thread Markus Armbruster
John Snow writes: > On Mon, Oct 25, 2021 at 1:25 AM Markus Armbruster wrote: > >> Signed-off-by: Markus Armbruster >> --- >> include/qapi/qmp/dispatch.h | 1 - >> monitor/misc.c | 3 +-- >> scripts/qapi/commands.py| 5 + >> 3 files changed, 2 insertions(+), 7 deletions(-)

Re: [PATCH v2 1/4] qemu-img: implement compare --stat

2021-10-26 Thread Vladimir Sementsov-Ogievskiy
25.10.2021 19:40, Hanna Reitz wrote: On 21.10.21 12:12, Vladimir Sementsov-Ogievskiy wrote: With new option qemu-img compare will not stop at first mismatch, but instead calculate statistics: how many clusters with different data, how many clusters with equal data, how many clusters were

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kevin Wolf
Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > By convention, names starting with "x-" are experimental. The parts > of external interfaces so named may be withdrawn or changed > incompatibly in future releases. > > Drawback: promoting something from experimental to stable involves