[PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread Bin Meng
From: Bin Meng The m25p80 model uses s->needed_bytes to indicate how many follow-up bytes are expected to be received after it receives a command. For example, depending on the address mode, either 3-byte address or 4-byte address is needed. For fast read family commands, some dummy cycles are

[PATCH 3/9] hw/block: m25p80: Fix the number of dummy bytes needed for Macronix flashes

2021-01-14 Thread Bin Meng
From: Bin Meng Per datasheet [1], the number of dummy cycles for Macronix flashes is configurable via two volatible bits (DC1, DC2) in a configuration register. Do the same dummy cycle to dummy byte conversion fix as others. [1]

Re: [PATCH 09/22] hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer

2021-01-14 Thread Philippe Mathieu-Daudé
On 12/31/20 12:29 PM, Bin Meng wrote: > From: Bin Meng > > At present the codes use hardcoded numbers (0xff/0xfe) for the dummy > value and block start token. Replace them with macros, and add more > tokens for multiple block write. > > Signed-off-by: Bin Meng > --- > > hw/sd/ssi-sd.c | 30

[PATCH 4/9] hw/block: m25p80: Fix the number of dummy bytes needed for Spansion flashes

2021-01-14 Thread Bin Meng
From: Bin Meng Per datasheet [1], the number of dummy cycles for Spansion flashes is configurable via 4 volatible bits in a configuration register. Do the same dummy cycle to dummy byte conversion fix as others. [1] https://www.cypress.com/file/316171/download Signed-off-by: Bin Meng ---

[PATCH 2/9] hw/block: m25p80: Fix the number of dummy bytes needed for Numonyx/Micron flashes

2021-01-14 Thread Bin Meng
From: Bin Meng Unfortunately the dummy cycle/bytes calculation for Numonyx/Micron flashes is still wrong, even though there were fixes before that tried to fix it. First of all, the default number of dummy cycles is only related to the SPI protocol mode. For QSPI it is 10, otherwise it is 8.

[PATCH 5/9] hw/block: m25p80: Support fast read for SST flashes

2021-01-14 Thread Bin Meng
From: Bin Meng Per SST25VF016B datasheet [1], SST flash requires a dummy byte after the address bytes. Note only SPI mode is supported by SST flashes. [1] http://ww1.microchip.com/downloads/en/devicedoc/s71271_04.pdf Signed-off-by: Bin Meng --- hw/block/m25p80.c | 3 +++ 1 file changed, 3

Re: [PATCH 13/22] hw/sd: Introduce receive_ready() callback

2021-01-14 Thread Philippe Mathieu-Daudé
On 12/31/20 12:30 PM, Bin Meng wrote: > From: Bin Meng > > At present there is a data_ready() callback for the SD data read > path. Let's add a receive_ready() for the SD data write path. > > Signed-off-by: Bin Meng > --- > > include/hw/sd/sd.h | 2 ++ > hw/sd/core.c | 13

Re: [PATCH 05/22] hw/sd: sd: Drop sd_crc16()

2021-01-14 Thread Philippe Mathieu-Daudé
On 12/31/20 12:29 PM, Bin Meng wrote: > From: Bin Meng > > commit f6fb1f9b319f ("sdcard: Correct CRC16 offset in sd_function_switch()") > changed the 16-bit CRC to be stored at offset 64. In fact, this CRC > calculation is completely wrong. Yeah:

Re: [PATCH v4 5/5] qapi: More complex uses of QAPI_LIST_APPEND

2021-01-14 Thread Markus Armbruster
Eric Blake writes: > These cases require a bit more thought to review; in each case, the > code was appending to a list, but not with a FOOList **tail variable. > > Signed-off-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster

Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes

2021-01-14 Thread Bin Meng
On Tue, Jan 12, 2021 at 9:10 AM Bin Meng wrote: > > On Wed, Jan 6, 2021 at 10:21 PM Bin Meng wrote: > > > > Hi Francisco, > > > > On Tue, Dec 22, 2020 at 9:40 AM Bin Meng wrote: > > > > > > Hi Francisco, > > > > > > On Wed, Dec 16, 2020 at 6:11 PM Bin Meng wrote: > > > > > > > > Hi Francisco,

[PATCH 1/9] hw/block: m25p80: Fix the number of dummy bytes needed for Windbond flashes

2021-01-14 Thread Bin Meng
From: Bin Meng The m25p80 model uses s->needed_bytes to indicate how many follow-up bytes are expected to be received after it receives a command. For example, depending on the address mode, either 3-byte address or 4-byte address is needed. For fast read family commands, some dummy cycles are

Re: [PATCH v3 2/4] hw/block/nvme: fix overwritten bar.cap

2021-01-14 Thread Klaus Jensen
On Jan 14 15:22, zhenwei pi wrote: > After PMR initialization, bar.cap should not be clear in function > nvme_init_ctrl. Otherwise the PMR cap would be always disabled. > > Signed-off-by: zhenwei pi > --- > hw/block/nvme.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/block/nvme.c

Re: [PATCH v3 3/4] hw/block/nvme: add smart_critical_warning property

2021-01-14 Thread Klaus Jensen
On Jan 14 15:22, zhenwei pi wrote: > There is a very low probability that hitting physical NVMe disk > hardware critical warning case, it's hard to write & test a monitor > agent service. > > For debugging purposes, add a new 'smart_critical_warning' property > to emulate this situation. > > The

Re: [PATCH v6 08/11] iotests: add testenv.py

2021-01-14 Thread Kevin Wolf
Am 14.01.2021 um 05:28 hat Vladimir Sementsov-Ogievskiy geschrieben: > 09.01.2021 15:26, Vladimir Sementsov-Ogievskiy wrote: > > Add TestEnv class, which will handle test environment in a new python > > iotests running framework. > > > > Difference with current ./check interface: > > - -v

Re: [PATCH v2 1/8] iotests/297: Allow checking all Python test files

2021-01-14 Thread Vladimir Sementsov-Ogievskiy
14.01.2021 12:31, Max Reitz wrote: On 13.01.21 21:28, Vladimir Sementsov-Ogievskiy wrote: 13.01.2021 22:27, Vladimir Sementsov-Ogievskiy wrote: 13.01.2021 20:57, Max Reitz wrote: I.e., all Python files in the qemu-iotests/ directory. Most files of course do not pass, so there is an extensive

Re: [PATCH v6 08/11] iotests: add testenv.py

2021-01-14 Thread Vladimir Sementsov-Ogievskiy
14.01.2021 14:14, Kevin Wolf wrote: Am 14.01.2021 um 05:28 hat Vladimir Sementsov-Ogievskiy geschrieben: 09.01.2021 15:26, Vladimir Sementsov-Ogievskiy wrote: Add TestEnv class, which will handle test environment in a new python iotests running framework. Difference with current ./check

Re: [PATCH v2 1/8] iotests/297: Allow checking all Python test files

2021-01-14 Thread Max Reitz
On 13.01.21 20:01, Eric Blake wrote: On 1/13/21 11:57 AM, Max Reitz wrote: I.e., all Python files in the qemu-iotests/ directory. Most files of course do not pass, so there is an extensive skip list for now. (The only files that do pass are 209, 254, 283, and iotests.py.) (Alternatively, we

Re: [PATCH v6 07/11] iotests: add findtests.py

2021-01-14 Thread Kevin Wolf
Am 14.01.2021 um 08:38 hat Vladimir Sementsov-Ogievskiy geschrieben: > 12.01.2021 19:42, Kevin Wolf wrote: > > > +def find_tests(self, groups: Optional[List[str]] = None, > > > + exclude_groups: Optional[List[str]] = None, > > > + tests: Optional[List[str]]

Re: [PATCH v2 1/8] iotests/297: Allow checking all Python test files

2021-01-14 Thread Max Reitz
On 13.01.21 20:27, Vladimir Sementsov-Ogievskiy wrote: 13.01.2021 20:57, Max Reitz wrote: I.e., all Python files in the qemu-iotests/ directory. Most files of course do not pass, so there is an extensive skip list for now.  (The only files that do pass are 209, 254, 283, and iotests.py.)

Re: [PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-14 Thread Klaus Jensen
On Jan 14 15:22, zhenwei pi wrote: > During smart critical warning injection by setting property from QMP > command, also try to trigger asynchronous event. > > Signed-off-by: zhenwei pi > --- > hw/block/nvme.c | 47 --- > 1 file changed, 40

Re: [PATCH v2 1/8] iotests/297: Allow checking all Python test files

2021-01-14 Thread Max Reitz
On 13.01.21 21:28, Vladimir Sementsov-Ogievskiy wrote: 13.01.2021 22:27, Vladimir Sementsov-Ogievskiy wrote: 13.01.2021 20:57, Max Reitz wrote: I.e., all Python files in the qemu-iotests/ directory. Most files of course do not pass, so there is an extensive skip list for now.  (The only files

Re: [PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-14 Thread Philippe Mathieu-Daudé
On 1/14/21 8:22 AM, zhenwei pi wrote: > During smart critical warning injection by setting property from QMP > command, also try to trigger asynchronous event. > > Signed-off-by: zhenwei pi > --- > hw/block/nvme.c | 47 --- > 1 file changed, 40

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210114150902.11515-1-bmeng...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210114150902.11515-1-bmeng...@gmail.com Subject: [PATCH 0/9] hw/block: m25p80: Fix the

[PATCH v3 06/10] iotests/129: Use throttle node

2021-01-14 Thread Max Reitz
Throttling on the BB has not affected block jobs in a while, so it is possible that one of the jobs in 129 finishes before the VM is stopped. We can fix that by running the job from a throttle node. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/129 | 37

[PATCH v3 02/10] iotests/297: Rewrite in Python and extend reach

2021-01-14 Thread Max Reitz
Instead of checking iotests.py only, check all Python files in the qemu-iotests/ directory. Of course, most of them do not pass, so there is an extensive skip list for now. (The only files that do pass are 209, 254, 283, and iotests.py.) (Alternatively, we could have the opposite, i.e. an

[PATCH v3 05/10] iotests/129: Do not check @busy

2021-01-14 Thread Max Reitz
@busy is false when the job is paused, which happens all the time because that is how jobs yield (e.g. for mirror at least since commit 565ac01f8d3). Back when 129 was added (2015), perhaps there was no better way of checking whether the job was still actually running. Now we have the @status

[PATCH v3 07/10] iotests/129: Actually test a commit job

2021-01-14 Thread Max Reitz
Before this patch, test_block_commit() performs an active commit, which under the hood is a mirror job. If we want to test various different block jobs, we should perhaps run an actual commit job instead. Doing so requires adding an overlay above the source node before the commit is done (and

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread Cédric Le Goater
On 1/14/21 4:08 PM, Bin Meng wrote: > From: Bin Meng > > The m25p80 model uses s->needed_bytes to indicate how many follow-up > bytes are expected to be received after it receives a command. For > example, depending on the address mode, either 3-byte address or > 4-byte address is needed. > >

[PATCH v3 04/10] iotests/129: Remove test images in tearDown()

2021-01-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/129 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 0e13244d85..2fc65ada6a 100755 --- a/tests/qemu-iotests/129 +++

[PATCH v3 10/10] iotests/300: Clean up pylint and mypy complaints

2021-01-14 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/297 | 2 +- tests/qemu-iotests/300 | 18 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index 1dce1d1b1c..03d8604538 100755 --- a/tests/qemu-iotests/297 +++

[PATCH v3 03/10] iotests: Move try_remove to iotests.py

2021-01-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/124| 8 +--- tests/qemu-iotests/iotests.py | 11 +++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 3705cbb6b3..e40eeb50b9 100755

[PATCH v3 01/10] iotests.py: Assume a couple of variables as given

2021-01-14 Thread Max Reitz
There are a couple of environment variables that we fetch with os.environ.get() without supplying a default. Clearly they are required and expected to be set by the ./check script (as evidenced by execute_setup_common(), which checks for test_dir and qemu_default_machine to be set, and aborts if

[PATCH v3 09/10] iotests/129: Clean up pylint and mypy complaints

2021-01-14 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/129 | 4 ++-- tests/qemu-iotests/297 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 6d21470cd7..201d9e0a0b 100755 --- a/tests/qemu-iotests/129 +++

[PATCH v3 08/10] iotests/129: Limit mirror job's buffer size

2021-01-14 Thread Max Reitz
Issuing 'stop' on the VM drains all nodes. If the mirror job has many large requests in flight, this may lead to significant I/O that looks a bit like 'stop' would make the job try to complete (which is what 129 should verify not to happen). We can limit the I/O in flight by limiting the buffer

Re: [PATCH v3 3/4] hw/block/nvme: add smart_critical_warning property

2021-01-14 Thread Philippe Mathieu-Daudé
On 1/14/21 8:22 AM, zhenwei pi wrote: > There is a very low probability that hitting physical NVMe disk > hardware critical warning case, it's hard to write & test a monitor > agent service. > > For debugging purposes, add a new 'smart_critical_warning' property > to emulate this situation. > >

[PATCH v3 00/10] iotests: Fix 129 and expand 297’s reach

2021-01-14 Thread Max Reitz
Cover letters: v1: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00254.html v2: https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00296.html git: https://github.com/XanClic/qemu.git fix-129-2-v3 https://git.xanclic.moe/XanClic/qemu.git fix-129-2-v3 Hi, See the v1 cover

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread Francisco Iglesias
Hi Bin, On [2021 Jan 14] Thu 23:08:53, Bin Meng wrote: > From: Bin Meng > > The m25p80 model uses s->needed_bytes to indicate how many follow-up > bytes are expected to be received after it receives a command. For > example, depending on the address mode, either 3-byte address or > 4-byte

Re: [PATCH v3 09/10] iotests/129: Clean up pylint and mypy complaints

2021-01-14 Thread Willian Rampazzo
On Thu, Jan 14, 2021 at 2:41 PM Max Reitz wrote: > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/129 | 4 ++-- > tests/qemu-iotests/297 | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 > index

Re: [PATCH] hw/block/nvme: conditionally enable DULBE for zoned namespaces

2021-01-14 Thread Keith Busch
On Mon, Jan 11, 2021 at 07:09:52PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > The device uses the BDRV_BLOCK_ZERO flag to determine the "deallocated" > status of logical blocks. Since the zoned namespaces command set > specification defines that logical blocks SHALL be marked as

Re: [PATCH v3 3/4] hw/block/nvme: add smart_critical_warning property

2021-01-14 Thread Keith Busch
On Thu, Jan 14, 2021 at 03:22:50PM +0800, zhenwei pi wrote: > +static void nvme_get_smart_warning(Object *obj, Visitor *v, const char *name, > + void *opaque, Error **errp) > +{ > +NvmeCtrl *s = NVME(obj); With only one exception, all variables of type

Re: [PATCH] hw/block/nvme: fix zone write finalize

2021-01-14 Thread Keith Busch
On Tue, Jan 12, 2021 at 10:42:35AM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > The zone write pointer is unconditionally advanced, even for write > faults. Make sure that the zone is always transitioned to Full if the > write pointer reaches zone capacity. Looks like some spec

Re: [PATCH 1/6] hw/block/nvme: fix shutdown/reset logic

2021-01-14 Thread Keith Busch
On Mon, Jan 11, 2021 at 01:32:18PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > A shutdown is only about flushing stuff. It is the host that should > delete any queues, so do not perform a reset here. > > Also, on shutdown, make sure that the PMR is flushed if in use. > > Fixes:

Re: [PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-14 Thread Keith Busch
On Thu, Jan 14, 2021 at 03:22:51PM +0800, zhenwei pi wrote: > @@ -2860,6 +2887,12 @@ static void nvme_set_smart_warning(Object *obj, > Visitor *v, const char *name, > } > > s->smart_critical_warning = value; > + > +/* test each bit of uint8_t for smart.critical_warning */ > +

Re: [PATCH 3/7] block/rbd: use stored image_size in qemu_rbd_getlength

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index bc8cf8af9b..a2da70e37f 100644 > --- a/block/rbd.c > +++ b/block/rbd.c >

Re: [PATCH 5/7] block/rbd: migrate from aio to coroutines

2021-01-14 Thread Peter Lieven
Am 14.01.21 um 20:19 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 247 ++-- >> 1 file changed, 84 insertions(+), 163 deletions(-) >> >> diff --git

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-14 Thread Peter Lieven
Am 14.01.21 um 20:19 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: >> since we implement byte interfaces and librbd supports aio on byte >> granularity we can lift >> the 512 byte alignment. >> >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 2 -- >> 1

Re: [PATCH 06/22] util: Add CRC16 (CCITT) calculation routines

2021-01-14 Thread Alistair Francis
On Thu, Dec 31, 2020 at 3:35 AM Bin Meng wrote: > > From: Bin Meng > > Import CRC16 calculation routines from Linux kernel v5.10: > > include/linux/crc-ccitt.h > lib/crc-ccitt.c > > to QEMU: > > include/qemu/crc-ccitt.h > util/crc-ccitt.c > > Signed-off-by: Bin Meng Acked-by: Alistair

Re: [PATCH 4/7] block/rbd: add bdrv_{attach,detach}_aio_context

2021-01-14 Thread Peter Lieven
Am 14.01.21 um 20:18 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 21 +++-- >> 1 file changed, 19 insertions(+), 2 deletions(-) >> >> diff --git a/block/rbd.c b/block/rbd.c >> index

Re: [PATCH 6/7] block/rbd: add write zeroes support

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 31 ++- > 1 file changed, 30 insertions(+), 1 deletion(-) > > diff --git a/block/rbd.c b/block/rbd.c > index 2d77d0007f..27b4404adf 100644 > --- a/block/rbd.c >

Re: [PATCH 3/7] block/rbd: use stored image_size in qemu_rbd_getlength

2021-01-14 Thread Peter Lieven
Am 14.01.21 um 20:18 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 10 +- >> 1 file changed, 1 insertion(+), 9 deletions(-) >> >> diff --git a/block/rbd.c b/block/rbd.c >> index

Re: [PATCH 6/7] block/rbd: add write zeroes support

2021-01-14 Thread Peter Lieven
Am 14.01.21 um 20:19 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 31 ++- >> 1 file changed, 30 insertions(+), 1 deletion(-) >> >> diff --git a/block/rbd.c b/block/rbd.c >> index

Re: [PATCH 5/7] block/rbd: migrate from aio to coroutines

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 247 ++-- > 1 file changed, 84 insertions(+), 163 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index 27b232f4d8..2d77d0007f

Re: [PATCH 4/7] block/rbd: add bdrv_{attach,detach}_aio_context

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index a2da70e37f..27b232f4d8 100644 > --- a/block/rbd.c > +++

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > since we implement byte interfaces and librbd supports aio on byte > granularity we can lift > the 512 byte alignment. > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git

[PATCH v4 2/3] hw/block/nvme: add smart_critical_warning property

2021-01-14 Thread zhenwei pi
There is a very low probability that hitting physical NVMe disk hardware critical warning case, it's hard to write & test a monitor agent service. For debugging purposes, add a new 'smart_critical_warning' property to emulate this situation. The orignal version of this change is implemented by

[PATCH v4 1/3] block/nvme: introduce bit 5 for critical warning

2021-01-14 Thread zhenwei pi
According to NVMe spec 1.4 section , introduce bit 5 for "Persistent Memory Region has become read-only or unreliable". Signed-off-by: zhenwei pi --- include/block/nvme.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/nvme.h b/include/block/nvme.h index 9494246f1f..0baf4b27cd

[PATCH v4 0/3] support NVMe smart critial warning injection

2021-01-14 Thread zhenwei pi
v3 -> v4: - Drop "Fix overwritten bar.cap". (Already fixed) - Avoid to enqueue the duplicate event. - Several minor changes for coding style & function/variable name. v2 -> v3: - Introduce "Persistent Memory Region has become read-only or unreliable" - Fix overwritten bar.cap - Check smart

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread Bin Meng
Hi Francisco, On Fri, Jan 15, 2021 at 2:13 AM Francisco Iglesias wrote: > > Hi Bin, > > On [2021 Jan 14] Thu 23:08:53, Bin Meng wrote: > > From: Bin Meng > > > > The m25p80 model uses s->needed_bytes to indicate how many follow-up > > bytes are expected to be received after it receives a

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-14 Thread Havard Skinnemoen via
Hi Bin, On Thu, Jan 14, 2021 at 6:08 PM Bin Meng wrote: > > Hi Francisco, > > On Fri, Jan 15, 2021 at 2:13 AM Francisco Iglesias > wrote: > > > > Hi Bin, > > > > On [2021 Jan 14] Thu 23:08:53, Bin Meng wrote: > > > From: Bin Meng > > > > > > The m25p80 model uses s->needed_bytes to indicate

[PATCH v4 3/3] hw/blocl/nvme: trigger async event during injecting smart warning

2021-01-14 Thread zhenwei pi
During smart critical warning injection by setting property from QMP command, also try to trigger asynchronous event. Suggested by Keith, if a event has already been raised, there is no need to enqueue the duplicate event any more. Signed-off-by: zhenwei pi --- hw/block/nvme.c | 48

Re: [PATCH] hw/block/nvme: fix zone write finalize

2021-01-14 Thread Klaus Jensen
On Jan 14 15:03, Keith Busch wrote: > On Tue, Jan 12, 2021 at 10:42:35AM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > The zone write pointer is unconditionally advanced, even for write > > faults. Make sure that the zone is always transitioned to Full if the > > write pointer

Re: [PATCH] hw/block/nvme: fix for non-msix machines

2021-01-14 Thread Klaus Jensen
On Jan 12 14:20, Philippe Mathieu-Daudé wrote: > On 1/12/21 1:47 PM, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Commit 1c0c2163aa08 ("hw/block/nvme: verify msix_init_exclusive_bar() > > return value") had the unintended effect of breaking support on > > several platforms not supporting

Re: [PATCH] hw/block/nvme: conditionally enable DULBE for zoned namespaces

2021-01-14 Thread Klaus Jensen
On Jan 14 15:39, Keith Busch wrote: > On Mon, Jan 11, 2021 at 07:09:52PM +0100, Klaus Jensen wrote: > > From: Klaus Jensen > > > > The device uses the BDRV_BLOCK_ZERO flag to determine the "deallocated" > > status of logical blocks. Since the zoned namespaces command set > > specification