Re: [PATCH] hw/ufs: Fix incorrect register fields

2023-10-10 Thread Bin Meng
On Tue, Oct 10, 2023 at 1:11 PM Jeuk Kim wrote: > > From: Jeuk Kim > > This patch fixes invalid ufs register fields. > This fixes an issue reported by Bin Meng that > caused ufs to fail over riscv. > Fixes: bc4e68d362ec ("hw/ufs: Initial commit for emulated Universa

Re: [PATCH 10/20] hw/arm: Open-code pflash_cfi01_register()

2023-01-07 Thread Bin Meng
+++-- > hw/arm/mainstone.c | 13 - > hw/arm/omap_sx1.c| 22 ++ > hw/arm/versatilepb.c | 13 - > hw/arm/z2.c | 10 +++--- > 6 files changed, 59 insertions(+), 33 deletions(-) > Otherwise, Reviewed-by: Bin Meng

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-10-29 Thread Bin Meng
Hi Thomas, On Wed, Sep 21, 2022 at 8:24 PM Thomas Huth wrote: > > On 21/09/2022 14.18, Bin Meng wrote: > > Hi, > > > > On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > >> > >> At present packaging the required DLLs of QEMU executables is a > >>

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Bin Meng
On Thu, Oct 27, 2022 at 3:55 PM Kevin Wolf wrote: > > Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > > Hi Kevin, > > [...] > > Will you queue this patch via the block tree? > > Just to be sure, you mean only patch 5? Yes, I can do that. > Yes, only this one. Thank you. Regards, Bin

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-26 Thread Bin Meng
Hi Kevin, On Sat, Sep 24, 2022 at 9:19 AM Bin Meng wrote: > > Hi, > > On Wed, Sep 21, 2022 at 8:10 PM Meng, Bin wrote: > > > > -Original Message- > > From: Philippe Mathieu-Daudé On Behalf > > Of Philippe Mathieu-Daudé > > Sent: Sunday, S

[PATCH v4 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-10-19 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil Reviewed-by: Marc-André Lureau

Re: [PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-19 Thread Bin Meng
On Wed, Oct 19, 2022 at 12:00 AM Alex Bennée wrote: > > > Bin Meng writes: > > > Hi Alex, > > > > On Fri, Oct 7, 2022 at 1:31 PM Bin Meng wrote: > >> > >> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée wrote: > >> > > >> > >

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bin Meng
On Tue, Oct 18, 2022 at 3:46 PM Bernhard Beschow wrote: > > Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : > >On Sun, 16 Oct 2022, Bernhard Beschow wrote: > >> Allows e500 boards to have their root file system reside on flash using > >> only builtin devices located in the eLBC memory

Re: [PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-17 Thread Bin Meng
Hi Alex, On Fri, Oct 7, 2022 at 1:31 PM Bin Meng wrote: > > On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée wrote: > > > > > > Bin Meng writes: > > > > > In preparation to adding virtio-9p support on Windows, this series > > > enables running qt

Re: [PATCH v6 2/2] block: Refactor get_tmp_filename()

2022-10-16 Thread Bin Meng
On Mon, Oct 10, 2022 at 12:05 PM Bin Meng wrote: > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename

Re: [PATCH] tests/unit/test-image-locking: Fix handling of temporary files

2022-10-12 Thread Bin Meng
d, so that it clear where the temporary > files come from. > > Signed-off-by: Thomas Huth > --- > tests/unit/test-image-locking.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Fixes: aef96d7d4f0b ("tests: Add unit tests for image locking") Reviewed-by: Bin Meng

[PATCH v6 1/2] block: Ignore close() failure in get_tmp_filename()

2022-10-09 Thread Bin Meng
Armbruster Signed-off-by: Bin Meng Reviewed-by: Markus Armbruster --- (no changes since v5) Changes in v5: - new patch: "block: Ignore close() failure in get_tmp_filename()" block.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/block.c b/block.c index bc

[PATCH v6 2/2] block: Refactor get_tmp_filename()

2022-10-09 Thread Bin Meng
t /var/tmp is preferred over /tmp on non-win32 hosts. Signed-off-by: Bin Meng --- Changes in v6: - use g_mkstemp() and stick to use /var/tmp for non-win32 hosts Changes in v5: - minor change in the commit message - add some notes in the function comment block - add g_autofree for tmp_filename C

Re: [PATCH v2 09/13] hw/ppc/e500: Implement pflash handling

2022-10-08 Thread Bin Meng
t;, mmio_size); > +exit(1); > +} > + > +assert(QEMU_IS_ALIGNED(size, sector_len)); > + > +dev = qdev_new(TYPE_PFLASH_CFI01); > +qdev_prop_set_drive(dev, "drive", blk); > +qdev_prop_set_uint32(dev, "num-blocks", size / sector_len); > +qdev_prop_set_uint64(dev, "sector-length", sector_len); > +qdev_prop_set_uint8(dev, "width", 2); > +qdev_prop_set_bit(dev, "big-endian", true); > +qdev_prop_set_uint16(dev, "id0", 0x89); > +qdev_prop_set_uint16(dev, "id1", 0x18); > +qdev_prop_set_uint16(dev, "id2", 0x); > +qdev_prop_set_uint16(dev, "id3", 0x0); > +qdev_prop_set_string(dev, "name", "e500.flash"); > +s = SYS_BUS_DEVICE(dev); > +sysbus_realize_and_unref(s, _fatal); > + > +memory_region_add_subregion(>pbus_dev->mmio, 0, > +sysbus_mmio_get_region(s, 0)); > +} > + > /* > * Smart firmware defaults ahead! > * Otherwise LGTM: Reviewed-by: Bin Meng

Re: [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup

2022-10-08 Thread Bin Meng
On Sun, Oct 9, 2022 at 12:11 AM Bernhard Beschow wrote: > > Am 4. Oktober 2022 12:43:35 UTC schrieb Daniel Henrique Barboza > : > >Hey, > > > >On 10/3/22 18:27, Philippe Mathieu-Daudé wrote: > >> Hi Daniel, > >> > >> On 3/10/22 22:31, Bernhard Beschow wrote: > >>> Cover letter: > >>>

Re: [PATCH v2 06/13] hw/ppc/mpc8544ds: Add platform bus

2022-10-08 Thread Bin Meng
gt; hw/ppc/mpc8544ds.c | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Bin Meng

Re: [PATCH 04/11] hw/ppc/mpc8544ds: Add platform bus

2022-10-08 Thread Bin Meng
Hi Bernhard, On Sat, Sep 17, 2022 at 1:19 AM Bernhard Beschow wrote: > > Am 16. September 2022 06:15:53 UTC schrieb Bin Meng : > >On Thu, Sep 15, 2022 at 11:29 PM Bernhard Beschow wrote: > >> > >> Models the real device more closely. > > > >Pleas

Re: [PATCH v2 05/13] hw/ppc/mpc8544ds: Rename wrongly named method

2022-10-08 Thread Bin Meng
On Tue, Oct 4, 2022 at 5:15 AM Bernhard Beschow wrote: > > Signed-off-by: Bernhard Beschow > --- > hw/ppc/mpc8544ds.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v2 04/13] hw/ppc/e500: Reduce usage of sysbus API

2022-10-08 Thread Bin Meng
w/ppc/e500.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng

Re: [PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-06 Thread Bin Meng
On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée wrote: > > > Bin Meng writes: > > > In preparation to adding virtio-9p support on Windows, this series > > enables running qtest on Windows, so that we can run the virtio-9p > > tests on Windows to make sure it does not b

[PATCH v5 05/18] block/vvfat: Unify the mkdir() call

2022-10-06 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau

[PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-06 Thread Bin Meng
timeout limit to 90 minutes - new patch: "tests/qtest: Enable qtest build on Windows" Bin Meng (15): semihosting/arm-compat-semi: Avoid using hardcoded /tmp tcg: Avoid using hardcoded /tmp util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files tests/qtes

Re: [PATCH 00/18] tests/qtest: Enable running qtest on Windows

2022-10-06 Thread Bin Meng
On Thu, Oct 6, 2022 at 11:11 PM Bin Meng wrote: > > In preparation to adding virtio-9p support on Windows, this series > enables running qtest on Windows, so that we can run the virtio-9p > tests on Windows to make sure it does not break accidently. > > Changes in v5: > -

[PATCH 05/18] block/vvfat: Unify the mkdir() call

2022-10-06 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau

[PATCH 00/18] tests/qtest: Enable running qtest on Windows

2022-10-06 Thread Bin Meng
timeout limit to 90 minutes - new patch: "tests/qtest: Enable qtest build on Windows" Bin Meng (15): semihosting/arm-compat-semi: Avoid using hardcoded /tmp tcg: Avoid using hardcoded /tmp util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files tests/qtes

Re: [PATCH v4 00/54] tests/qtest: Enable running qtest on Windows

2022-10-03 Thread Bin Meng
Hi Marc-André, On Mon, Oct 3, 2022 at 5:26 PM Marc-André Lureau wrote: > > Hi Bin > > On Tue, Sep 27, 2022 at 3:18 PM Bin Meng wrote: >> >> In preparation to adding virtio-9p support on Windows, this series >> enables running qtest on Windows, so that we

Re: [PATCH v5 2/2] block: Refactor get_tmp_filename()

2022-10-02 Thread Bin Meng
Hi Kevin, On Fri, Sep 30, 2022 at 6:13 PM Kevin Wolf wrote: > > Am 28.09.2022 um 16:41 hat Bin Meng geschrieben: > > From: Bin Meng > > > > At present there are two callers of get_tmp_filename() and they are > > inconsistent. > > > > One does: > >

Re: [PATCH v4 25/54] block/vvfat: Unify the mkdir() call

2022-09-30 Thread Bin Meng
Hi Kevin, On Tue, Sep 27, 2022 at 7:07 PM Bin Meng wrote: > > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir() API and we can use it

[PATCH v5 2/2] block: Refactor get_tmp_filename()

2022-09-28 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1

[PATCH v5 1/2] block: Ignore close() failure in get_tmp_filename()

2022-09-28 Thread Bin Meng
From: Bin Meng The temporary file has been created and is ready for use. Checking return value of close() does not seem useful. The file descriptor is almost certainly closed; see close(2) under "Dealing with error returns from close()". Let's simply ignore close() failure here.

[PATCH v4] block: Refactor get_tmp_filename()

2022-09-27 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1

[PATCH v4 40/54] tests/qtest: ide-test: Open file in binary mode

2022-09-27 Thread Bin Meng
, but is allowed for ISO C standard conformance. Let's add the letter 'b' which works on both POSIX and Windows. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v2) Changes in v2: - Drop ahci-test.c changes that are no longer needed

[PATCH v4 37/54] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-27 Thread Bin Meng
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Reviewed-

[PATCH v4 13/54] tests/qtest: ide-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v3) Changes in v3: - Split to a separate patch tests/qtest

[PATCH v4 19/54] tests/qtest: virtio-blk-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v3) Changes in v3: - Split to a separate patch tests/qtest

[PATCH v4 25/54] block/vvfat: Unify the mkdir() call

2022-09-27 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau

[PATCH v4 00/54] tests/qtest: Enable running qtest on Windows

2022-09-27 Thread Bin Meng
patch: "qga/commands-posix-ssh: Use g_mkdir_with_parents()" - Drop patch: "tests: Skip iotests and qtest when '--without-default-devices'" - Drop patch: "tests/qtest: Fix ERROR_SHARING_VIOLATION for win32" Bin Meng (48): tests/qtest: i440fx-test: Rewrite create_blob_fi

[PATCH v4 09/54] tests/qtest: fdc-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v3) Changes in v3: - Split to a separate patch tests/qtest

[PATCH v4 05/54] tests/qtest: ahci-test: Avoid using hardcoded /tmp

2022-09-27 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- (no changes since v3) Changes in v3: - Split to a separate patch - Ensure g_autofree

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-27 Thread Bin Meng
Hi Markus, On Tue, Sep 27, 2022 at 2:22 PM Markus Armbruster wrote: > > Bin Meng writes: > > > On Mon, Sep 26, 2022 at 6:13 PM Markus Armbruster wrote: > >> > >> Bin Meng writes: > >> > >> > From: Bin Meng > >>

Re: [PATCH v3 37/54] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-26 Thread Bin Meng
Hi Thomas, On Tue, Sep 27, 2022 at 12:20 AM Thomas Huth wrote: > > On 25/09/2022 13.30, Bin Meng wrote: > > From: Bin Meng > > > > These test cases uses "blkdebug:path/to/config:path/to/image" for > > testing. On Windows, absolute file paths co

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-26 Thread Bin Meng
On Mon, Sep 26, 2022 at 6:13 PM Markus Armbruster wrote: > > Bin Meng writes: > > > From: Bin Meng > > > > At present there are two callers of get_tmp_filename() and they are > > inconsistent. > > > > One does: > > > > /* TODO:

[PATCH v3 40/54] tests/qtest: ide-test: Open file in binary mode

2022-09-25 Thread Bin Meng
, but is allowed for ISO C standard conformance. Let's add the letter 'b' which works on both POSIX and Windows. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v2) Changes in v2: - Drop ahci-test.c changes that are no longer needed

[PATCH v3 37/54] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-25 Thread Bin Meng
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no cha

[PATCH v3 25/54] block/vvfat: Unify the mkdir() call

2022-09-25 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau

[PATCH v3 19/54] tests/qtest: virtio-blk-test: Avoid using hardcoded /tmp

2022-09-25 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch tests/qtest/virtio-blk-test.c | 4 ++-- 1 file changed, 2

[PATCH v3 13/54] tests/qtest: ide-test: Avoid using hardcoded /tmp

2022-09-25 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch tests/qtest/ide-test.c | 10 ++ 1 file changed, 6

[PATCH v3 05/54] tests/qtest: ahci-test: Avoid using hardcoded /tmp

2022-09-25 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch - Ensure g_autofree variable is initialized tests/qtest/ahci-test.c

[PATCH v3 00/54] tests/qtest: Enable running qtest on Windows

2022-09-25 Thread Bin Meng
tests and qtest when '--without-default-devices'" - Drop patch: "tests/qtest: Fix ERROR_SHARING_VIOLATION for win32" Bin Meng (47): tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable semihosting/arm-compat-semi: Avoid using hardcoded /tmp tcg: Avoid using hardc

[PATCH v3 09/54] tests/qtest: fdc-test: Avoid using hardcoded /tmp

2022-09-25 Thread Bin Meng
From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch tests/qtest/fdc-test.c | 5 +++-- 1 file changed, 3 insertions

[PATCH v3] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1

[PATCH v2] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1

Re: [PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-24 Thread Bin Meng
On Fri, Sep 23, 2022 at 3:39 AM Marc-André Lureau wrote: > > Hi > > On Tue, Sep 20, 2022 at 2:17 PM Bin Meng wrote: >> >> From: Bin Meng >> >> At present get_tmp_filename() has platform specific implementations >> to get the directory to u

[PATCH] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-09-23 Thread Bin Meng
Hi, On Wed, Sep 21, 2022 at 8:10 PM Meng, Bin wrote: > > -Original Message- > From: Philippe Mathieu-Daudé On Behalf Of > Philippe Mathieu-Daudé > Sent: Sunday, September 18, 2022 5:32 AM > To: Bin Meng ; qemu-de...@nongnu.org > Cc: Meng, Bin ; Hanna Reitz ;

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-22 Thread Bin Meng
Hi Stefan, On Wed, Sep 21, 2022 at 8:24 PM Thomas Huth wrote: > > On 21/09/2022 14.18, Bin Meng wrote: > > Hi, > > > > On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > >> > >> At present packaging the required DLLs of QEMU executables is a > >>

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-21 Thread Bin Meng
Hi, On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > > At present packaging the required DLLs of QEMU executables is a > manual process, and error prone. > > Improve scripts/nsis.py by adding a logic to automatically package > required DLLs of QEMU executables. > > 'm

[PATCH v2 23/39] tests/qtest: ide-test: Open file in binary mode

2022-09-20 Thread Bin Meng
, but is allowed for ISO C standard conformance. Let's add the letter 'b' which works on both POSIX and Windows. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v2: - Drop ahci-test.c changes that are no longer needed tests/qtest/ide-test.c | 4

[PATCH v2 20/39] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-20 Thread Bin Meng
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng --- (no changes since v1) tests/qtest/a

[PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-20 Thread Bin Meng
From: Bin Meng Lots of test cases were written to use hardcoded /tmp directory for temporary files. To avoid this, we update them to use g_dir_make_tmp() or g_file_open_tmp() when appropriate. Signed-off-by: Bin Meng --- Changes in v2: - Use g_dir_make_tmp(), g_file_open_tmp() when

[PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-20 Thread Bin Meng
From: Bin Meng At present get_tmp_filename() has platform specific implementations to get the directory to use for temporary files. Switch over to use g_get_tmp_dir() which works on all supported platforms. Signed-off-by: Bin Meng --- (no changes since v1) block.c | 16 ++-- 1

[PATCH v2 00/39] tests/qtest: Enable running qtest on Windows

2022-09-20 Thread Bin Meng
were already applied in the mainline - Drop patch: "qga/commands-posix-ssh: Use g_mkdir_with_parents()" - Drop patch: "tests: Skip iotests and qtest when '--without-default-devices'" - Drop patch: "tests/qtest: Fix ERROR_SHARING_VIOLATION for win32" Bin

[PATCH v2 08/39] block/vvfat: Unify the mkdir() call

2022-09-20 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng --- Changes in v2: - Change

Re: [PATCH 00/11] ppc/e500: Add support for two types of flash, cleanup

2022-09-16 Thread Bin Meng
Hi Bernhard, On Thu, Sep 15, 2022 at 11:25 PM Bernhard Beschow wrote: > > This series adds support for -pflash and direct SD card access to the > PPC e500 boards. The idea is to increase compatibility with "real" firmware > images where only the bare minimum of drivers is compiled in. > > The

Re: [PATCH 11/11] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-09-16 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:30 PM Bernhard Beschow wrote: > > Adds missing functionality to emulated e500 SOCs which increases the > chance of given "real" firmware images to access SD cards. By "firmware" do you mean U-Boot? > > Signed-off-by: Bernhard Beschow > --- >

Re: [PATCH 10/11] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-09-16 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:30 PM Bernhard Beschow wrote: > > Will allow e500 boards to access SD cards using just their own devices. > > Signed-off-by: Bernhard Beschow > --- > hw/sd/sdhci.c | 147 +- > include/hw/sd/sdhci.h | 3 + > 2 files

Re: [PATCH 07/11] hw/ppc/e500: Implement pflash handling

2022-09-16 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:36 PM Bernhard Beschow wrote: > > Allows e500 boards to have their root file system reside on flash using > only builtin devices. > > Note that the flash memory area is only created when a -pflash argument is > given, and that the size is determined by the given file.

Re: [PATCH 09/11] hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*

2022-09-16 Thread Bin Meng
CTRL_4BITBUS; > } > > /* > @@ -1768,11 +1768,11 @@ usdhc_write(void *opaque, hwaddr offset, uint64_t > val, unsigned size) > sdhci_write(opaque, offset, value, size); > break; > > -case ESDHC_MIX_CTRL: > +case USDHC_MIX_CTRL: > /* > * So, when SD/MMC stack in Linux tries to write to "Transfer > * Mode Register", ESDHC i.MX quirk code will translate it Here I assume ESDHC i.MX means the Linux eSDHC driver for i.MX, so no need to replace ESDHC with USDHC? > - * into a write to ESDHC_MIX_CTRL, so we do the opposite in > + * into a write to USDHC_MIX_CTRL, so we do the opposite in > * order to get where we started > * > * Note that Auto CMD23 Enable bit is located in a wrong place > -- Overall LGTM: Reviewed-by: Bin Meng

Re: [PATCH 08/11] hw/sd/sdhci-internal: Unexport ESDHC defines

2022-09-16 Thread Bin Meng
++ > 2 files changed, 19 insertions(+), 20 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 06/11] hw/block/pflash_cfi01: Error out if device length isn't a power of two

2022-09-16 Thread Bin Meng
nged, 6 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 04/11] hw/ppc/mpc8544ds: Add platform bus

2022-09-16 Thread Bin Meng
On Thu, Sep 15, 2022 at 11:29 PM Bernhard Beschow wrote: > > Models the real device more closely. Please describe the source (e.g.: I assume it's MPC8544DS board manual or something like that?) that describe such memory map for the platform bus. Is this the eLBC bus range that includes the NOR

Re: [PATCH 05/11] hw/ppc/e500: Remove if statement which is now always true

2022-09-16 Thread Bin Meng
.h | 1 - > hw/ppc/e500plat.c | 1 - > hw/ppc/mpc8544ds.c | 1 - > 4 files changed, 14 insertions(+), 19 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 03/11] docs/system/ppc/ppce500: Add heading for networking chapter

2022-09-15 Thread Bin Meng
-- > docs/system/ppc/ppce500.rst | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Bin Meng

Re: [PATCH 02/11] hw/gpio/meson: Introduce dedicated config switch for hw/gpio/mpc8xxx

2022-09-15 Thread Bin Meng
files changed, 5 insertions(+), 1 deletion(-) > Reviewed-by: Bin Meng

Re: [PATCH 01/11] hw/ppc/meson: Allow e500 boards to be enabled separately

2022-09-15 Thread Bin Meng
| 8 > hw/ppc/meson.build | 6 ++ > 3 files changed, 12 insertions(+), 5 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-15 Thread Bin Meng
On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > > At present packaging the required DLLs of QEMU executables is a > manual process, and error prone. > > Improve scripts/nsis.py by adding a logic to automatically package > required DLLs of QEMU executables. > > 'm

[PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-09-08 Thread Bin Meng
From: Bin Meng libnfs.h declares nfs_fstat() as the following for win32: int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct __stat64 *st); The 'st' parameter should be of type 'struct __stat64'. The codes happen to build successfully for 64-bit Windows

[PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-08 Thread Bin Meng
. Update CI to test the installer generation on Windows too. During testing a 32-bit build issue was exposed in block/nfs.c and the fix is included in this series. Bin Meng (7): scripts/nsis.py: Drop the unnecessary path separator scripts/nsis.py: Fix destination directory name when invoked

Re: [PATCH 33/51] tests/qtest: {ahci, ide}-test: Use relative path for temporary files

2022-09-03 Thread Bin Meng
On Thu, Sep 1, 2022 at 4:58 PM Marc-André Lureau wrote: > > > > On Wed, Aug 24, 2022 at 2:55 PM Bin Meng wrote: >> >> From: Bin Meng >> >> These test cases uses "blkdebug:path/to/config:path/to/image" for >> testing. On Windows, absolute

Re: [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:04 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > When QEMU is configured with '--without-default-devices', we should > > not build and run iotests and qtest because devices used by thes

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Sep 1, 2022 at 4:42 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 24, 2022 at 2:03 PM Bin Meng wrote: >> >> From: Bin Meng >> >> On Windows, the MinGW provided mkstemp() API opens the file with >> exclusive access, denying other processe

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:06 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > On Windows, the MinGW provided mkstemp() API opens the file with > > exclusive access, denying other processes to read/write the file. >

Re: [PATCH 03/51] block: Unify the get_tmp_filename() implementation

2022-09-01 Thread Bin Meng
Hi Marc-André, On Wed, Aug 31, 2022 at 8:54 PM Marc-André Lureau wrote: > > Hi Bin > > On Wed, Aug 24, 2022 at 1:42 PM Bin Meng wrote: >> >> From: Bin Meng >> >> At present get_tmp_filename() has platform specific implementations >> to get the directo

[PATCH 33/51] tests/qtest: {ahci, ide}-test: Use relative path for temporary files

2022-08-24 Thread Bin Meng
From: Bin Meng These test cases uses "blkdebug:path/to/config:path/to/image" for testing. On Windows, absolute file paths contain the delimiter ':' which causes the blkdebug filename parser fail to parse filenames. Signed-off-by: Bin Meng --- tests/qtest/ahci-t

[PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-08-24 Thread Bin Meng
From: Bin Meng On Windows, the MinGW provided mkstemp() API opens the file with exclusive access, denying other processes to read/write the file. Such behavior prevents the QEMU executable from opening the file, (e.g.: CreateFile returns ERROR_SHARING_VIOLATION). This can be fixed by closing

[PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'

2022-08-24 Thread Bin Meng
From: Bin Meng When QEMU is configured with '--without-default-devices', we should not build and run iotests and qtest because devices used by these test cases are not built in. Signed-off-by: Bin Meng --- tests/qemu-iotests/meson.build | 5 + tests/qtest/meson.build| 5 + 2

[PATCH 38/51] tests/qtest: {ahci,ide}-test: Open file in binary mode

2022-08-24 Thread Bin Meng
, but is allowed for ISO C standard conformance. Let's add the letter 'b' which works on both POSIX and Windows. Similar situation applies to the open() 'flags' where O_BINARY is used for binary mode. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- tests/qtest/ahci-test.c | 2 +- tests

[PATCH 08/51] block/vvfat: Unify the mkdir() call

2022-08-24 Thread Bin Meng
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir_with_parents() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng --- block/vvfat.c

[PATCH 03/51] block: Unify the get_tmp_filename() implementation

2022-08-24 Thread Bin Meng
From: Bin Meng At present get_tmp_filename() has platform specific implementations to get the directory to use for temporary files. Switch over to use g_get_tmp_dir() which works on all supported platforms. Signed-off-by: Bin Meng --- block.c | 16 ++-- 1 file changed, 2

[PATCH 00/51] tests/qtest: Enable running qtest on Windows

2022-08-24 Thread Bin Meng
on Windows. Patch 51 documents best practices of writing portable test cases as we learned during the enablement of running qtest on Windows. Based-on: <20220802075200.907360-1-bmeng...@gmail.com> Bin Meng (41): tests/qtest: Use g_setenv() tests/qtest: Use g_mkdtemp() block:

[PATCH 07/51] tests: Avoid using hardcoded /tmp in test cases

2022-08-24 Thread Bin Meng
From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng --- tests/qtest/fuzz/generic_fuzz_configs.h | 6 -- tests/qtest/ahci-test.c | 15 +++ tests/qtest/aspeed_smc-test.c | 4 +++- tests/qtest

[PATCH 02/51] tests/qtest: Use g_mkdtemp()

2022-08-24 Thread Bin Meng
From: Bin Meng Windows does not provide a mkdtemp() API, but glib does. Replace mkdtemp() call with the glib version. Signed-off-by: Bin Meng --- tests/qtest/fuzz/generic_fuzz_configs.h | 2 +- tests/qtest/cdrom-test.c| 2 +- tests/qtest/cxl-test.c | 6

[PATCH v3 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-08-24 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil Reviewed-by: Marc-André Lureau

[PATCH v2 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-09 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil --- Changes in v2: - change 'count

Re: [PATCH 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-09 Thread Bin Meng
On Fri, Aug 5, 2022 at 11:09 PM Stefan Weil wrote: > > Am 05.08.22 um 16:56 schrieb Bin Meng: > > > From: Bin Meng > > > > WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS > > object handles. Correct the event array size in aio_poll() and >

[PATCH 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-05 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng --- util/aio-win32.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH] hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01

2022-05-09 Thread Bin Meng
case 23:/* CMD23: SET_BLOCK_COUNT */ > if (sd->spec_version < SD_PHY_SPECv3_01_VERS) { > -break; > + goto bad_cmd; > } > switch (sd->state) { > case sd_transfer_state: > -- Reviewed-by: Bin Meng

Re: [PATCH] hw/sd: sdhci: Enable 64-bit system bus capability in the default SD/MMC host controller

2021-07-05 Thread Bin Meng
esents the BUS64BIT SDHC_CAPAB field. > > Signed-off-by: Joanne Koong > --- > hw/sd/sdhci-internal.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 3/3] hw/sd: Check for valid address range in SEND_WRITE_PROT (CMD30)

2021-07-05 Thread Bin Meng
by: Philippe Mathieu-Daudé > --- > hw/sd/sd.c | 5 +++ > tests/qtest/fuzz-sdcard-test.c | 66 ++ > MAINTAINERS| 3 +- > tests/qtest/meson.build | 1 + > 4 files changed, 74 insertions(+), 1 deletion(-) > create mode 100644 tests/qtest/fuzz-sdcard-test.c > Reviewed-by: Bin Meng

Re: [RFC PATCH 06/10] hw/sd: Add sd_cmd_unimplemented() handler

2021-06-25 Thread Bin Meng
On Sat, Jun 26, 2021 at 1:17 AM Philippe Mathieu-Daudé wrote: > > On 6/25/21 3:49 PM, Bin Meng wrote: > > On Thu, Jun 24, 2021 at 10:28 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Signed-off-by: Philippe Mathieu-Daudé > >> --- > >> hw/s

  1   2   3   4   >