Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-08-02 Thread Tianyu Lan
On 8/2/2021 8:59 PM, Joerg Roedel wrote: On Mon, Aug 02, 2021 at 08:56:29PM +0800, Tianyu Lan wrote: Both second and third are HV_GPADL_RING type. One is send ring and the other is receive ring. The driver keeps the order to allocate rx and tx buffer. You are right this is not robust and will ad

Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-08-02 Thread Joerg Roedel
On Mon, Aug 02, 2021 at 08:56:29PM +0800, Tianyu Lan wrote: > Both second and third are HV_GPADL_RING type. One is send ring and the > other is receive ring. The driver keeps the order to allocate rx and > tx buffer. You are right this is not robust and will add a mutex to keep > the order. Or you

Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-08-02 Thread Tianyu Lan
On 8/2/2021 8:07 PM, Joerg Roedel wrote: On Wed, Jul 28, 2021 at 10:52:19AM -0400, Tianyu Lan wrote: + if (type == HV_GPADL_BUFFER) + index = 0; + else + index = channel->gpadl_range[1].gpadlhandle ? 2 : 1; Hmm... This doesn't look very robust. Can yo

Re: [PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-08-02 Thread Joerg Roedel
On Wed, Jul 28, 2021 at 10:52:19AM -0400, Tianyu Lan wrote: > + if (type == HV_GPADL_BUFFER) > + index = 0; > + else > + index = channel->gpadl_range[1].gpadlhandle ? 2 : 1; Hmm... This doesn't look very robust. Can you set fixed indexes for different buffer types?

[PATCH 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-07-28 Thread Tianyu Lan
From: Tianyu Lan Mark vmbus ring buffer visible with set_memory_decrypted() when establish gpadl handle. Signed-off-by: Tianyu Lan --- drivers/hv/channel.c | 38 -- include/linux/hyperv.h | 10 ++ 2 files changed, 46 insertions(+), 2 deletions(-)