Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Put the init arg handling all at the top, and mostly in order (deviating
> when one is dependent on another), and put what is effectively runtime
> state declaration at the bottom.
>
> Signed-off-by: John Snow
> ---
> python/qemu/machine.py | 4
Am 07.10.2020 um 01:57 hat John Snow geschrieben:
> Borrowed from the QAPI cleanup series, use the same configuration to
> standardize the way we write and sort imports.
>
> Signed-off-by: John Snow
Reviewed-by: Kevin Wolf
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Like many other Optional[] types, it's not always a given that this
> object will be set. Wrap it in a type-shim that raises a meaningful
> error and will always return a concrete type.
>
> Signed-off-by: John Snow
> @@ -515,11 +515,13 @@ def s
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> As always, Optional[T] causes problems with unchecked access. Add a
> helper that asserts the pipe is present before we attempt to talk with
> it.
>
> Signed-off-by: John Snow
First a question about the preexisting state: I see that after
initi
29.09.2020 15:38, Andrey Shinkevich wrote:
If the flag BDRV_REQ_PREFETCH was set, pass it further to the
COR-driver to skip unneeded reading. It can be taken into account for
the COR-algorithms optimization. That check is being made during the
block stream job by the moment.
Signed-off-by: Andre
29.09.2020 15:38, Andrey Shinkevich wrote:
Avoid writing a filter JSON-name to QCOW2 image when the backing file
is changed after the block stream job.
Signed-off-by: Andrey Shinkevich
---
block/stream.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/block/strea
29.09.2020 15:38, Andrey Shinkevich wrote:
The block stream QMP parameter backing-file is in use no more. It
designates a backing file name to set in QCOW2 image header after the
block stream job finished. The base file name is used instead.
Signed-off-by: Andrey Shinkevich
We can't just remo
30.09.2020 15:11, Eric Blake wrote:
Honoring just SIGTERM on Linux is too weak; we also want to handle
other common signals, and do so even on BSD. Why? Because at least
'qemu-nbd -B bitmap' needs a chance to clean up the in-use bit on
bitmaps when the server is shut down via a signal.
Probab
30.09.2020 15:11, Eric Blake wrote:
The NBD spec is clear that any string sent from the client must not
contain embedded NUL characters. If the client passes "a\0", we
should reject that option request rather than act on "a".
Testing this is not possible with a compliant client, but I was able
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> These should all be purely annotations with no changes in behavior at
> all. You need to be in the python folder, but you should be able to
> confirm that these annotations are correct (or at least self-consistent)
> by running `mypy --strict qemu
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> The types and names of the parameters must match the socket.socket interface.
>
> Signed-off-by: John Snow
Reviewed-by: Kevin Wolf
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> The type and parameter names of recv() should match socket.socket().
Should this be socket.socket without parentheses (the class name)?
socket.socket() is the constructor and it takes very different
parameters.
> OK, easy enough, but in the case
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Finish the typing of console_socket.py with annotations and no code
> changes.
>
> Signed-off-by: John Snow
Reviewed-by: Kevin Wolf
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Mypy needs just a little help to guess the type here.
>
> Signed-off-by: John Snow
Reviewed-by: Kevin Wolf
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> We can work directly in bytes instead of translating back and forth to
> string, which removes the question of which encodings to use.
>
> Signed-off-by: John Snow
Reviewed-by: Kevin Wolf
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Use the "from ..." phrasing when re-raising errors to preserve their
> initial context, to help aid debugging when things go wrong.
>
> This also silences a pylint 2.6.0+ error.
>
> Signed-off-by: John Snow
I don't really understand what this
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Nested if conditions don't change when the exception block fires; we
> need to explicitly re-raise the error if we didn't intend to capture and
> suppress it.
>
> Signed-off-by: John Snow
> ---
> python/qemu/qmp.py | 6 +++---
> 1 file changed,
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Formalize the options used for checking the python library. You can run
> mypy from the directory that mypy.ini is in by typing `mypy qemu/`.
>
> Signed-off-by: John Snow
> ---
> python/mypy.ini | 4
> 1 file changed, 4 insertions(+)
> cr
30.09.2020 15:11, Eric Blake wrote:
We had a premature optimization of trying to read as little from the
wire as possible while handling NBD_OPT_SET_META_CONTEXT in phases.
But in reality, we HAVE to read the entire string from the client
before we can get to the next command, and it is easier to
The QCowL2Meta structure is used to store information about a part of
a write request that touches clusters that need changes in their L2
entries. This happens with newly-allocated clusters or subclusters.
This structure has changed a bit since it was first created and its
current documentation is
Thomas Huth writes:
> genisoimage is needed for running the tests/qtest/cdrom-test qtest.
Queued to testing/next, thanks.
>
> Signed-off-by: Thomas Huth
> ---
> tests/docker/dockerfiles/centos8.docker | 1 +
> tests/docker/dockerfiles/debian-amd64.docker | 1 +
> tests/docker/dockerfil
From: Maxim Levitsky
The purpose of qtest_qmp_receive_success was mostly to process events
that arrived between the issueing of a command and the "return"
line from QMP. This is now handled by the buffering of events
that libqtest performs automatically.
Signed-off-by: Maxim Levitsky
[Extracte
From: Maxim Levitsky
Let test use the new functionality for buffering events.
The only remaining users of qtest_qmp_receive_dict are tests
that fuzz the QMP protocol.
Tested with 'make check-qtest'.
Signed-off-by: Maxim Levitsky
Message-Id: <20201006123904.610658-4-mlevi...@redhat.com>
Signed-
Hopefully the final version of the patches, fixing the remaining
testsuite issues. Kevin or Max, please take a look at patches 6 and 7
as they affect qemu-iotests.
Paolo
Maxim Levitsky (11):
qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
qtest: Reintroduce qtest_qmp_receive
qtes
From: Maxim Levitsky
In the next patch a new version of qtest_qmp_receive will be
reintroduced that will buffer received qmp events for later
consumption in qtest_qmp_eventwait_ref
No functional change intended.
Suggested-by: Paolo Bonzini
Signed-off-by: Maxim Levitsky
Signed-off-by: Paolo Bo
Do not just trust the HMP commands to create and delete the drive, use
query-block to check that this is actually the case.
Signed-off-by: Paolo Bonzini
---
tests/qtest/drive_del-test.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/tests/qte
Check if an address is free on the bus before plugging in the
device. This makes it possible to do the check without any
side effects, and to detect the problem early without having
to do it in the realize callback.
Signed-off-by: Paolo Bonzini
Message-Id: <20201006123904.610658-5-mlevi...@redha
Test 067 from qemu-iotests is executing QMP commands to hotplug
and hot-unplug disks, devices and blockdevs. Because the power
of the text-based test harness is limited, it is actually limiting
the checks that it does, for example by skipping DEVICE_DELETED
events.
tests/qtest already has a simil
From: Maxim Levitsky
Add scsi_device_get which finds the scsi device
and takes a reference to it.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Maxim Levitsky
Message-Id: <20200913160259.32145-8-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
Message-Id: <20201006123904.610658-12-mlevi...@re
From: Maxim Levitsky
This change will allow us to convert the bus children list to RCU,
while not changing the logic of this function
Signed-off-by: Maxim Levitsky
Reviewed-by: Stefan Hajnoczi
Message-Id: <20200913160259.32145-2-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
---
hw/scsi/s
From: Maxim Levitsky
Some code might race with placement of new devices on a bus.
We currently first place a (unrealized) device on the bus
and then realize it.
As a workaround, users that scan the child device list, can
check the realized property to see if it is safe to access such a device.
U
The device core first places a device on the bus and then realizes it.
Make scsi_device_find avoid returing such devices to avoid
races in drivers that use an iothread (currently virtio-scsi)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1812399
Suggested-by: Paolo Bonzini
Signed-off-by:
From: Maxim Levitsky
This fixes the race between device emulation code that tries to find
a child device to dispatch the request to (e.g a scsi disk),
and hotplug of a new device to that bus.
Note that this doesn't convert all the readers of the list
but only these that might go over that list w
Simplify the code now that events are buffered. There is no need
anymore to separate sending the command and retrieving the response.
Signed-off-by: Paolo Bonzini
---
tests/qtest/device-plug-test.c | 32 +---
1 file changed, 9 insertions(+), 23 deletions(-)
diff --g
From: Maxim Levitsky
Soon, a device removal might only happen on RCU callback execution.
This is okay for device-del which provides a DEVICE_DELETED event,
but not for the failure case of device-add. To avoid changing
monitor semantics, just drain all pending RCU callbacks on error.
Signed-off-
Signed-off-by: Paolo Bonzini
Message-Id: <20201006123904.610658-6-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.c | 122 -
1 file changed, 75 insertions(+), 47 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
From: Maxim Levitsky
The new qtest_qmp_receive buffers all the received qmp events, allowing
qtest_qmp_eventwait_ref to return them.
This is intended to solve the race in regard to ordering of qmp events
vs qmp responses, as soon as the callers start using the new interface.
In addition to that
From: Maxim Levitsky
This will help us to avoid the scsi device disappearing
after we took a reference to it.
It doesn't by itself forbid case when we try to access
an unrealized device
Suggested-by: Stefan Hajnoczi
Signed-off-by: Maxim Levitsky
Reviewed-by: Stefan Hajnoczi
Message-Id: <2020
From: Maxim Levitsky
Currently scsi_target_emulate_report_luns iterates over the child device list
twice, and there is no guarantee that this list is the same in both iterations.
The reason for iterating twice is that the first iteration calculates
how much memory to allocate. However if we use
Patchew URL:
https://patchew.org/QEMU/20201007115700.707938-1-pbonz...@redhat.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20201007115700.707938-1-pbonz...@redhat.com
Subject: [PATCH v8 00/17] Fix scsi devices p
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
> Be a little more rigorous about which exception we use, and when.
> Primarily, this makes QMPCapabilitiesError an extension of
> QMPprotocolError.
>
> The family of errors:
>
> QMPError (generic base)
> QMPConnectError (For connection issues)
30.09.2020 15:11, Eric Blake wrote:
'qemu-img map' provides a way to determine which extents of an image
come from the top layer vs. inherited from a backing chain. This is
useful information worth exposing over NBD. There is a proposal to
add a QMP command block-dirty-bitmap-populate which can
On Tue, Sep 29, 2020 at 12:48:38PM +0300, Dima Stepanov wrote:
> On Tue, Sep 29, 2020 at 03:13:09AM -0400, Michael S. Tsirkin wrote:
> > On Sun, Sep 27, 2020 at 09:48:28AM +0300, Dima Stepanov wrote:
> > > On Thu, Sep 24, 2020 at 07:26:14AM -0400, Michael S. Tsirkin wrote:
> > > > On Fri, Sep 11, 2
30.09.2020 15:11, Eric Blake wrote:
Allow the server to expose an additional metacontext to be requested
by savvy clients. qemu-nbd adds a new option -A to expose the
qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this
can also be set via QMP when using block-export-add.
qemu a
On 10/7/20 6:52 AM, Alberto Garcia wrote:
> The QCowL2Meta structure is used to store information about a part of
> a write request that touches clusters that need changes in their L2
> entries. This happens with newly-allocated clusters or subclusters.
>
> This structure has changed a bit since i
07.10.2020 14:52, Alberto Garcia wrote:
The QCowL2Meta structure is used to store information about a part of
a write request that touches clusters that need changes in their L2
entries. This happens with newly-allocated clusters or subclusters.
This structure has changed a bit since it was firs
On Wed 07 Oct 2020 04:42:37 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
>> /**
>> - * The COW Region between the start of the first allocated cluster and
>> the
>> - * area the guest actually writes to.
>> + * The COW Region immediately before the area the guest actually
>> +
07.10.2020 18:38, Alberto Garcia wrote:
On Wed 07 Oct 2020 04:42:37 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
/**
- * The COW Region between the start of the first allocated cluster and the
- * area the guest actually writes to.
+ * The COW Region immediately before the are
A recent change to weak reset handling broke replay due to the use of
aio_bh_schedule_oneshot instead of the replay aware
replay_bh_schedule_oneshot_event.
Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
Suggested-by: Pavel Dovgalyuk
Signed-off-by: Alex Bennée
---
hw/ide/core.c | 4
On Wed 07 Oct 2020 05:47:32 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
> 07.10.2020 18:38, Alberto Garcia wrote:
>> On Wed 07 Oct 2020 04:42:37 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
/**
- * The COW Region between the start of the first allocated cluster
and the
>
The QCowL2Meta structure is used to store information about a part of
a write request that touches clusters that need changes in their L2
entries. This happens with newly-allocated clusters or subclusters.
This structure has changed a bit since it was first created and its
current documentation is
This adds a special meaning for 'help' and '?' as options to the keyval
parser. Instead of being an error (because of a missing value) or a
value for an implied key, they now request help, which is a new boolean
ouput of the parser in addition to the QDict.
A new parameter 'p_help' is added to key
The command line parser for --object parses the input twice: Once into
QemuOpts just for detecting help options, and then again into a QDict
using the keyval parser for actually creating the object.
Now that the keyval parser can also detect help options, we can simplify
this and remove the QemuOp
On 10/7/20 12:00 PM, Alex Bennée wrote:
A recent change to weak reset handling broke replay due to the use of
aio_bh_schedule_oneshot instead of the replay aware
replay_bh_schedule_oneshot_event.
Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
Suggested-by: Pavel Dovgalyuk
Signed-of
This creates separate helper functions for printing a list of user
creatable object types and for printing a list of properties of a given
type. This will allow using these parts without having a QemuOpts.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Markus Armbruster
---
qom
This replaces the QemuOpts-based help code for --object in the storage
daemon with code based on the keyval parser.
v3:
- Always parse help options, no matter if the caller implements help or
not. If it doesn't, return an error. [Markus]
- Document changes to the keyval parser grammar [Markus]
-
This adds a function that, given a QDict of non-help options, prints
help for user creatable objects.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Markus Armbruster
---
include/qom/object_interfaces.h | 21 ++---
qom/object_interfaces.c | 9 +
On 29.09.2020 15:38, Andrey Shinkevich wrote:
This patch completes the series with the COR-filter insertion for
block-stream operations. Adding the filter makes it possible for copied
regions to be discarded in backing files during the block-stream job,
what will reduce the disk overuse.
The CO
On 10/7/20 11:49 AM, Kevin Wolf wrote:
> This adds a special meaning for 'help' and '?' as options to the keyval
> parser. Instead of being an error (because of a missing value) or a
> value for an implied key, they now request help, which is a new boolean
> ouput of the parser in addition to the Q
On 07.10.2020 20:27, Andrey Shinkevich wrote:
On 29.09.2020 15:38, Andrey Shinkevich wrote:
This patch completes the series with the COR-filter insertion for
block-stream operations. Adding the filter makes it possible for copied
regions to be discarded in backing files during the block-strea
On 10/7/20 6:00 PM, Alex Bennée wrote:
> A recent change to weak reset handling broke replay due to the use of
> aio_bh_schedule_oneshot instead of the replay aware
> replay_bh_schedule_oneshot_event.
>
> Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
> Suggested-by: Pavel Dovgalyuk
On 10/7/20 5:43 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
Put the init arg handling all at the top, and mostly in order (deviating
when one is dependent on another), and put what is effectively runtime
state declaration at the bottom.
Signed-off-by: John Snow
---
On 10/7/20 5:53 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
Like many other Optional[] types, it's not always a given that this
object will be set. Wrap it in a type-shim that raises a meaningful
error and will always return a concrete type.
Signed-off-by: John Snow
On 10/7/20 6:07 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
As always, Optional[T] causes problems with unchecked access. Add a
helper that asserts the pipe is present before we attempt to talk with
it.
Signed-off-by: John Snow
First a question about the preexisti
On 10/7/20 6:46 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
These should all be purely annotations with no changes in behavior at
all. You need to be in the python folder, but you should be able to
confirm that these annotations are correct (or at least self-consisten
On 10/7/20 6:59 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
The type and parameter names of recv() should match socket.socket().
Should this be socket.socket without parentheses (the class name)?
socket.socket() is the constructor and it takes very different
paramet
On 07.10.2020 13:06, Vladimir Sementsov-Ogievskiy wrote:
29.09.2020 15:38, Andrey Shinkevich wrote:
If the flag BDRV_REQ_PREFETCH was set, pass it further to the
COR-driver to skip unneeded reading. It can be taken into account for
the COR-algorithms optimization. That check is being made duri
On 10/7/20 7:21 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
Use the "from ..." phrasing when re-raising errors to preserve their
initial context, to help aid debugging when things go wrong.
This also silences a pylint 2.6.0+ error.
Signed-off-by: John Snow
I don'
On 10/7/20 7:35 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
Formalize the options used for checking the python library. You can run
mypy from the directory that mypy.ini is in by typing `mypy qemu/`.
Signed-off-by: John Snow
---
python/mypy.ini | 4
1 file c
On 10/7/20 7:30 AM, Kevin Wolf wrote:
Am 07.10.2020 um 01:58 hat John Snow geschrieben:
Nested if conditions don't change when the exception block fires; we
need to explicitly re-raise the error if we didn't intend to capture and
suppress it.
Signed-off-by: John Snow
---
python/qemu/qmp.py |
07.10.2020 22:01, Andrey Shinkevich wrote:
On 07.10.2020 13:06, Vladimir Sementsov-Ogievskiy wrote:
29.09.2020 15:38, Andrey Shinkevich wrote:
If the flag BDRV_REQ_PREFETCH was set, pass it further to the
COR-driver to skip unneeded reading. It can be taken into account for
the COR-algorithms
On 07.10.2020 13:21, Vladimir Sementsov-Ogievskiy wrote:
29.09.2020 15:38, Andrey Shinkevich wrote:
The block stream QMP parameter backing-file is in use no more. It
designates a backing file name to set in QCOW2 image header after the
block stream job finished. The base file name is used inst
On 10/7/20 5:32 AM, Vladimir Sementsov-Ogievskiy wrote:
> 30.09.2020 15:11, Eric Blake wrote:
>> Honoring just SIGTERM on Linux is too weak; we also want to handle
>> other common signals, and do so even on BSD. Why? Because at least
>> 'qemu-nbd -B bitmap' needs a chance to clean up the in-use b
On 10/7/20 6:51 AM, Vladimir Sementsov-Ogievskiy wrote:
> 30.09.2020 15:11, Eric Blake wrote:
>> We had a premature optimization of trying to read as little from the
>> wire as possible while handling NBD_OPT_SET_META_CONTEXT in phases.
>> But in reality, we HAVE to read the entire string from the
On 10/7/20 8:40 AM, Vladimir Sementsov-Ogievskiy wrote:
> 30.09.2020 15:11, Eric Blake wrote:
>> 'qemu-img map' provides a way to determine which extents of an image
>> come from the top layer vs. inherited from a backing chain. This is
>> useful information worth exposing over NBD. There is a pr
75 matches
Mail list logo