Re: Host folder sharing via USB issue

2021-07-14 Thread Programmingkid
> On Jul 14, 2021, at 6:35 AM, Vladimir Sementsov-Ogievskiy > wrote: > > 14.07.2021 00:04, Programmingkid wrote: >> Hi I have noticed that host folder sharing via USB has recently stopped >> working. After doing some git bisecting I found this as the patch that seems >> to be the issue: >>

[PATCH v5 5/5] block/nbd: check that received handle is valid

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
If we don't have active request, that waiting for this handle to be received, we should report an error. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

Re: [PATCH v5 4/5] block/nbd: drop connection_co

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
[add Roman} 14.07.2021 19:59, Vladimir Sementsov-Ogievskiy wrote: OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unobvious code around drained sections and

[PATCH v5 2/5] block/nbd: move nbd_recv_coroutines_wake_all() up

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
We are going to use it in nbd_channel_error(), so move it up. Note, that we are going also refactor and rename nbd_recv_coroutines_wake_all() in future anyway, so keeping it where it is and making forward declaration doesn't make real sense. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v5 1/5] block/nbd: nbd_channel_error() shutdown channel unconditionally

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
Don't rely on connection being totally broken in case of -EIO. More safe and correct just shutdown the channel anyway, as we change the state and going to reconnect. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v5 4/5] block/nbd: drop connection_co

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unobvious code around drained sections and context switch. We also abuse bs->in_flight counter which is increased

[PATCH v5 3/5] block/nbd: refactor nbd_recv_coroutines_wake_all()

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
Split out nbd_recv_coroutine_wake(), as it will be used in separate. Also add a possibility to wake only first found sleeping coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git

[PATCH v5 0/5] block/nbd: drop connection_co

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's finally a new version of [PATCH v3 33/33] block/nbd: drop connection_co (v4 was sent and merged without that last patch of v3) I tried to do some things in separate patches, but still "block/nbd: drop connection_co" is big and complicated. Vladimir Sementsov-Ogievskiy (5):

Re: [PATCH 0/3] Fix active mirror dead-lock

2021-07-14 Thread Kevin Wolf
Am 02.07.2021 um 23:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > We've faced a dead-lock in active mirror in our Rhev-8.4 based Qemu > build. And it's reproducible on master too. Thanks, applied to the block branch. Kevin

Re: [PATCH v3 5/5] tests/qtest/nvme-test: add mmio read test

2021-07-14 Thread Gollu Appalanaidu
On Wed, Jul 14, 2021 at 08:01:25AM +0200, Klaus Jensen wrote: From: Klaus Jensen Add a regression test for mmio read on big-endian hosts. Signed-off-by: Klaus Jensen --- tests/qtest/nvme-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

Re: [PATCH v3 2/5] hw/nvme: use symbolic names for registers

2021-07-14 Thread Gollu Appalanaidu
On Wed, Jul 14, 2021 at 08:01:22AM +0200, Klaus Jensen wrote: From: Klaus Jensen Add the NvmeBarRegs enum and use these instead of explicit register offsets. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 29 - hw/nvme/ctrl.c | 44

Re: [PATCH v3 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-14 Thread Gollu Appalanaidu
On Wed, Jul 14, 2021 at 08:01:21AM +0200, Klaus Jensen wrote: From: Klaus Jensen The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to make up the 64 bit logical PMRMSC register. Make it so. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 31

Re: Host folder sharing via USB issue

2021-07-14 Thread BALATON Zoltan
On Wed, 14 Jul 2021, Vladimir Sementsov-Ogievskiy wrote: 14.07.2021 00:04, Programmingkid wrote: Hi I have noticed that host folder sharing via USB has recently stopped working. After doing some git bisecting I found this as the patch that seems to be the issue:

Re: Host folder sharing via USB issue

2021-07-14 Thread Vladimir Sementsov-Ogievskiy
14.07.2021 00:04, Programmingkid wrote: Hi I have noticed that host folder sharing via USB has recently stopped working. After doing some git bisecting I found this as the patch that seems to be the issue: 25f78d9e2de528473d52acfcf7acdfb64e3453d4 is the first bad commit commit

Re: [PATCH v3 2/5] hw/nvme: use symbolic names for registers

2021-07-14 Thread Philippe Mathieu-Daudé
On 7/14/21 8:01 AM, Klaus Jensen wrote: > From: Klaus Jensen > > Add the NvmeBarRegs enum and use these instead of explicit register > offsets. > > Signed-off-by: Klaus Jensen > --- > include/block/nvme.h | 29 - > hw/nvme/ctrl.c | 44

[PATCH v3 5/5] tests/qtest/nvme-test: add mmio read test

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen Add a regression test for mmio read on big-endian hosts. Signed-off-by: Klaus Jensen --- tests/qtest/nvme-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c index

[PATCH v3 4/5] hw/nvme: fix mmio read

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix this by unconditionally storing all controller registers in little endian. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 300

[PATCH v3 3/5] hw/nvme: fix out-of-bounds reads

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen Peter noticed that mmio access may read into the NvmeParams member in the NvmeCtrl struct. Fix the bounds check. Reported-by: Peter Maydell Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-)

[PATCH v3 2/5] hw/nvme: use symbolic names for registers

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen Add the NvmeBarRegs enum and use these instead of explicit register offsets. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 29 - hw/nvme/ctrl.c | 44 ++-- 2 files changed, 50 insertions(+),

[PATCH v3 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to make up the 64 bit logical PMRMSC register. Make it so. Signed-off-by: Klaus Jensen --- include/block/nvme.h | 31 --- hw/nvme/ctrl.c | 9 + 2 files changed,

[PATCH v3 0/5] hw/nvme: fix mmio read

2021-07-14 Thread Klaus Jensen
From: Klaus Jensen Fix mmio read issues on big-endian hosts. The core issue is that values in the BAR is not stored in little endian as required. Fix that and add a regression test for this. This required a bit of cleanup, so it blew up into a series. v2: * "hw/nvme: use symbolic names for