vhost-user: VHOST_SET_MEM_TABLE, VHOST_SET_VRING_CALL need a reply?
Reply-To:
Thinking about the vhost-user protocol, VHOST_SET_MEM_TABLE is used to update the memory mappings.
So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.
Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALL is used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.
Thoughts?
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "VHOST_GET_MEM_TABLE" to qemu then qemu send VHOST_SET_MEM_TABLE to update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.
The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
Quoted 21 lines
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
Quoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
How to deal with the vhost-user restart?
when vhost-user restart it will lost the infomation which QEMU send.
In the kernel mode vhost will restart with QEMU but in the user mode vhost will not.
Quoted 25 lines
Quoted 22 lines
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
.
Quoted 9 lines · Linhaifeng
Quoted 6 lines · Michael S. Tsirkin
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.
Quoted 7 lines
Quoted 2 lines
The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
How to deal with the vhost-user restart?
when vhost-user restart it will lost the infomation which QEMU send.In the kernel mode vhost will restart with QEMU but in the user mode vhost will not.
vhost-user must restart with qemu only.
The nature of virtio protocol is such that there's not enough in-memory state for host to gracefully recover from losing VQ state.
We could add a new feature to allow recovery by reporting failure to guest, and disabling processing new requests. Guest could respond by recovering / discarding submitted requests, re-enabling the device (likely by executing a reset) and re-submitting requests.
This would need a new feature bit though, and would have to be acknowledged by guest. As such this would have to be virtio 1.0 feature, virtio 0.x is frozen.
Quoted 25 lines
Quoted 25 lines
Quoted 22 lines
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
.
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines · Linhaifeng
Quoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
Quoted 7 lines
Quoted 4 lines
How to deal with the vhost-user restart?
when vhost-user restart it will lost the infomation which QEMU send.In the kernel mode vhost will restart with QEMU but in the user mode vhost will not.
vhost-user must restart with qemu only.
Sometimes qemu not allowed to restart. e.g. The customer want to update the vhost-user to a newer version but don't want to restart the VM.
Quoted 42 lines
The nature of virtio protocol is such that there's not enough in-memory state for host to gracefully recover from losing VQ state.
We could add a new feature to allow recovery by reporting failure to guest, and disabling processing new requests. Guest could respond by recovering / discarding submitted requests, re-enabling the device (likely by executing a reset) and re-submitting requests.
This would need a new feature bit though, and would have to be acknowledged by guest. As such this would have to be virtio 1.0 feature, virtio 0.x is frozen.
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
I think it's very useful for Commercialization.
Quoted 15 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Thoughts?
.
.
Quoted 19 lines · Linhaifeng
Quoted 16 lines · Michael S. Tsirkin
Quoted 15 lines · Linhaifeng
Quoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
How to deal with the vhost-user restart?
when vhost-user restart it will lost the infomation which QEMU send.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
In the kernel mode vhost will restart with QEMU but in the user mode vhost will not.
vhost-user must restart with qemu only.
Sometimes qemu not allowed to restart. e.g. The customer want to update the vhost-user to a newer version but don't want to restart the VM.
I guess this means we'll have to implement the idea outlined below. Fixing known issues around vhost-user (such as lack of set_backend, and lack of synchronization around some commands) is probably higher priority.
Quoted 43 lines
Quoted 43 lines
The nature of virtio protocol is such that there's not enough in-memory state for host to gracefully recover from losing VQ state.
We could add a new feature to allow recovery by reporting failure to guest, and disabling processing new requests. Guest could respond by recovering / discarding submitted requests, re-enabling the device (likely by executing a reset) and re-submitting requests.
This would need a new feature bit though, and would have to be acknowledged by guest. As such this would have to be virtio 1.0 feature, virtio 0.x is frozen.
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
I think it's very useful for Commercialization.
Quoted 15 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Thoughts?
.
.
Quoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
yes.when memory unplug/plug should tell vhost-user.
Quoted 25 lines
Quoted 22 lines
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
.
Quoted 6 lines · Linhaifeng
Quoted 3 lines · Michael S. Tsirkin
Quoted 2 lines · Linhaifeng
I think maybe is not need for the backend to wait for response.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
There is another way.vhost-user send "
VHOST_GET_MEM_TABLE" to qemu then qemu sendVHOST_SET_MEM_TABLEto update the regions of vhost-user.same as other command. If qemu could response the request of the vhost-user.the vhost-user could update date at anytime.The updates are initiated by QEMU, as a result of IOMMU, memory hotplug or some other configuration change.
yes.when memory unplug/plug should tell vhost-user.
Right. So VHOST_SET_MEM_TABLE needs a response then, at least for cases when it's freeing memory.
When memory is added, we can avoid waiting for the response if vhost-user can detect a fault and flush the incoming command pipe looking for VHOST_SET_MEM_TABLE.
Quoted 25 lines
Quoted 25 lines
Quoted 22 lines
I think it's very useful for Commercialization.
Quoted 18 lines · Michael S. Tsirkin
Reply-To:
Thinking about the vhost-user protocol,
VHOST_SET_MEM_TABLEis used to update the memory mappings.So shouldn't we want for response?
Otherwise e.g. guest can start using the memory that vhost-user can't access.Similarly, with an IOMMU vhost-user might access memory it shouldn't.
VHOST_SET_VRING_CALLis used for MSI-X masking. Again, after vector is masted by switching the call fd, backend shouldn't assert the old one.Thoughts?
.