Re: [Qemu-block] [Qemu-devel] [PATCH v7 26/38] libqtest: Merge qtest_end() into qtest_quit()

2017-09-11 Thread John Snow
On 09/11/2017 01:20 PM, Eric Blake wrote: > Rather than have two similar shutdown functions, where one requires > the use of global_qtest in the header, it is better to have a single > shutdown function that still takes care of cleaning up global_qtest > if it is set. All callers are updated. >

Re: [Qemu-block] [Qemu-devel] [PATCH v7 18/38] ahci-test: Drop dependence on global_qtest

2017-09-11 Thread John Snow
On 09/11/2017 08:20 PM, John Snow wrote: > > > On 09/11/2017 01:20 PM, Eric Blake wrote: >> Managing parallel connections to two different monitors via >> the implicit global_qtest makes it hard to copy-and-paste code >> to tests that are not aware of the implicit state; the >> management of gl

Re: [Qemu-block] [Qemu-devel] [PATCH v7 18/38] ahci-test: Drop dependence on global_qtest

2017-09-11 Thread John Snow
On 09/11/2017 01:20 PM, Eric Blake wrote: > Managing parallel connections to two different monitors via > the implicit global_qtest makes it hard to copy-and-paste code > to tests that are not aware of the implicit state; the > management of global_qtest is even harder to follow because > it was

Re: [Qemu-block] [Qemu-devel] [PATCH v7 17/38] libqos: Use explicit QTestState for remaining libqos operations

2017-09-11 Thread John Snow
On 09/11/2017 01:20 PM, Eric Blake wrote: > Drop one more client of global_qtest by teaching all remaining > libqos stragglers to pass in an explicit QTestState. Change the > setting of global_qtest from being implicit in libqos' call to > qtest_start() to instead be explicit in all clients that

Re: [Qemu-block] [Qemu-devel] [PATCH v7 16/38] libqos: Use explicit QTestState for ahci operations

2017-09-11 Thread John Snow
On 09/11/2017 01:20 PM, Eric Blake wrote: > Drop one more client of global_qtest by teaching all ahci test > functionality to pass in an explicit QTestState. The state was > already available, so no callers had to be adjusted. > > Signed-off-by: Eric Blake I should admit that this makes my ur

Re: [Qemu-block] [Qemu-devel] [PATCH v7 13/38] libqos: Use explicit QTestState for fw_cfg operations

2017-09-11 Thread John Snow
On 09/11/2017 01:19 PM, Eric Blake wrote: > Drop one more client of global_qtest by teaching all fw_cfg test > functionality (invoked through alloc-pc) to pass in an explicit > QTestState, adjusting all callers. In particular, fw_cfg-test > had to reorder things to create the test state prior to

Re: [Qemu-block] [Qemu-devel] [PATCH v7 08/38] libqos: Track QTestState with QPCIBus

2017-09-11 Thread John Snow
On 09/11/2017 01:19 PM, Eric Blake wrote: > When initializing a QPCIBus, track which QTestState the bus is > associated with (so that a later patch can then explicitly use > that test state for all communication on the bus, rather than > blindly relying on global_qtest). Update the initializatio

Re: [Qemu-block] [PATCH 00/12] cleanup qemu-iotests

2017-09-11 Thread Paolo Bonzini
- Original Message - > From: "John Snow" > To: "Paolo Bonzini" , qemu-de...@nongnu.org > Cc: kw...@redhat.com, qemu-block@nongnu.org > Sent: Tuesday, September 12, 2017 12:22:26 AM > Subject: Re: [Qemu-block] [PATCH 00/12] cleanup qemu-iotests > > > > On 08/09/2017 05:54 PM, Paolo Bon

Re: [Qemu-block] [PATCH 00/12] cleanup qemu-iotests

2017-09-11 Thread John Snow
On 08/09/2017 05:54 PM, Paolo Bonzini wrote: > The purpose of this series is to separate the "check" sources from > the tests. After these patches, common.config is reduced to simple > shell initialization, and common.rc is only included by the tests. > > Along the way, a lot of dead code is re

Re: [Qemu-block] [PATCH v7 35/38] libqtest: Merge qtest_{mem, buf}{read, write}() with {mem, buf}{read, write}()

2017-09-11 Thread Greg Kurz
On Mon, 11 Sep 2017 12:20:19 -0500 Eric Blake wrote: > Maintaining two layers of libqtest APIs, one that takes an explicit > QTestState object, and the other that uses the implicit global_qtest, > is annoying. In the interest of getting rid of global implicit > state and having less code to main

Re: [Qemu-block] [PATCH v7 17/38] libqos: Use explicit QTestState for remaining libqos operations

