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

2020-09-13 Thread Yonggang Luo
On Mon, Sep 14, 2020 at 2:38 PM Stefan Weil wrote: > > Am 14.09.20 um 08:27 schrieb 罗勇刚(Yonggang Luo): > > > Thanks, I am learning how to submit patches properly, in old days, when I am using pull request on github have no such problems. easy to follow up > > > May I also ask you to send text-onl

Re: [PATCH 11/14] block/qcow2-bitmap: return startus from qcow2_store_persistent_dirty_bitmaps

2020-09-13 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 11.09.2020 18:22, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 11.09.2020 14:21, Greg Kurz wrote: On Fri, 11 Sep 2020 13:18:32 +0300 Vladimir Sementsov-Ogievskiy wrote: [...] > Hmm.. With this series I understand t

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/14/20 8:27 AM, 罗勇刚(Yonggang Luo) wrote: > > > On Mon, Sep 14, 2020 at 2:10 PM Thomas Huth > wrote: > > On 13/09/2020 00.44, Yonggang Luo wrote: > > It first introduce msys2 CI on cirrus by fixes nfs, capstone, > curses and > > disable partial test-c

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

2020-09-13 Thread Stefan Weil
Am 14.09.20 um 08:27 schrieb 罗勇刚(Yonggang Luo): > > Thanks, I am learning how to submit patches properly, in old days,  > when I am using pull request on github have no such problems. easy to > follow up May I also ask you to send text-only e-mails? Your HTML e-mails are really hard to read. Th

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/14/20 12:14 AM, Dmitry Fomichev wrote: > 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(+) Revi

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

2020-09-13 Thread Yonggang Luo
On Mon, Sep 14, 2020 at 2:10 PM Thomas Huth wrote: > On 13/09/2020 00.44, Yonggang Luo wrote: > > 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 sugge

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

2020-09-13 Thread Thomas Huth
On 13/09/2020 00.44, Yonggang Luo wrote: > 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 Hi, sin

Re: [PULL v2] Block layer patches

2020-09-13 Thread Thomas Huth
On 12/09/2020 20.38, Peter Maydell wrote: > 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 ? The test

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

2020-09-13 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 v3 12/15] hw/block/nvme: Support Zone Descriptor Extensions

2020-09-13 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 v3 15/15] hw/block/nvme: Document zoned parameters in usage text

2020-09-13 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 v3 14/15] hw/block/nvme: Use zone metadata file for persistence

2020-09-13 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 v3 08/15] hw/block/nvme: Make Zoned NS Command Set definitions

2020-09-13 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 v3 10/15] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-13 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 v3 11/15] hw/block/nvme: Introduce max active and open zone limits

2020-09-13 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 v3 00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-13 Thread Dmitry Fomichev
v2 -> v3: - Moved nvme_fill_data() function to the NSTypes patch as it is now used there to output empty namespace identify structs. - Fixed typo in Maxim's email address. v1 -> v2: - Rebased on top of qemu-nvme/next branch. - Incorporated feedback from Klaus and Alistair. - Dropped "Sim

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

2020-09-13 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 v3 07/15] hw/block/nvme: Add support for active/inactive namespaces

2020-09-13 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 v3 06/15] hw/block/nvme: Add support for Namespace Types

2020-09-13 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 v3 03/15] hw/block/nvme: Add Commands Supported and Effects log

2020-09-13 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 v3 02/15] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-13 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 v3 04/15] hw/block/nvme: Introduce the Namespace Types definitions

2020-09-13 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 v3 01/15] hw/block/nvme: Define 64 bit cqe.result

2020-09-13 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 v3 05/15] hw/block/nvme: Define trace events related to NS Types

2020-09-13 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

Re: [PATCH v7 03/25] block: Fixes nfs compiling error on msys2/mingw

2020-09-13 Thread Peter Lieven
> Am 10.09.2020 um 22:36 schrieb 罗勇刚(Yonggang Luo) : > >  > > >> On Fri, Sep 11, 2020 at 4:16 AM Peter Lieven wrote: >> >> >>> Am 10.09.2020 um 12:30 schrieb Yonggang Luo : >>> >>> These compiling errors are fixed: >>> ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory >

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 6:00 PM, 罗勇刚(Yonggang Luo) wrote: > > > On Sun, Sep 13, 2020 at 11:47 PM Philippe Mathieu-Daudé > mailto:phi...@redhat.com>> wrote: > > On 9/13/20 12:44 AM, Yonggang Luo wrote: > > These compiling errors are fixed: > > ../block/nfs.c:27:10: fatal error: poll.h: No such fil

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 6:01 PM, 罗勇刚(Yonggang Luo) wrote: > > > On Sun, Sep 13, 2020 at 11:35 PM Philippe Mathieu-Daudé > mailto:phi...@redhat.com>> wrote: > > On 9/13/20 12:44 AM, Yonggang Luo wrote: > > On windows, a difference in line endings causes testsuite failures > > complaining that ever

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

2020-09-13 Thread Yonggang Luo
On Mon, Sep 14, 2020 at 12:12 AM Paolo Bonzini wrote: > On 13/09/20 18:03, 罗勇刚(Yonggang Luo) wrote: > > > > _WIN32 are more precise and only depends on the compiler, on the > > other hand, CONFIG_POSIX and CONFIG_WIN32 need configure > > scripts. I prefer _WIN32 unless the compiler can not p

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

