As part of its error flow, vfio_vmstate_change() accesses
MigrationState->to_dst_file without any checks. This can cause a NULL
pointer dereference if the error flow is taken and
MigrationState->to_dst_file is not set.
For example, this can happen if VM is started or stopped not during
migration a
From: Juan Quintela
Signed-off-by: Juan Quintela
Signed-off-by: Avihai Horon
---
migration/migration.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index edefba954e..630e4af02f 100644
--- a/migrati
Currently, if IOMMU of a VFIO container doesn't support dirty page
tracking, migration is blocked. This is because a DMA-able VFIO device
can dirty RAM pages without updating QEMU about it, thus breaking the
migration.
However, this doesn't mean that migration can't be done at all.
In such case, a
Hello,
A long time has passed since v2 of this series was posted. During this
time we had several KVM calls discussing the problems that were needed
to be solved in order to move forward.
This version of the series includes quite some changes, and I believe
that it addresses all the major problem
Sort the migration section of VFIO trace events file alphabetically
and move two misplaced traces to common.c section.
Signed-off-by: Avihai Horon
---
hw/vfio/trace-events | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/vfio/trace-events b/hw/vfio/tr
Align the vfio-migration documentation to VFIO migration protocol v2.
Signed-off-by: Avihai Horon
---
docs/devel/vfio-migration.rst | 68 ---
1 file changed, 30 insertions(+), 38 deletions(-)
diff --git a/docs/devel/vfio-migration.rst b/docs/devel/vfio-migration.
Add implementation of VFIO migration protocol v2. The two protocols, v1
and v2, will co-exist and in next patch v1 protocol will be removed.
There are several main differences between v1 and v2 protocols:
- VFIO device state is now represented as a finite state machine instead
of a bitmap.
- Mi
vfio_devices_all_running_and_saving() is used to check if migration is
in pre-copy phase. This is done by checking if migration is in setup or
active states and if all VFIO devices are in pre-copy state, i.e.
_SAVING | _RUNNING.
In VFIO migration protocol v2 pre-copy support is made optional. Henc
To avoid name collisions, rename functions and structs related to VFIO
migration protocol v1. This will allow the two protocols to co-exist
when v2 protocol is added, until v1 is removed. No functional changes
intended.
Signed-off-by: Avihai Horon
---
hw/vfio/common.c | 6 +-
hw/v
Use VFIO_DEVICE_FEATURE_MIG_DATA_SIZE ioctl to query the device stop
copy data size and report this value in vfio_save_pending() instead of
the hardcoded value that is currently used.
Use this ioctl in vfio_save_setup() as well, to adjust the migration
data buffer size.
Signed-off-by: Avihai Horo
Add new function qemu_file_get_to_fd() that allows reading data from
QEMUFile and writing it straight into a given fd.
This will be used later in VFIO migration code.
Signed-off-by: Avihai Horon
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
migration/qemu-file.c | 34 ++
During pre-copy phase of migration vfio_save_pending() is called
repeatedly and queries the VFIO device for its pending data size.
As long as pending RAM size is over the threshold, migration can't
converge and be completed. Therefore, during this time there is no
point in querying the VFIO device
From: Juan Quintela
So remove it everywhere.
Signed-off-by: Juan Quintela
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Dr. David Alan Gilbert
---
hw/s390x/s390-stattrib.c | 2 +-
hw/vfio/migration.c| 3 +--
include/migration/register.h | 3 +--
migration/block-d
Now that v2 protocol implementation has been added, remove the
deprecated v1 implementation.
Signed-off-by: Avihai Horon
---
hw/vfio/common.c | 19 +-
hw/vfio/migration.c | 695 +-
hw/vfio/trace-events | 8 -
include/hw/vfio/vfio
Move vfio_dev_get_region_info() logic from vfio_migration_probe() to
vfio_migration_init(). This logic is specific to v1 protocol and moving
it will make it easier to add the v2 protocol implementation later.
No functional changes intended.
Signed-off-by: Avihai Horon
---
hw/vfio/migration.c |
Raphael Norwitz writes:
>> On Nov 29, 2022, at 12:30 AM, Michael S. Tsirkin wrote:
>>
>> On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote:
On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote:
..and use for both virtio-user-blk and virtio-user-gpio. This avoids
On Wed, Nov 30, 2022 at 10:25:58AM +, Alex Bennée wrote:
>
> Raphael Norwitz writes:
>
> >> On Nov 29, 2022, at 12:30 AM, Michael S. Tsirkin wrote:
> >>
> >> On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote:
> On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote:
>
>
..and use for both virtio-user-blk and virtio-user-gpio. This avoids
the circular close by deferring shutdown due to disconnection until a
later point. virtio-user-blk already had this mechanism in place so
generalise it as a vhost-user helper function and use for both blk and
gpio devices.
While
From: Stefano Garzarella
Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features")
properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user
backend, but we forgot to enable vrings as specified in
docs/interop/vhost-user.rst:
If ``VHOST_USER_F_PROTOCOL_FEATURES``
"Michael S. Tsirkin" writes:
> On Wed, Nov 30, 2022 at 10:25:58AM +, Alex Bennée wrote:
>>
>> Raphael Norwitz writes:
>>
>> >> On Nov 29, 2022, at 12:30 AM, Michael S. Tsirkin wrote:
>> >>
>> >> On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote:
>> On Nov 28, 2022, a
This allows attaching IDE_CFATA device to an IDE bus. Behaves like a
CompactFlash card in True IDE mode.
Tested with:
qemu-system-i386 \
-device driver=ide-cf,drive=cf,bus=ide.0 \
-drive id=cf,index=0,format=raw,if=none,file=cf.img
Signed-off-by: Lubomir Rintel
---
hw/ide/qdev.c | 32
CompactFlash uses features 0x01 and 0x81 to enable/disable 8-bit data
path. Implement them.
Signed-off-by: Lubomir Rintel
---
hw/ide/core.c | 43 ++-
include/hw/ide/internal.h | 1 +
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a
Queued, thanks.
Paolo
Queued, thanks.
Paolo
Hi,
On 11/8/22 14:24, Jonah Palmer wrote:
From: Laurent Vivier
This new command lists all the instances of VirtIODevices with
their canonical QOM path and name.
[Jonah: @virtio_list duplicates information that already exists in
the QOM composition tree. However, extracting necessary informa
Merged. I will work on supporting graph changes.
Stefan
On Fri, Nov 25, 2022 at 09:12:43AM +0100, Stefano Garzarella wrote:
> On Thu, Nov 24, 2022 at 01:36:29PM -0500, Stefan Hajnoczi wrote:
> > On Wed, Nov 23, 2022 at 02:16:30PM +0100, Stefano Garzarella wrote:
> > > Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features")
> > > proper
On Wed, Nov 30, 2022 at 11:24:38AM +, Alex Bennée wrote:
> ..and use for both virtio-user-blk and virtio-user-gpio. This avoids
> the circular close by deferring shutdown due to disconnection until a
> later point.
I thought re-entrancy was already avoided by Patch 3?
> virtio-user-blk alread
On Wed, Nov 30, 2022 at 11:24:38AM +, Alex Bennée wrote:
> ..and use for both virtio-user-blk and virtio-user-gpio. This avoids
> the circular close by deferring shutdown due to disconnection until a
> later point. virtio-user-blk already had this mechanism in place so
> generalise it as a vhos
On Wed, Nov 30, 2022 at 04:03:28PM -0500, Stefan Hajnoczi wrote:
> On Fri, Nov 25, 2022 at 09:12:43AM +0100, Stefano Garzarella wrote:
> > On Thu, Nov 24, 2022 at 01:36:29PM -0500, Stefan Hajnoczi wrote:
> > > On Wed, Nov 23, 2022 at 02:16:30PM +0100, Stefano Garzarella wrote:
> > > > Commit 02b61f
From: Stefano Garzarella
Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features")
properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user
backend, but we forgot to enable vrings as specified in
docs/interop/vhost-user.rst:
If ``VHOST_USER_F_PROTOCOL_FEATURES``
From: Alex Bennée
..and use for both virtio-user-blk and virtio-user-gpio. This avoids
the circular close by deferring shutdown due to disconnection until a
later point. virtio-user-blk already had this mechanism in place so
generalise it as a vhost-user helper function and use for both blk and
g
32 matches
Mail list logo