2017-09-11 Thread Greg Kurz
On Mon, 11 Sep 2017 12:20:01 -0500 Eric Blake wrote: > Drop one more client of global_qtest by teaching all remaining > libqos stragglers to pass in an explicit QTestState. Change the > setting of global_qtest from being implicit in libqos' call to > qtest_start() to instead be explicit in all c

[Qemu-block] [PATCH v7 36/38] libqtest: Merge qtest_memset() with qmemset()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_memset() with its short counterpart. All c

[Qemu-block] [PATCH v7 34/38] libqtest: Merge qtest_{read, write}[bwlq]() with {read, write}[bwlq]()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_readb() qtest_readw() qtest_readl() qtes

[Qemu-block] [PATCH v7 33/38] libqtest: Merge qtest_{in, out}[bwl]() with {in, out}[bwl]()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_outb() qtest_outw() qtest_outl() qtest_i

[Qemu-block] [PATCH v7 38/38] libqtest: Merge qtest_hmp() with hmp()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_hmp() with its short counterpart, and delet

[Qemu-block] [PATCH v7 31/38] libqtest: Merge qtest_clock_*() with clock_*()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_clock_set() qtest_clock_step() qtest_cloc

[Qemu-block] [PATCH v7 29/38] libqtest: Merge qtest_init() into qtest_start()

2017-09-11 Thread Eric Blake
Remove the trivial wrapper qtest_init(), and change qtest_start() to no longer implicitly set global_qtest, to make it obvious in the rest of the testsuite where we are still relying on global_qtest. Everything now uses qtest_start() (and friends) and qtest_quit(), and explicitly tracks the QTestSt

[Qemu-block] [PATCH v7 37/38] libqtest: Separate qmp_discard_response() from command

2017-09-11 Thread Eric Blake
Upcoming patches will be adding new convenience methods for constructing QMP commands. But making every variation of sending support every variation of response handling becomes unwieldy; it's easier to specify that discarding a JSON response is unassociated with sending the command, where qmp_asy

[Qemu-block] [PATCH v7 28/38] libqtest: Add qtest_[v]startf()

2017-09-11 Thread Eric Blake
We have several callers that were formatting the argument strings themselves; consolidate this effort by adding new convenience functions directly in libqtest, and update all call-sites that can benefit from it. Note that the new functions qtest_startf() and qtest_vstartf() behave more like qtest_