2020-09-13 Thread Yonggang Luo
On Sun, Sep 13, 2020 at 10:08 PM Paolo Bonzini wrote: > On 13/09/20 00:44, Yonggang Luo wrote: > > 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 > > We mig

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

2020-09-13 Thread Paolo Bonzini
On 13/09/20 17:51, Philippe Mathieu-Daudé wrote: >>> >> Yes, I'm not sure about the stub _in general_. I would prefer to either >> have the type available even on user-mode emulation, or remove the >> property altogether... I don't know, anything but not a property that >> aborts. :) > I plan to e

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

2020-09-13 Thread Paolo Bonzini
On 13/09/20 18:03, 罗勇刚(Yonggang Luo) wrote: > > _WIN32 are more precise and only depends on the compiler, on the > other hand, CONFIG_POSIX and CONFIG_WIN32 need configure > scripts. I prefer _WIN32 unless the compiler can not provide enough > information. That's not what the QEMU coding sta

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

2020-09-13 Thread Yonggang Luo
On Sun, Sep 13, 2020 at 10:08 PM Paolo Bonzini wrote: > On 13/09/20 00:44, Yonggang Luo wrote: > > 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 > > We mig

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

2020-09-13 Thread Yonggang Luo
On Sun, Sep 13, 2020 at 11:35 PM Philippe Mathieu-Daudé wrote: > On 9/13/20 12:44 AM, Yonggang Luo wrote: > > 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

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

2020-09-13 Thread Yonggang Luo
On Sun, Sep 13, 2020 at 11:47 PM Philippe Mathieu-Daudé wrote: > On 9/13/20 12:44 AM, Yonggang Luo wrote: > > These compiling errors are fixed: > > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory > >27 | #include > > | ^~~~ > > compilation terminated.

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 3:40 PM, Paolo Bonzini wrote: > On 13/09/20 13:31, Philippe Mathieu-Daudé wrote: >>> I'm not sure about the first. It's a bit ugly to have a property whose >>> getter aborts. >> This is (IIUC) the change Markus requested in v3 (see [*]). >> >> Commit description: "add a stub to satisfy

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 12:44 AM, Yonggang Luo wrote: > 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 | b

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 12:44 AM, Yonggang Luo wrote: > 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é Reviewed-by: Philippe Mathieu-Daudé > --- > tests/test-replication.c | 18 ++

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

2020-09-13 Thread Philippe Mathieu-Daudé
Please add here: "Do not declare the following locking functions on Win32:" On 9/13/20 12:44 AM, Yonggang Luo wrote: > 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, int

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 12:44 AM, Yonggang Luo wrote: > 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. Isn't '--strip-trailing-cr' more adapted? > > Signed-off-

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 12:44 AM, Yonggang Luo wrote: > On windows, if open file with "w", it's will automatically convert > "\n" to "\r\n" when writing to file. This is one change. > > Convert unlink to use g_remove. This is another (unrelated) change. We expect patches to be atomic (only one change at a

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/13/20 12:44 AM, Yonggang Luo wrote: > 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

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

2020-09-13 Thread Paolo Bonzini
On 13/09/20 00:44, Yonggang Luo wrote: > 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 We might actually get rid of ninjatool before QEMU 5.2 goes out, if we decid

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

2020-09-13 Thread Paolo Bonzini
On 13/09/20 13:31, Philippe Mathieu-Daudé wrote: >> I'm not sure about the first. It's a bit ugly to have a property whose >> getter aborts. > This is (IIUC) the change Markus requested in v3 (see [*]). > > Commit description: "add a stub to satisfy the linker." > > This stub should be never use

Re: [PATCH v2 5/7] qemu: Block migration when transient disk option is enabled

2020-09-13 Thread Masayoshi Mizuma
On Tue, Sep 08, 2020 at 03:17:47PM +0200, Peter Krempa wrote: > On Fri, Aug 28, 2020 at 10:08:35 -0400, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > Block migration when transient disk option is enabled because migration > > requires some blockjobs. > > > > Signed-off-by: Masayoshi

Re: [PATCH v2 4/7] qemu: Transient option gets avaiable for qcow2 and raw format disk

2020-09-13 Thread Masayoshi Mizuma
On Tue, Sep 08, 2020 at 03:14:42PM +0200, Peter Krempa wrote: > On Fri, Aug 28, 2020 at 10:08:33 -0400, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > Signed-off-by: Masayoshi Mizuma > > --- > > src/qemu/qemu_validate.c | 9 ++--- > > 1 file changed, 6 insertions(+), 3 deletions

Re: [PATCH] hw/block/nand: Decommission the NAND museum

2020-09-13 Thread Philippe Mathieu-Daudé
On 8/14/20 3:23 PM, Philippe Mathieu-Daudé wrote: > I forgot to Cc qemu-arm@, doing it now since most of the users > of this are ARM machines. The machine using this device are: - axis-dev88 - tosa (via tc6393xb_init) - spitz based (akita, borzoi, terrier) $ git grep nand_init hw/arm/spitz.c:223

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

2020-09-13 Thread Philippe Mathieu-Daudé
On 9/12/20 11:16 AM, Paolo Bonzini wrote: > 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 co