Re: [PATCH v2 1/2] hw: m25p80: add WP# pin and SRWD bit for write protection

2022-06-14 Thread Dan Zhang
On Mon, Jun 13, 2022 at 10:45:34PM -0700, Dan Zhang wrote: > Just find out how to use mutt to reply all in the thread. > repeat the previous comments. Add STATE_HIZ to handle decode_new_command > aborting gracefully. > > On Thu, Jun 09, 2022 at 08:06:00PM +, Peter Delevoryas wrote: > > > >

Re: [PATCH v2 1/2] hw: m25p80: add WP# pin and SRWD bit for write protection

2022-06-14 Thread Dan Zhang
Just find out how to use mutt to reply all in the thread. repeat the previous comments. Add STATE_HIZ to handle decode_new_command aborting gracefully. On Thu, Jun 09, 2022 at 08:06:00PM +, Peter Delevoryas wrote: > > > > On Jun 9, 2022, at 12:22 PM, Francisco Iglesias > > wrote: > > > >

Re: [PATCH v2 1/2] hw: m25p80: add WP# pin and SRWD bit for write protection

2022-06-14 Thread Cédric Le Goater
Hello Dan On 6/14/22 07:45, Dan Zhang wrote: Just find out how to use mutt to reply all in the thread. repeat the previous comments. Add STATE_HIZ to handle decode_new_command aborting gracefully. On Thu, Jun 09, 2022 at 08:06:00PM +, Peter Delevoryas wrote: On Jun 9, 2022, at 12:22 PM,

Re: [PATCH v2 1/1] nbd: trace long NBD operations

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
On 5/30/22 13:39, Denis V. Lunev wrote: At the moment there are 2 sources of lengthy operations if configured: * open connection, which could retry inside and * reconnect of already opened connection These operations could be quite lengthy and cumbersome to catch thus it would be quite natural to

Re: [PATCH 1/1] block: use 'unsigned' for in_flight field on driver state

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
On 5/30/22 13:39, Denis V. Lunev wrote: This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC: Vladimir