[Qemu-block] [PATCH v7 35/38] libqtest: Merge qtest_{mem, buf}{read, write}() with {mem, buf}{read, write}()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_memread() qtest_bufread() qtest_memwrite(

[Qemu-block] [PATCH v7 32/38] libqtest: Merge qtest_irq*() with irq*()

2017-09-11 Thread Eric Blake
Maintaining two layers of libqtest APIs, one that takes an explicit QTestState object, and the other that uses the implicit global_qtest, is annoying. In the interest of getting rid of global implicit state and having less code to maintain, merge: qtest_get_irq() qtest_irq_intercept_in() qtest_

[Qemu-block] [PATCH v7 26/38] libqtest: Merge qtest_end() into qtest_quit()

2017-09-11 Thread Eric Blake
Rather than have two similar shutdown functions, where one requires the use of global_qtest in the header, it is better to have a single shutdown function that still takes care of cleaning up global_qtest if it is set. All callers are updated. Signed-off-by: Eric Blake --- tests/libqtest.h

[Qemu-block] [PATCH v7 18/38] ahci-test: Drop dependence on global_qtest

2017-09-11 Thread Eric Blake
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state; the management of global_qtest is even harder to follow because it was masked behind set_context(). Instead, explicitly pass

[Qemu-block] [PATCH v7 17/38] libqos: Use explicit QTestState for remaining libqos operations

2017-09-11 Thread Eric Blake
Drop one more client of global_qtest by teaching all remaining libqos stragglers to pass in an explicit QTestState. Change the setting of global_qtest from being implicit in libqos' call to qtest_start() to instead be explicit in all clients that are still relying on global_qtest. Note that qmp_e

[Qemu-block] [PATCH v7 09/38] libqos: Track QTestState with QVirtioBus

2017-09-11 Thread Eric Blake
When initializing a QVirtioDevice (which always has an associated QVirtioBus), we want to track which QTestState to use for all I/O processed through that bus and device. Copy the paradigm used for QPCIBus, and track the test state at the bus level; this in turn requires a separate bus object per

[Qemu-block] [PATCH v7 16/38] libqos: Use explicit QTestState for ahci operations

2017-09-11 Thread Eric Blake
Drop one more client of global_qtest by teaching all ahci test functionality to pass in an explicit QTestState. The state was already available, so no callers had to be adjusted. Signed-off-by: Eric Blake --- v7: split libqos changes from test-ahci --- tests/libqos/ahci.c | 45

[Qemu-block] [PATCH v7 13/38] libqos: Use explicit QTestState for fw_cfg operations

2017-09-11 Thread Eric Blake
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg (and drop a pointless strdup in

[Qemu-block] [PATCH v7 12/38] libqos: Use explicit QTestState for virtio operations

2017-09-11 Thread Eric Blake
Now that QVirtioDevice and QVirtQueue point back to QVirtioBus, we can reuse the explicit QTestState stored there rather than relying on implicit global_qtest. We also have to pass QTestState through a few functions that can't trace back through QVirtioDevice, and update those callers. Drop some

[Qemu-block] [PATCH v7 11/38] libqos: Use explicit QTestState for pci operations

2017-09-11 Thread Eric Blake
Now that the QPCIBus tracks QTestState, use that state instead of an implicit reliance on global_qtest. Pass an explicit QTestState to the remaining few functions in the same file that don't have direct access to QPCIBus, and update all callers. Signed-off-by: Eric Blake --- v7: more sites with

[Qemu-block] [PATCH v7 08/38] libqos: Track QTestState with QPCIBus

2017-09-11 Thread Eric Blake
When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the initialization functions to take another parameter, and update al

[Qemu-block] [PATCH v7 10/38] libqos: Move/rename qpci_unplug_acpi_device_test() to pci.c

2017-09-11 Thread Eric Blake
Commit 2f8b2767 originally added qpci_plug_device_test() and qpci_unplug_acpi_device_test() as a pair, both in pci-pc.c. Later, commit cf716b31 moved one half of the pair to pci.c when adding PPC64 support. Keep the implementations of the two functions together, and shorten the name to qpci_unplug

[Qemu-block] loading bitmaps in invalidate_cache fails

2017-09-11 Thread Vladimir Sementsov-Ogievskiy
Hi Kevin! I'm confused with relations of permissions and invalidation, can you please help? Now dirty bitmaps are loaded in invalidate_cache. Here is a problem with migration: 1. destination starts (inactive) 2. load bitmaps readonly ... 3. invalidate_cache: here we should make our loade

Re: [Qemu-block] [PATCH V5 01/10] specs/qcow2: add compress format extension

2017-09-11 Thread Kevin Wolf
Am 25.07.2017 um 16:41 hat Peter Lieven geschrieben: > Signed-off-by: Peter Lieven > --- > docs/interop/qcow2.txt | 51 > +- > roms/ipxe | 2 +- > 2 files changed, 51 insertions(+), 2 deletions(-) > > diff --git a/docs/interop/qcow2.

Re: [Qemu-block] [PATCH V5 10/10] block/qcow2: add compress info to image specific info

2017-09-11 Thread Kevin Wolf
Am 25.07.2017 um 23:55 hat Eric Blake geschrieben: > On 07/25/2017 09:41 AM, Peter Lieven wrote: > > Signed-off-by: Peter Lieven > > --- > > block/qcow2.c| 7 +++ > > qapi/block-core.json | 6 +- > > 2 files changed, 12 insertions(+), 1 deletion(-) > > > > +++ b/qapi/block-core.j

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] iotests: use -ccw on s390x for 051

2017-09-11 Thread Lukáš Doktor
Dne 8.9.2017 v 17:55 Thomas Huth napsal(a): > On 08.09.2017 13:54, Kevin Wolf wrote: >> Am 08.09.2017 um 13:24 hat Cornelia Huck geschrieben: >>> On Fri, 8 Sep 2017 13:04:25 +0200 >>> Kevin Wolf wrote: >>> Am 05.09.2017 um 17:16 hat Cornelia Huck geschrieben: > The default cpu model on s3

Re: [Qemu-block] [PATCH] MAINTAINERS: update email, add missing test entry for megasas

2017-09-11 Thread Paolo Bonzini
On 10/09/2017 19:15, Philippe Mathieu-Daudé wrote: > and update maintainer email address > > Signed-off-by: Philippe Mathieu-Daudé > --- > Hannes Reinecke replied: > I'm currently on vacation with no internet access, but will be happy to > answer your mail once I'm back at work on Sep, 12th. >

Re: [Qemu-block] [Qemu-devel] [PATCH 09/10] scsi: add multipath support to qemu-pr-helper

2017-09-11 Thread Paolo Bonzini
On 30/08/2017 18:37, Stefan Hajnoczi wrote: > > The case statements asssume sz has a certain minimum value. I didn't > see a check anywhere that guarantees this. It may be easier to hide the > client's sz value and instead use sizeof(client->data). The caller can > worry about sz. Makes sense.