vfio-user: do not register vfio-user container with cpr
PATCH 1/1 vfio-user: do not register vfio-user container with cpr
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
--- hw/vfio-user/container.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
hw/vfio-user/container.c +1 -9
@@ -225,14 +225,10 @@ vfio_user_container_connect(AddressSpace *as, VFIODevice *vbasedev, bcontainer = &container->bcontainer; -if (!vfio_cpr_register_container (bcontainer, errp)) { - goto free_container_exit; - } - ret =ram_block_uncoordinated_discard_disable (true);if (ret) {error_setg_errno (errp, -ret,"Cannot set discarding of RAM broken" ); - goto unregister_container_exit; + goto free_container_exit; } vioc =VFIO_IOMMU_GET_CLASS (bcontainer);
@@ -261,9 +257,6 @@ listener_release_exit: enable_discards_exit:ram_block_uncoordinated_discard_disable (false); -unregister_container_exit: -vfio_cpr_unregister_container (bcontainer); - free_container_exit:object_unref (container);
@@ -286,7 +279,6 @@ static void vfio_user_container_disconnect(VFIOUserContainer *container) vioc->release (bcontainer); } -vfio_cpr_unregister_container (bcontainer);object_unref (container);vfio_address_space_put (space);
Signature · 1 line
2.43.0
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>
Thanks,
C.
Quoted 42 lines
--- hw/vfio-user/container.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)hw/vfio-user/container.c +1
-9@@ -225,14 +225,10 @@ vfio_user_container_connect(AddressSpace *as, VFIODevice *vbasedev, bcontainer = &container->bcontainer; -if (!vfio_cpr_register_container (bcontainer, errp)) { - goto free_container_exit; - } - ret =ram_block_uncoordinated_discard_disable (true);if (ret) {error_setg_errno (errp, -ret,"Cannot set discarding of RAM broken" ); - goto unregister_container_exit; + goto free_container_exit; } vioc =VFIO_IOMMU_GET_CLASS (bcontainer);@@ -261,9 +257,6 @@ listener_release_exit: enable_discards_exit:ram_block_uncoordinated_discard_disable (false); -unregister_container_exit: -vfio_cpr_unregister_container (bcontainer); - free_container_exit:object_unref (container);@@ -286,7 +279,6 @@ static void vfio_user_container_disconnect(VFIOUserContainer *container) vioc->release (bcontainer); } -vfio_cpr_unregister_container (bcontainer);object_unref (container);vfio_address_space_put (space);
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>
This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
- Steve
Quoted 42 lines
--- hw/vfio-user/container.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)hw/vfio-user/container.c +1
-9@@ -225,14 +225,10 @@ vfio_user_container_connect(AddressSpace *as, VFIODevice *vbasedev, bcontainer = &container->bcontainer; -if (!vfio_cpr_register_container (bcontainer, errp)) { - goto free_container_exit; - } - ret =ram_block_uncoordinated_discard_disable (true);if (ret) {error_setg_errno (errp, -ret,"Cannot set discarding of RAM broken" ); - goto unregister_container_exit; + goto free_container_exit; } vioc =VFIO_IOMMU_GET_CLASS (bcontainer);@@ -261,9 +257,6 @@ listener_release_exit: enable_discards_exit:ram_block_uncoordinated_discard_disable (false); -unregister_container_exit: -vfio_cpr_unregister_container (bcontainer); - free_container_exit:object_unref (container);@@ -286,7 +279,6 @@ static void vfio_user_container_disconnect(VFIOUserContainer *container) vioc->release (bcontainer); } -vfio_cpr_unregister_container (bcontainer);object_unref (container);vfio_address_space_put (space);
Quoted 10 lines · Steven Sistare
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
Have you got a pointer to a commit showing how the registration should be done without using the old register/unregister functions? We are certainly interested in looking at cpr here at Nutanix, but since any work is in its early stages I don't think it matters too much if the old functions were to disappear.
ATB,
Mark.
Quoted 7 lines · Mark Cave-Ayland
Quoted 5 lines · Steven Sistare
Quoted 4 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Mark Cave-Ayland <[email protected]>This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
Have you got a pointer to a commit showing how the registration should be done without using the old register/unregister functions? We are certainly interested in looking at cpr here at Nutanix, but since any work is in its early stages I don't think it matters too much if the old functions were to disappear.
No. cpr-transfer for vfio-user is going to be a bit tricky because of the external process, and the existing registrations will not cover it.
- Steve
Quoted 10 lines · Steven Sistare
Quoted 9 lines · Mark Cave-Ayland
Quoted 7 lines · Steven Sistare
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
Have you got a pointer to a commit showing how the registration should be done without using the old register/unregister functions? We are certainly interested in looking at cpr here at Nutanix, but since any work is in its early stages I don't think it matters too much if the old functions were to disappear.
No. cpr-transfer for vfio-user is going to be a bit tricky because of the external process, and the existing registrations will not cover it.
Got it. In that case I'm happy for Cédric to take my earlier patch to remove the old register/unregister functions from vfio-user to avoid blocking your work.
ATB,
Mark.
Quoted 16 lines · Mark Cave-Ayland
Quoted 14 lines · Steven Sistare
Quoted 13 lines · Mark Cave-Ayland
Quoted 10 lines · Steven Sistare
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Have you got a pointer to a commit showing how the registration should be done without using the old register/unregister functions? We are certainly interested in looking at cpr here at Nutanix, but since any work is in its early stages I don't think it matters too much if the old functions were to disappear.
No. cpr-transfer for vfio-user is going to be a bit tricky because of the external process, and the existing registrations will not cover it.
Got it. In that case I'm happy for Cédric to take my earlier patch to remove the old register/unregister functions from vfio-user to avoid blocking your work.
It will not block my work. Leaving the old registrations in place in your patch and mine allows cpr-reboot to work for vfio-user. I would simply drop my patch that deletes it, and rework the registration to support all cpr modes in the future.
- Steve
Quoted 19 lines · Steven Sistare
Quoted 18 lines · Mark Cave-Ayland
Quoted 16 lines · Steven Sistare
Quoted 14 lines · Mark Cave-Ayland
Quoted 10 lines · Steven Sistare
Quoted 5 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>This is fine, or I could drop my pending patch "vfio/container: delete old cpr register". Thus the vfio-user container would be registered for cpr-reboot mode, which is fine at this time.
Have you got a pointer to a commit showing how the registration should be done without using the old register/unregister functions? We are certainly interested in looking at cpr here at Nutanix, but since any work is in its early stages I don't think it matters too much if the old functions were to disappear.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
No. cpr-transfer for vfio-user is going to be a bit tricky because of the external process, and the existing registrations will not cover it.
Got it. In that case I'm happy for Cédric to take my earlier patch to remove the old register/unregister functions from vfio-user to avoid blocking your work.
It will not block my work. Leaving the old registrations in place in your patch and mine allows cpr-reboot to work for vfio-user. I would simply drop my patch that deletes it, and rework the registration to support all cpr modes in the future.
Okay, great! I'm happy for you to CC me on your future work to help review patches in this area.
ATB,
Mark.
Cédric Le Goater
AppliedQuoted 40 lines · Mark Cave-Ayland
As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series.
Signed-off-by Mark Cave-Ayland <[email protected]>--- hw/vfio-user/container.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)hw/vfio-user/container.c +1
-8@@ -225,14 +225,10 @@ vfio_user_container_connect(AddressSpace *as, VFIODevice *vbasedev, bcontainer = &container->bcontainer; -if (!vfio_cpr_register_container (bcontainer, errp)) { - goto free_container_exit; - } - ret =ram_block_uncoordinated_discard_disable (true);if (ret) {error_setg_errno (errp, -ret,"Cannot set discarding of RAM broken" ); - goto unregister_container_exit; + goto free_container_exit; } vioc =VFIO_IOMMU_GET_CLASS (bcontainer);@@ -261,9 +257,6 @@ listener_release_exit: enable_discards_exit:ram_block_uncoordinated_discard_disable (false); -unregister_container_exit: -vfio_cpr_unregister_container (bcontainer); - free_container_exit:object_unref (container);
hw/vfio-user/container.c static void vfio_user_container_disconnect(VFIOUserContainer *container) · line 284
Quoted 7 lines
hw/vfio-user/container.c +0
-1@@ -286,7 +279,6 @@ static void vfio_user_container_disconnect(VFIOUserContainer *container) vioc->release (bcontainer); } -vfio_cpr_unregister_container (bcontainer);object_unref (container);vfio_address_space_put (space);
Applied to vfio-next.
Thanks,
C.