Re: [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-14 Thread Daniel P . Berrangé
On Tue, Jun 14, 2022 at 06:46:35AM +0200, Thomas Huth wrote: > On 14/06/2022 03.50, John Snow wrote: > > In certain container environments we may not have FUSE at all, so skip > > the test in this circumstance too. > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/108 | 6 ++ >

Re: [PATCH 1/5] tests/qemu-iotests: hotfix for 307, 223 output

2022-06-14 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 09:50:40PM -0400, John Snow wrote: > Fixes: 58a6fdcc CC'ing Eric given the above commit hash > Signed-off-by: John Snow > --- > tests/qemu-iotests/223.out | 4 ++-- > tests/qemu-iotests/307.out | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) Tested-by: Dani

Re: [PATCH 4/5] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-14 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 09:50:43PM -0400, John Snow wrote: > The old CentOS image didn't work anymore because it was already EOL at > the beginning of 2022. > > Signed-off-by: John Snow > --- > tests/vm/centos | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/test

[PULL 02/10] block/copy-before-write: add on-cbw-error open parameter

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Currently, behavior on copy-before-write operation failure is simple: report error to the guest. Let's implement alternative behavior: break the whole copy-before-write process (and corresponding backup job or NBD client) but keep guest working. It's needed if

[PULL 01/10] block/copy-before-write: refactor option parsing

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy We are going to add one more option of enum type. Let's refactor option parsing so that we can simply work with BlockdevOptionsCbw object. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy --- b

[PULL 00/10] Block jobs & NBD patches

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: https://gitlab.com/vsementsov/qemu.git tags/pull-block-2022

[PULL 04/10] util: add qemu-co-timeout

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add new API, to make a time limited call of the coroutine. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/coroutine.h | 13 ++ util/meson.build | 1 + util/qemu-

[PULL 07/10] iotests: copy-before-write: add cases for cbw-timeout option

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy --

[PULL 03/10] iotests: add copy-before-write: on-cbw-error tests

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add tests for new option of copy-before-write filter: on-cbw-error. Note that we use QEMUMachine instead of VM class, because in further commit we'll want to use throttling which doesn't work with -accel qtest used by VM. We also touch pylintrc to not break io

[PULL 09/10] block: use 'unsigned' for in_flight field on driver state

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: "Denis V. Lunev" This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC: Vladimir Sementsov-Ogie

[PULL 08/10] nbd: trace long NBD operations

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: "Denis V. Lunev" At the moment there are 2 sources of lengthy operations if configured: * open connection, which could retry inside and * reconnect of already opened connection These operations could be quite lengthy and cumbersome to catch thus it would be quite natural to add trace points

[PULL 10/10] MAINTAINERS: update Vladimir's address and repositories

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- MAINTAINERS | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0df25ed4b0..9e37bfe279 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2538,7 +2538,7 @@ F: scsi/* Block Jobs

[PULL 05/10] block/block-copy: block_copy(): add timeout_ns parameter

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Add possibility to limit block_copy() call in time. To be used in the next commit. As timed-out block_copy() call will continue in background anyway (we can't immediately cancel IO operation), it's important also give user a possibility to pass a callback, to d

[PATCH 0/2] Two sets of trivials

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I've sent the 3 char set last month, but have updated it a little; I cleaned up a comment style that was already broken so checkpatch is happy. The 'namesapce' is a new patch; it's amazing how many places make the same typo! Dave Dr. David Alan Gilbert (2): Tri

[PATCH 1/2] Trivial: 3 char repeat typos

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert --- hw/intc/openpic.c| 2 +- hw/net/imx_fec.c | 2 +- hw/pci/pcie_aer.c

[PULL 06/10] block/copy-before-write: implement cbw-timeout option

2022-06-14 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy In some scenarios, when copy-before-write operations lasts too long time, it's better to cancel it. Most useful would be to use the new option together with on-cbw-error=break-snapshot: this way if cbw operation takes too long time we'll just cancel backup proc

[PATCH 2/2] trivial typos: namesapce

2022-06-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" 'namespace' is misspelled in a bunch of places. Signed-off-by: Dr. David Alan Gilbert --- hw/9pfs/9p-xattr-user.c | 8 hw/acpi/nvdimm.c| 2 +- hw/nvme/ctrl.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-14 Thread chuang xu
On 2022/5/13 下午2:28, Leonardo Bras wrote: @@ -557,15 +578,31 @@ static ssize_t qio_channel_socket_writev(QIOChannel *ioc, memcpy(CMSG_DATA(cmsg), fds, fdsize); } +#ifdef QEMU_MSG_ZEROCOPY +if (flags & QIO_CHANNEL_WRITE_FLAG_ZERO_COPY) { +sflags = MSG_ZEROCOPY; +

Re: [PATCH 1/2] Trivial: 3 char repeat typos

2022-06-14 Thread Daniel Henrique Barboza
On 6/14/22 07:40, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Inspired by Julia Lawall's fixing of Linux kernel comments, I looked at qemu, although I did it manually. Signed-off-by: Dr. David Alan Gilbert --- Reviewed-by: Daniel Henrique Barboza hw/intc/openp

Re: [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-14 Thread John Snow
On Tue, Jun 14, 2022 at 4:59 AM Daniel P. Berrangé wrote: > > On Tue, Jun 14, 2022 at 06:46:35AM +0200, Thomas Huth wrote: > > On 14/06/2022 03.50, John Snow wrote: > > > In certain container environments we may not have FUSE at all, so skip > > > the test in this circumstance too. > > > > > > Sig

Re: [PATCH 3/5] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-06-14 Thread John Snow
On Tue, Jun 14, 2022 at 12:40 AM Thomas Huth wrote: > > On 14/06/2022 03.50, John Snow wrote: > > If the initial setup fails, you've permanently altered the state of the > > downloaded image in an unknowable way. Use 'cp' like our other test > > setup scripts do. > > > > Signed-off-by: John Snow

Re: [PATCH 4/5] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-14 Thread John Snow
On Tue, Jun 14, 2022 at 5:09 AM Daniel P. Berrangé wrote: > > On Mon, Jun 13, 2022 at 09:50:43PM -0400, John Snow wrote: > > The old CentOS image didn't work anymore because it was already EOL at > > the beginning of 2022. > > > > Signed-off-by: John Snow > > --- > > tests/vm/centos | 8

[PATCH] hw:w25p80: Add STATE_STANDBY to handle incorrect command

2022-06-14 Thread Dan Zhang
--- hw/block/m25p80.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index b6bd430a99..3bb0466dca 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -423,6 +423,7 @@ typedef enum { STATE_COLLECTING_DATA, STATE_COLLECTING_VAR_LEN_DA

Re: [PATCH 0/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-14 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 05:47:10PM +0100, Stefan Hajnoczi wrote: > An unlucky I/O pattern can result in stalled Linux AIO requests when the > plugged counter becomes unbalanced. See Patch 1 for details. > > Patch 2 adds a comment to explain why the laio_io_unplug() even checks max > batch in the f

Re: [PATCH] hw:w25p80: Add STATE_STANDBY to handle incorrect command

2022-06-14 Thread Dan Zhang
Hi Cedric, I am sorry that accidently submit a pre-view code change as a patch using the git-sendmail. I originally mean to copy the following code in email reply and let commnity get better understand my proposal. Let me submit a formal patch in seperate thread. And will remove the code using t

Re: [PULL 00/10] Block jobs & NBD patches

2022-06-14 Thread Richard Henderson
On 6/14/22 03:29, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: h

[PATCH] hw:m25p80: Add STATE_STANDBY command state

2022-06-14 Thread Dan Zhang
HW normally will switch it to stand by mode when receive incorrect command. i.e. Macronix MX66L1G45G data sheet section 8 DEVICE OPERATION described ``` 2. When an incorrect command is written to this device, it enters standby mode and stays in standby mode until the next CS# falling edge. In stand