Re: [PATCH v2 00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200912225430.1772-1-dmitry.fomic...@wdc.com/ Hi, This series seems to have some coding style problems. See output below for more information: N/A. Internal error while reading log file The full log is available at http://patchew.org/logs/202009122254

Re: [PATCH v8 00/27] W32, W64 msys2/mingw patches

2020-09-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200912224431.1428-1-luoyongg...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: N/A. Internal error while reading log file The full log is available at http://patchew.org/logs/20200912224431

[PATCH v2 11/15] hw/block/nvme: Introduce max active and open zone limits

2020-09-12 Thread Dmitry Fomichev
Added two module properties, "max_active" and "max_open" to control the maximum number of zones that can be active or open. Once these variables are set to non-default values, these limits are checked during I/O and Too Many Active or Too Many Open command status is returned if they are exceeded.

[PATCH v2 14/15] hw/block/nvme: Use zone metadata file for persistence

2020-09-12 Thread Dmitry Fomichev
A ZNS drive that is emulated by this module is currently initialized with all zones Empty upon startup. However, actual ZNS SSDs save the state and condition of all zones in their internal NVRAM in the event of power loss. When such a drive is powered up again, it closes or finishes all zones that

[PATCH v2 08/15] hw/block/nvme: Make Zoned NS Command Set definitions

2020-09-12 Thread Dmitry Fomichev
Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator. All new protocol definitions are located in include/block/nvme.h and everything added that is specific to this implementation is kept in hw/block/nvme.h. In order to

[PATCH v2 12/15] hw/block/nvme: Support Zone Descriptor Extensions

2020-09-12 Thread Dmitry Fomichev
Zone Descriptor Extension is a label that can be assigned to a zone. It can be set to an Empty zone and it stays assigned until the zone is reset. This commit adds a new optional module property, "zone_descr_ext_size". Its value must be a multiple of 64 bytes. If this value is non-zero, it becomes

[PATCH v2 15/15] hw/block/nvme: Document zoned parameters in usage text

2020-09-12 Thread Dmitry Fomichev
Added brief descriptions of the new device properties that are now available to users to configure features of Zoned Namespace Command Set in the emulator. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 43

[PATCH v2 05/15] hw/block/nvme: Define trace events related to NS Types

2020-09-12 Thread Dmitry Fomichev
A few trace events are defined that are relevant to implementing Namespace Types (NVMe TP 4056). Signed-off-by: Dmitry Fomichev Reviewed-by: Klaus Jensen --- hw/block/trace-events | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events index

[PATCH v2 03/15] hw/block/nvme: Add Commands Supported and Effects log

2020-09-12 Thread Dmitry Fomichev
This log page becomes necessary to implement to allow checking for Zone Append command support in Zoned Namespace Command Set. This commit adds the code to report this log page for NVM Command Set only. The parts that are specific to zoned operation will be added later in the series. Signed-off-b

[PATCH v2 07/15] hw/block/nvme: Add support for active/inactive namespaces

2020-09-12 Thread Dmitry Fomichev
From: Niklas Cassel In NVMe, a namespace is active if it exists and is attached to the controller. CAP.CSS (together with the I/O Command Set data structure) defines what command sets are supported by the controller. CC.CSS (together with Set Profile) can be set to enable a subset of the availa

[PATCH v2 06/15] hw/block/nvme: Add support for Namespace Types

2020-09-12 Thread Dmitry Fomichev
From: Niklas Cassel Namespace Types introduce a new command set, "I/O Command Sets", that allows the host to retrieve the command sets associated with a namespace. Introduce support for the command set and enable detection for the NVM Command Set. The new workflows for identify commands rely hea

[PATCH v2 10/15] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-12 Thread Dmitry Fomichev
The emulation code has been changed to advertise NVM Command Set when "zoned" device property is not set (default) and Zoned Namespace Command Set otherwise. Handlers for three new NVMe commands introduced in Zoned Namespace Command Set specification are added, namely for Zone Management Receive,

[PATCH v2 00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-12 Thread Dmitry Fomichev
v1 -> v2: - Rebased on top of qemu-nvme/next branch. - Incorporated feedback from Klaus and Alistair. - Dropped "Simulate Zone Active excursions" patch. Excursion behavior may depend on the internal controller architecture and therefore be vendor-specific. - Dropped support for Zone Attr

[PATCH v8 27/27] Revert "configure: add --ninja option"

2020-09-12 Thread Yonggang Luo
This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41. The --ninja option doesn't need anymore because of upgrade meson to 0.55.2 At that version we can use ninjatool Signed-off-by: Yonggang Luo --- configure | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --

[PATCH v2 02/15] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-12 Thread Dmitry Fomichev
Calculate the data shift value to report based on the set value of logical_block_size device property. In the process, use a local variable to calculate the LBA format index instead of the hardcoded value 0. This makes the code more readable and it will make it easier to add support for multiple L

[PATCH v8 25/27] meson: upgrade meson for execute custom ninjatool under msys2 properly

2020-09-12 Thread Yonggang Luo
* Bump versions to 0.55.2 for release * Tag Info: object 008d13038f95e7c7d8ad553f14e408da5b94c360 type commit tag 0.55.2 tagger Jussi Pakkanen 2020/9/11 1:24:47 Signed-off-by: Yonggang Luo --- meson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson b/meson index 68ed748

[PATCH v2 13/15] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-09-12 Thread Dmitry Fomichev
ZNS specification defines two zone conditions for the zones that no longer can function properly, possibly because of flash wear or other internal fault. It is useful to be able to "inject" a small number of such zones for testing purposes. This commit defines two optional device properties, "offl

[PATCH v8 21/27] tests: fix test-util-sockets.c

2020-09-12 Thread Yonggang Luo
Fixes following errors: Running test test-util-sockets ERROR test-util-sockets - missing test plan # Start of name tests ** ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) Bail out! ERROR:../tests/test-util-sockets.c:93:test_socket_fd_p

[PATCH v8 24/27] ci: Enable msys2 ci in cirrus

2020-09-12 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

[PATCH v2 09/15] hw/block/nvme: Define Zoned NS Command Set trace events

2020-09-12 Thread Dmitry Fomichev
The Zoned Namespace Command Set / Namespace Types implementation that is being introduced in this series adds a good number of trace events. Combine all tracepoint definitions into a separate patch to make reviewing more convenient. Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 26 +

[PATCH v2 04/15] hw/block/nvme: Introduce the Namespace Types definitions

2020-09-12 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- hw/block/nvme.h | 3 ++ include/block/nvme.h | 74 +++-

[PATCH v8 17/27] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-12 Thread Yonggang Luo
g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/test-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a11

[PATCH v8 19/27] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c

2020-09-12 Thread Yonggang Luo
This is a fixes for (C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED (

[PATCH v2 01/15] hw/block/nvme: Define 64 bit cqe.result

2020-09-12 Thread Dmitry Fomichev
From: Ajay Joshi A new write command, Zone Append, is added as a part of Zoned Namespace Command Set. Upon successful completion of this command, the controller returns the start LBA of the performed write operation in cqe.result field. Therefore, the maximum size of this variable needs to be cha

[PATCH v8 18/27] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

2020-09-12 Thread Yonggang Luo
Currently test-io-channel-socket doesn't init with qemu_init_main_loop and that's cause the qemu_aio_context not inited, and the following is the stack when null pointer accessed: qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336) qemu_try_set_nonblock (c:\work\xemu\qemu\util\oslib-win32.c:

[PATCH v8 23/27] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full

2020-09-12 Thread Yonggang Luo
drain_call_rcu is necessary on win32, because under win32, if you don't close the file before remove it, the remove would be fail. Signed-off-by: Yonggang Luo --- tests/test-logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-logging.c b/tests/test-logging.c index 783fe09a

[PATCH v8 12/27] gcrypt: test_tls_psk_init should write binary file instead text file.

2020-09-12 Thread Yonggang Luo
On windows, if open file with "w", it's will automatically convert "\n" to "\r\n" when writing to file. Convert unlink to use g_remove. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/crypto-tls-psk-h

[PATCH v8 10/27] osdep: file locking functions are not available on Win32

2020-09-12 Thread Yonggang Luo
int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé ---

[PATCH v8 26/27] meson: remove --ninja option in configure.

2020-09-12 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1ff9f0a72f..87bd110d28 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -99,7 +99,7 @@ windows_msys2_task: mingw-w64-x86_64-zstd" script: -

[PATCH v8 20/27] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-12 Thread Yonggang Luo
This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out! ERROR:../tests/test-io-channel-file.c:59:test_

[PATCH v8 22/27] tests: Fixes test-qdev-global-props.c

2020-09-12 Thread Yonggang Luo
On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-qdev-global-props.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tes

[PATCH v8 14/27] meson: remove empty else and duplicated gio deps

2020-09-12 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index bd84a1e777..a725b66a83 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in con

[PATCH v8 08/27] tests: Fixes test-replication.c on msys2/mingw.

2020-09-12 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Use g_get_tmp_dir instead of /tmp. Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-replication.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c

[PATCH v8 16/27] cirrus: Building freebsd in a single short

2020-09-12 Thread Yonggang Luo
This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba ("cirrus.yml: Split FreeBSD job into two parts"). freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at https://cirrus-ci.com/task/51105775319777

[PATCH v8 07/27] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-12 Thread Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter. Signed-off-by: Yonggang Luo --- tests/test-char.c | 26 -- 1 file changed, 16 insertions(+), 10 deletio

[PATCH v8 06/27] curses: Fixes curses compiling errors.

2020-09-12 Thread Yonggang Luo
This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~

[PATCH v8 09/27] tests: test-replication disable /replication/secondary/* on msys2/mingw.

2020-09-12 Thread Yonggang Luo
They caused failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. This is the error message: > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests >

[PATCH v8 05/27] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS.

2020-09-12 Thread Yonggang Luo
First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the followi

[PATCH v8 15/27] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-12 Thread Yonggang Luo
The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/te

[PATCH v8 11/27] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-12 Thread Yonggang Luo
On windows, a difference in line endings causes testsuite failures complaining that every single line in files such as 'tests/qapi-schemadoc-good.texi' is wrong. Fix it by adding -b to diff. Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrangé --- tests/qapi-sch

[PATCH v8 13/27] tests: Enable crypto tests under msys2/mingw

2020-09-12 Thread Yonggang Luo
Fixes following tests on msys2/mingw 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, crypto], 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',

[PATCH v8 03/27] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-12 Thread Yonggang Luo
The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged v

[PATCH v8 02/27] block: Fixes nfs compiling error on msys2/mingw

2020-09-12 Thread Yonggang Luo
These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~ ../block/nfs.c: I

[PATCH v8 00/27] W32, W64 msys2/mingw patches

2020-09-12 Thread Yonggang Luo
It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and disable partial test-char tests. And then fixes all unit tests failure on msys2/mingw This fixes the reviews suggested in the mailling list All cirrus CI are passed Maxim Levitsky (1): rcu: Implement drain_call_rcu Yonggan

[PATCH v8 04/27] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-12 Thread Yonggang Luo
The mingw pkg-config are showing following absolute path and contains : as the separator, so we must not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -D_XOPEN_SOURCE=600 -D_POSIX_C_S

[PATCH v8 01/27] rcu: Implement drain_call_rcu

2020-09-12 Thread Yonggang Luo
From: Maxim Levitsky This will allow is to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Signed-off-by: Maxim Levitsky Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- include

Re: [PATCH] iotests: Allow running from different directory

2020-09-12 Thread Claudio Fontana
On 9/3/20 7:21 PM, Kevin Wolf wrote: > Am 03.09.2020 um 14:54 hat Max Reitz geschrieben: >> On 02.09.20 13:03, Kevin Wolf wrote: >>> It is convenient to be able to edit the tests and run them without >>> changing the current working directory back and forth. Instead of >>> assuming that $PWD is the

Re: [PULL v2] Block layer patches

2020-09-12 Thread Peter Maydell
On Sat, 12 Sep 2020 at 13:27, Thomas Huth wrote: > Peter, why did this slip through your merge tests, do you still skip the > iotests there? I forget what the reason for them being skipped is, maybe it's because they demand a gnu sed ? thanks -- PMM

Re: [PULL v2] Block layer patches

2020-09-12 Thread Thomas Huth
On 10/09/2020 00.09, Eric Blake wrote: > On 9/9/20 4:55 PM, Peter Maydell wrote: > >> >> This fails 'make check' on NetBSD and OpenBSD: >> >> ./check: line 47: realpath: command not found >> ./check: line 60: /common.env: No such file or directory >> check: failed to source common.env (make sure t

[PATCH] tests/check-block: Do not run the iotests with old versions of bash

2020-09-12 Thread Thomas Huth
macOS is shipped with a very old version of the bash (3.2), which is currently not suitable for running the iotests anymore. Add a check to skip the iotests in this case - if someone still wants to run the iotests on macOS, they can install a newer version from homebrew, for example. Signed-off-by

Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)

2020-09-12 Thread Paolo Bonzini
On 10/09/20 17:22, Philippe Mathieu-Daudé wrote: > This is the second part of a series reducing user-mode > dependencies. By stripping out unused code, the build > and testing time is reduced (as is space used by objects). > > Part 2: > - Extract code not related to user-mode from qapi/misc.json >