search for: guest2host

Displaying 20 results from an estimated 22 matches for "guest2host".

2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...ss relationship may be changed on the destination). Yes but note how that rewind does not involve modifying the ring. It just rolls back some indices. > > How about another direction which would be easier - using two 32-bit device > specific configuration registers, > Host2Guest and Guest2Host command registers, to replace the ctrlq for > command exchange: > > The flow can be as follows: > > 1) Before Host sending a StartCMD, it flushes the free_page_vq in case any > old free page hint is left there; > 2) Host writes StartCMD to the Host2Guest register, and notifi...
2017 Oct 11
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...ss relationship may be changed on the destination). Yes but note how that rewind does not involve modifying the ring. It just rolls back some indices. > > How about another direction which would be easier - using two 32-bit device > specific configuration registers, > Host2Guest and Guest2Host command registers, to replace the ctrlq for > command exchange: > > The flow can be as follows: > > 1) Before Host sending a StartCMD, it flushes the free_page_vq in case any > old free page hint is left there; > 2) Host writes StartCMD to the Host2Guest register, and notifi...
2017 Oct 12
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...the host, so that when the host rewind one previous entry, it can always get the free_page_cmd_in buffer (may be not a very nice method). > >> How about another direction which would be easier - using two 32-bit device >> specific configuration registers, >> Host2Guest and Guest2Host command registers, to replace the ctrlq for >> command exchange: >> >> The flow can be as follows: >> >> 1) Before Host sending a StartCMD, it flushes the free_page_vq in case any >> old free page hint is left there; >> 2) Host writes StartCMD to the Host2G...
2019 Dec 12
2
[PATCH] vhost/vsock: accept only packets with the right dst_cid
...ts from guests. In this case, if the dst_cid is wrong, maybe the only issue is that the getsockname() returns an inconsistent address (the cid returned is the one received from the guest) - from v5.4 we support multi-transport, so the L1 VM (e.g. L0 assigned cid 5 to this VM) can have both Guest2Host and Host2Guest transports. In this case, we have these possible issues: - L2 (or L1) guest can use cid 0, 1, and 2 to reach L1 (or L0), instead we should allow only CID_HOST (2) to reach the level below. Note: this happens also with not malformed guest that runs Linux v5.4 - if a mal...
2019 Dec 12
2
[PATCH] vhost/vsock: accept only packets with the right dst_cid
...ts from guests. In this case, if the dst_cid is wrong, maybe the only issue is that the getsockname() returns an inconsistent address (the cid returned is the one received from the guest) - from v5.4 we support multi-transport, so the L1 VM (e.g. L0 assigned cid 5 to this VM) can have both Guest2Host and Host2Guest transports. In this case, we have these possible issues: - L2 (or L1) guest can use cid 0, 1, and 2 to reach L1 (or L0), instead we should allow only CID_HOST (2) to reach the level below. Note: this happens also with not malformed guest that runs Linux v5.4 - if a mal...
2017 Oct 13
1
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...: > first 16-bit: Command field > send 16-bit: ID field > > Then, the working flow would look like this: > > 1) Host writes "Start, 1" to the Host2Guest register and notify; > > 2) Guest reads Host2Guest register, and ACKs by writing "Start, 1" to > Guest2Host register; > > 3) Guest starts report free pages; > > 4) Each time when the host receives a free page hint from the free_page_vq, > it compares the ID fields of > the Host2Guest and Guest2Host register. If matching, then filter out the > free page from the migration dirty bitm...
2017 Oct 13
1
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...: > first 16-bit: Command field > send 16-bit: ID field > > Then, the working flow would look like this: > > 1) Host writes "Start, 1" to the Host2Guest register and notify; > > 2) Guest reads Host2Guest register, and ACKs by writing "Start, 1" to > Guest2Host register; > > 3) Guest starts report free pages; > > 4) Each time when the host receives a free page hint from the free_page_vq, > it compares the ID fields of > the Host2Guest and Guest2Host register. If matching, then filter out the > free page from the migration dirty bitm...
2017 Oct 11
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...which re-do the virtqueue_pop() --> virtqueue_map_desc() steps (the QEMU virtual address to the guest physical address relationship may be changed on the destination). How about another direction which would be easier - using two 32-bit device specific configuration registers, Host2Guest and Guest2Host command registers, to replace the ctrlq for command exchange: The flow can be as follows: 1) Before Host sending a StartCMD, it flushes the free_page_vq in case any old free page hint is left there; 2) Host writes StartCMD to the Host2Guest register, and notifies the guest; 3) Upon receiving...
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > +static void ctrlq_send_cmd(struct virtio_balloon *vb, > > > + struct virtio_balloon_ctrlq_cmd *cmd, > > > + bool inbuf) > > > +{ > > > + struct
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote: > On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: > > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote: > > > +static void ctrlq_send_cmd(struct virtio_balloon *vb, > > > + struct virtio_balloon_ctrlq_cmd *cmd, > > > + bool inbuf) > > > +{ > > > + struct
2019 Dec 12
2
[PATCH] vhost/vsock: accept only packets with the right dst_cid
...wrong, maybe the only issue is that the getsockname() > > returns an inconsistent address (the cid returned is the one received > > from the guest) > > > > - from v5.4 we support multi-transport, so the L1 VM (e.g. L0 assigned > > cid 5 to this VM) can have both Guest2Host and Host2Guest transports. > > In this case, we have these possible issues: > > - L2 (or L1) guest can use cid 0, 1, and 2 to reach L1 (or L0), > > instead we should allow only CID_HOST (2) to reach the level below. > > Note: this happens also with not malformed...
2017 Nov 14
2
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: >> - guest2host_cmd: written by the guest to ACK to the host about the >> commands that have been received. The host will clear the corresponding >> bits on the host2guest_cmd register. The guest also uses this register >> to send commands to the host (e.g. when finish free page reporting). >...
2017 Nov 14
2
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: >> - guest2host_cmd: written by the guest to ACK to the host about the >> commands that have been received. The host will clear the corresponding >> bits on the host2guest_cmd register. The guest also uses this register >> to send commands to the host (e.g. when finish free page reporting). >...
2019 Dec 12
0
[PATCH] vhost/vsock: accept only packets with the right dst_cid
...if > the dst_cid is wrong, maybe the only issue is that the getsockname() > returns an inconsistent address (the cid returned is the one received > from the guest) > > - from v5.4 we support multi-transport, so the L1 VM (e.g. L0 assigned > cid 5 to this VM) can have both Guest2Host and Host2Guest transports. > In this case, we have these possible issues: > - L2 (or L1) guest can use cid 0, 1, and 2 to reach L1 (or L0), > instead we should allow only CID_HOST (2) to reach the level below. > Note: this happens also with not malformed guest that runs Linu...
2017 Nov 14
0
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On Tue, Nov 14, 2017 at 08:02:03PM +0800, Wei Wang wrote: > On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: > > > - guest2host_cmd: written by the guest to ACK to the host about the > > > commands that have been received. The host will clear the corresponding > > > bits on the host2guest_cmd register. The guest also uses this register > > > to send commands to the host (e.g. when finish free page...
2017 Nov 15
2
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On 11/15/2017 05:21 AM, Michael S. Tsirkin wrote: > On Tue, Nov 14, 2017 at 08:02:03PM +0800, Wei Wang wrote: >> On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: >>>> - guest2host_cmd: written by the guest to ACK to the host about the >>>> commands that have been received. The host will clear the corresponding >>>> bits on the host2guest_cmd register. The guest also uses this register >>>> to send commands to the host (e.g. when finish fre...
2017 Nov 15
2
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On 11/15/2017 05:21 AM, Michael S. Tsirkin wrote: > On Tue, Nov 14, 2017 at 08:02:03PM +0800, Wei Wang wrote: >> On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: >>>> - guest2host_cmd: written by the guest to ACK to the host about the >>>> commands that have been received. The host will clear the corresponding >>>> bits on the host2guest_cmd register. The guest also uses this register >>>> to send commands to the host (e.g. when finish fre...
2019 Dec 06
5
[PATCH] vhost/vsock: accept only packets with the right dst_cid
When we receive a new packet from the guest, we check if the src_cid is correct, but we forgot to check the dst_cid. The host should accept only packets where dst_cid is equal to the host CID. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vhost/vsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vsock.c
2019 Dec 06
5
[PATCH] vhost/vsock: accept only packets with the right dst_cid
When we receive a new packet from the guest, we check if the src_cid is correct, but we forgot to check the dst_cid. The host should accept only packets where dst_cid is equal to the host CID. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vhost/vsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vsock.c
2017 Nov 15
0
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On Wed, Nov 15, 2017 at 11:47:58AM +0800, Wei Wang wrote: > On 11/15/2017 05:21 AM, Michael S. Tsirkin wrote: > > On Tue, Nov 14, 2017 at 08:02:03PM +0800, Wei Wang wrote: > > > On 11/14/2017 01:32 AM, Michael S. Tsirkin wrote: > > > > > - guest2host_cmd: written by the guest to ACK to the host about the > > > > > commands that have been received. The host will clear the corresponding > > > > > bits on the host2guest_cmd register. The guest also uses this register > > > > > to send commands to the ho...