[PATCH v2] MAINTAINERS: Update my email address

2024-05-05 Thread Bin Meng
From: Bin Meng The old Wind River email address (bin.m...@windriver.com) is no longer available due to an internal infrastructure change within the company. While a new email address (bin.meng...@windriver.com) has been assigned to me, I am unable to find a way to send this patch directly from

[PATCH] MAINTAINERS: Update my email address

2024-04-12 Thread Bin Meng
The Wind River email address might change in the future. Use my personal email address instead. Signed-off-by: Bin Meng --- MAINTAINERS | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f1f6922025..50729a0985 100644 --- a/MAINTAINERS

Re: [PATCH 3/7] scripts/nsis.py: Automatically package required DLLs of QEMU executables

2024-02-25 Thread Bin Meng
On Mon, Feb 26, 2024 at 1:37 AM Stefan Weil wrote: > > Am 10.09.22 um 02:37 schrieb Bin Meng: > > On Sat, Sep 10, 2022 at 12:49 AM Mark Cave-Ayland > > wrote: > >> > >> On 08/09/2022 14:28, Bin Meng wrote: > >> > >>> From: Bin Meng &

[PATCH] util/cutil: Allow relocatable install with prefix /

2024-01-23 Thread Bin Meng
When configuring QEMU with --prefix=/, the generated QEMU executables can't be relocated to other directories. Add an additional test logic in starts_with_prefix() to handle this. Signed-off-by: Bin Meng --- util/cutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] hw/elf_ops: Ignore loadable segments with zero size

2024-01-16 Thread Bin Meng
. There is already a piece of codes inside the segment traversal loop that checks for zero-sized loadable segments for not creating empty ROM blobs. Let's move this check to the beginning of the loop to cover both scenarios. Signed-off-by: Bin Meng --- include/hw/elf_ops.h | 75

Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp

2024-01-15 Thread Bin Meng
On Mon, Jan 15, 2024 at 7:40 PM Alex Bennée wrote: > > Bin Meng writes: > > > The Arm dtb changes caused an address change: > > > > DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x0001) > > { > >

[PATCH 1/3] hw/arm: Refactor struct arm_boot_info::get_dtb()

2024-01-14 Thread Bin Meng
by ourselves. Signed-off-by: Bin Meng --- include/hw/arm/boot.h | 8 hw/arm/boot.c | 3 ++- hw/arm/sbsa-ref.c | 3 +-- hw/arm/virt.c | 4 +--- hw/arm/xlnx-versal-virt.c | 4 +--- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/include/hw

[PATCH 3/3] tests/acpi: Update virt/SSDT.memhp

2024-01-14 Thread Bin Meng
The Arm dtb changes caused an address change: DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x0001) { [ ... ] -Name (MEMA, 0x43C8) +Name (MEMA, 0x43D8) } Signed-off-by: Bin Meng --- tests/data/acpi/virt/SSDT.memhp | B

[PATCH 0/3] hw/arm: Pack the QEMU generated device tree

2024-01-14 Thread Bin Meng
By default, QEMU generates a 1 MiB sized device tree. This appears to be unnecessary, as the actual size is much smaller than what the DTB header claims. Let's pack it to save some room. Bin Meng (3): hw/arm: Refactor struct arm_boot_info::get_dtb() hw/arm: Pack the QEMU generated device

[PATCH 2/3] hw/arm: Pack the QEMU generated device tree

2024-01-14 Thread Bin Meng
By default QEMU generates a 1 MiB sized device tree. Let's pack it to save some room. Signed-off-by: Bin Meng --- hw/arm/boot.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index ff1173299f..511ec10ed0 100644 --- a/hw/arm/boot.c +++ b/hw/arm

Re: [PATCH] net/vmnet: Pad short Ethernet frames

2024-01-07 Thread Bin Meng
mon.m | 20 +--- > 1 file changed, 17 insertions(+), 3 deletions(-) > Reviewed-by: Bin Meng

[PATCH] docs/system/riscv: sifive_u: Update S-mode U-Boot image build instructions

2024-01-03 Thread Bin Meng
in the U-Boot source tree to edit the .config file, followed by a `make olddefconfig`. Validated with U-Boot v2024.01 release. Signed-off-by: Bin Meng --- docs/system/riscv/sifive_u.rst | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/docs

Re: [PATCH 1/1] Leaving Migration

2024-01-02 Thread Bin Meng
igned-off-by: Juan Quintela > --- > MAINTAINERS | 3 --- > .mailmap| 1 + > 2 files changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: Bin Meng

[PATCH] roms/opensbi: Upgrade from v1.3.1 to v1.4

2024-01-02 Thread Bin Meng
/timer: mtimer: only use regname for aclint bbd065d lib: sbi: Detect Zicntr extension only based on traps a2b255b include: Bump-up version to 1.4 Signed-off-by: Bin Meng --- Please pull the complete patch from https://github.com/lbmeng/qemu opensbi branch. .../opensbi-riscv32-generic

[PATCH for 8.2.1] hw/net: cadence_gem: Fix MDIO_OP_xxx values

2024-01-02 Thread Bin Meng
se FIELD to describe PHYMNTNC register fields") Reported-by: Heinrich Schuchardt Signed-off-by: Bin Meng --- hw/net/cadence_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 296bba238e..472ce9c8cf 100644 --- a/hw/net/

Re: [PATCH 1/1] MAINTAINERS: update mail address for Weiwei Li

2023-10-30 Thread Bin Meng
of luck on your new journey! Reviewed-by: Bin Meng

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 2/2] hw/char/riscv_htif: Fix the console syscall on big endian hosts

2023-07-21 Thread Bin Meng
port console output via proxy syscall") > Signed-off-by: Thomas Huth > --- > hw/char/riscv_htif.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH 1/2] hw/char/riscv_htif: Fix printing of console characters on big endian hosts

2023-07-21 Thread Bin Meng
h > --- > hw/char/riscv_htif.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Bin Meng

[PATCH] roms/opensbi: Upgrade from v1.3 to v1.3.1

2023-07-19 Thread Bin Meng
: Avoid out of bounds access 7828eeb gpio/desginware: add Synopsys DesignWare APB GPIO support c6a3573 lib: utils: Fix sbi_hartid_to_scratch() usage in ACLINT drivers 057eb10 lib: utils/gpio: Fix RV32 compile error for designware GPIO driver Signed-off-by: Bin Meng --- Please pull the complete patch

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Bin Meng
Hi Anup, On Thu, Jul 20, 2023 at 12:10 AM Anup Patel wrote: > > Hi Bin, > > On Wed, Jul 19, 2023 at 9:15 PM Bin Meng wrote: > > > > On Wed, Jul 19, 2023 at 11:22 PM Anup Patel wrote: > > > > > > On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis &

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Bin Meng
On Wed, Jul 19, 2023 at 11:22 PM Anup Patel wrote: > > On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis wrote: > > > > On Wed, Jul 19, 2023 at 3:39 PM Anup Patel wrote: > > > > > > On Wed, Jul 19, 2023 at 7:03 AM Alistair Francis > > > wrote: > > > > > > > > On Sat, Jul 15, 2023 at 7:14 PM

Re: [PATCH v4 0/6] net/tap: Fix QEMU frozen issue when the maximum number of file descriptors is very large

2023-07-09 Thread Bin Meng
On Wed, Jun 28, 2023 at 11:29 PM Bin Meng wrote: > > > Current codes using a brute-force traversal of all file descriptors > do not scale on a system where the maximum number of file descriptors > is set to a very large value (e.g.: in a Docker container of Manjaro > dist

Re: [PATCH v7 0/9] net: Pad short frames for network backends

2023-07-01 Thread Bin Meng
On Sun, Jun 25, 2023 at 9:59 AM Bin Meng wrote: > > The minimum Ethernet frame length is 60 bytes. For short frames with > smaller length like ARP packets (only 42 bytes), on a real world NIC > it can choose either padding its length to the minimum required 60 > bytes, or sending

[PATCH 1/2] roms/opensbi: Upgrade from v1.2 to v1.3

2023-06-30 Thread Bin Meng
: reset: Move fdt_reset_init into generic_early_init 8bd666a lib: sbi: check A2 register in ecall_dbcn_handler. 2552799 include: Bump-up version to 1.3 Signed-off-by: Bin Meng --- Please pull the complete patch from https://github.com/lbmeng/qemu opensbi branch. .../opensbi-riscv32-generic

[PATCH 2/2] tests/avocado: riscv: Enable 32-bit Spike OpenSBI boot testing

2023-06-30 Thread Bin Meng
The 32-bit Spike boot issue has been fixed in the OpenSBI v1.3. Let's enable the 32-bit Spike OpenSBI boot testing. Signed-off-by: Bin Meng --- tests/avocado/riscv_opensbi.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/avocado/riscv_opensbi.py b/tests/avocado/riscv_opensbi.py

Re: [PATCH v3 4/6] util/osdep: Introduce qemu_close_range()

2023-06-28 Thread Bin Meng
On 2023/6/19 17:22:53, "Markus Armbruster" wrote: Bin Meng writes: This introduces a new QEMU API qemu_close_range() that closes all open file descriptors from first to last (included). This API will try a more efficient call to close_range(), or walk through of /proc/self/f

[PATCH v4 5/6] util/async-teardown: Use qemu_close_range() to close fds

2023-06-28 Thread Bin Meng
From: Zhangjin Wu Based on the old close_all_open_fd() of util/async-teardown.c, a new generic qemu_close_range() has been added in osdep.c. Now, let's switch over to use the generic qemu_close_range(). Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng --- Changes in v4: - call sysconf

[PATCH v4 3/6] util/async-teardown: Fall back to close fds one by one

2023-06-28 Thread Bin Meng
When opening /proc/self/fd fails, current codes just return directly, but we can fall back to close fds one by one. Signed-off-by: Bin Meng --- - feel free to drop this patch if it does not make too much sense (no changes since v2) Changes in v2: - new patch: "util/async-teardown: Fall

[PATCH v4 4/6] util/osdep: Introduce qemu_close_range()

2023-06-28 Thread Bin Meng
-developed-by: Zhangjin Wu Signed-off-by: Bin Meng --- Changes in v4: - add 'first > last' check logic - reorder the ifdefs logic - change i to unsigned int type - use qemu_strtoi() instead of atoi() - limit last upper value to sysconf(_SC_OPEN_MAX) - 1 Changes in v3: - fix win32 build failure Chan

[PATCH v4 6/6] net: tap: Use qemu_close_range() to close fds

2023-06-28 Thread Bin Meng
is what qemu_close_range() does. Reported-by: Zhangjin Wu Co-developed-by: Bin Meng Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng Reviewed-by: Richard Henderson --- Changes in v4: - put fd on its own line Changes in v2: - Change to use qemu_close_range() to close fds for child process

[PATCH v4 0/6] net/tap: Fix QEMU frozen issue when the maximum number of file descriptors is very large

2023-06-28 Thread Bin Meng
quot; - Change to use qemu_close_range() to close fds for child process efficiently - v1 link: https://lore.kernel.org/qemu-devel/20230406112041.798585-1-bm...@tinylab.org/ Bin Meng (4): tests/tcg/cris: Fix the coding style tests/tcg/cris: Correct the off-by-one error util/async-teardown: Fall

[PATCH v4 1/6] tests/tcg/cris: Fix the coding style

2023-06-28 Thread Bin Meng
The code style does not conform with QEMU's. Correct it so that the upcoming commit does not trigger checkpatch warnings. Signed-off-by: Bin Meng Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- (no changes since v2) Changes in v2: - new patch: "tests/tcg/cris

[PATCH v4 2/6] tests/tcg/cris: Correct the off-by-one error

2023-06-28 Thread Bin Meng
sysconf(_SC_OPEN_MAX) returns the maximum number of files that a process can have open at any time, which means the fd should not be larger than or equal to the return value. Signed-off-by: Bin Meng Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- (no changes since v2

Re: [PATCH v3 4/6] util/osdep: Introduce qemu_close_range()

2023-06-28 Thread Bin Meng
On 2023/6/19 17:18:53, "Claudio Imbrenda" wrote: On Sat, 17 Jun 2023 13:36:19 +0800 Bin Meng wrote: This introduces a new QEMU API qemu_close_range() that closes all open file descriptors from first to last (included). This API will try a more efficient call to close_range(

Re: [PATCH v3 3/6] util/async-teardown: Fall back to close fds one by one

2023-06-25 Thread Bin Meng
On 2023/6/19 17:18:23, "Claudio Imbrenda" wrote: On Sat, 17 Jun 2023 13:36:18 +0800 Bin Meng wrote: When opening /proc/self/fd fails, current codes just return directly, but we can fall back to close fds one by one. Signed-off-by: Bin Meng --- (no changes since v2) Cha

[PATCH v7 1/9] hw/net: e1000: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. This actually reverts commit 78aeb23eded2d0b765bf9145c71f80025b568acd. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/e1000.c | 11 +-- 1 file

[PATCH v7 2/9] hw/net: vmxnet3: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. This actually reverts commit 40a87c6c9b11ef9c14e0301f76abf0eb2582f08e. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/vmxnet3.c | 10 -- 1 file

[PATCH v7 8/9] hw/net: sunhme: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/sunhme.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c

[PATCH v7 6/9] hw/net: rtl8139: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/rtl8139.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139

[PATCH v7 9/9] hw/net: ftgmac100: Drop the small packet check in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, the small packet check logic in the receive path is no longer needed. Suggested-by: Cédric Le Goater Signed-off-by: Bin Meng --- Changes in v7: - new patch: "hw/net: ftgmac100: Drop the small packet

[PATCH v7 4/9] hw/net: ne2000: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/ne2000.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c

[PATCH v7 5/9] hw/net: pcnet: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/pcnet.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index

[PATCH v7 0/9] net: Pad short frames for network backends

2023-06-24 Thread Bin Meng
[1] https://lore.kernel.org/qemu-devel/859cd26a-feb2-ed62-98d5-764841a46...@redhat.com/ Changes in v7: - new patch: "hw/net: ftgmac100: Drop the small packet check in the receive path" Bin Meng (9): hw/net: e1000: Remove the logic of padding short frames in the receive path hw

[PATCH v7 3/9] hw/net: i82596: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/i82596.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/hw/net/i82596.c b/hw/net

[PATCH v7 7/9] hw/net: sungem: Remove the logic of padding short frames in the receive path

2023-06-24 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/sungem.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/hw/net/sungem.c b/hw/net

[PATCH v3 5/6] util/async-teardown: Use qemu_close_range() to close fds

2023-06-16 Thread Bin Meng
From: Zhangjin Wu Based on the old close_all_open_fd() of util/async-teardown.c, a new generic qemu_close_range() has been added in osdep.c. Now, let's switch over to use the generic qemu_close_range(). Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng --- Changes in v3: - limit

[PATCH v3 0/6] net/tap: Fix QEMU frozen issue when the maximum number of file descriptors is very large

2023-06-16 Thread Bin Meng
u_close_range() to close fds" - Change to use qemu_close_range() to close fds for child process efficiently - v1 link: https://lore.kernel.org/qemu-devel/20230406112041.798585-1-bm...@tinylab.org/ Bin Meng (4): tests/tcg/cris: Fix the coding style tests/tcg/cris: Correct the off-by-one error util

[PATCH v3 4/6] util/osdep: Introduce qemu_close_range()

2023-06-16 Thread Bin Meng
-developed-by: Zhangjin Wu Signed-off-by: Bin Meng --- Changes in v3: - fix win32 build failure Changes in v2: - new patch: "util/osdep: Introduce qemu_close_range()" include/qemu/osdep.h | 1 + util/osdep.c | 48 2 files changed, 49

[PATCH v3 6/6] net: tap: Use qemu_close_range() to close fds

2023-06-16 Thread Bin Meng
is what qemu_close_range() does. Reported-by: Zhangjin Wu Co-developed-by: Bin Meng Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - Change to use qemu_close_range() to close fds for child process efficiently - v1 link: https://lore.kernel.org/qemu

[PATCH v3 3/6] util/async-teardown: Fall back to close fds one by one

2023-06-16 Thread Bin Meng
When opening /proc/self/fd fails, current codes just return directly, but we can fall back to close fds one by one. Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - new patch: "util/async-teardown: Fall back to close fds one by one" util/async-teardown.c | 6

[PATCH v3 2/6] tests/tcg/cris: Correct the off-by-one error

2023-06-16 Thread Bin Meng
sysconf(_SC_OPEN_MAX) returns the maximum number of files that a process can have open at any time, which means the fd should not be larger than or equal to the return value. Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - new patch: "tests/tcg/cris: Correct the off-b

[PATCH v3 1/6] tests/tcg/cris: Fix the coding style

2023-06-16 Thread Bin Meng
The code style does not conform with QEMU's. Correct it so that the upcoming commit does not trigger checkpatch warnings. Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - new patch: "tests/tcg/cris: Fix the coding style" tests/tcg/cris/libc/check_open

[PATCH v2 5/6] util/async-teardown: Use qemu_close_range() to close fds

2023-06-16 Thread Bin Meng
From: Zhangjin Wu Based on the old close_all_open_fd() of util/async-teardown.c, a new generic qemu_close_range() has been added in osdep.c. Now, let's switch over to use the generic qemu_close_range(). Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng --- (no changes since v1) util

[PATCH v2 6/6] net: tap: Use qemu_close_range() to close fds

2023-06-16 Thread Bin Meng
is what qemu_close_range() does. Reported-by: Zhangjin Wu Signed-off-by: Zhangjin Wu Signed-off-by: Bin Meng --- Changes in v2: - Change to use qemu_close_range() to close fds for child process efficiently - v1 link: https://lore.kernel.org/qemu-devel/20230406112041.798585-1-bm...@tinylab.org

[PATCH v2 0/6] net/tap: Fix QEMU frozen issue when the maximum number of file descriptors is very large

2023-06-16 Thread Bin Meng
qemu_close_range() does, a new API we add in utils/osdep.c. Changes in v2: - Change to use qemu_close_range() to close fds for child process efficiently - v1 link: https://lore.kernel.org/qemu-devel/20230406112041.798585-1-bm...@tinylab.org/ Bin Meng (4): tests/tcg/cris: Fix the coding style tests/tcg

[PATCH v2 1/6] tests/tcg/cris: Fix the coding style

2023-06-16 Thread Bin Meng
The code style does not conform with QEMU's. Correct it so that the upcoming commit does not trigger checkpatch warnings. Signed-off-by: Bin Meng --- (no changes since v1) tests/tcg/cris/libc/check_openpf5.c | 57 ++--- 1 file changed, 27 insertions(+), 30 deletions

[PATCH v2 3/6] util/async-teardown: Fall back to close fds one by one

2023-06-16 Thread Bin Meng
When opening /proc/self/fd fails, current codes just return directly, but we can fall back to close fds one by one. Signed-off-by: Bin Meng --- (no changes since v1) util/async-teardown.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/async-teardown.c b/util

[PATCH v2 2/6] tests/tcg/cris: Correct the off-by-one error

2023-06-16 Thread Bin Meng
sysconf(_SC_OPEN_MAX) returns the maximum number of files that a process can have open at any time, which means the fd should not be larger than or equal to the return value. Signed-off-by: Bin Meng --- (no changes since v1) tests/tcg/cris/libc/check_openpf5.c | 4 ++-- 1 file changed, 2

[PATCH v2 4/6] utils/osdep: Introduce qemu_close_range()

2023-06-16 Thread Bin Meng
-developed-by: Zhangjin Wu Signed-off-by: Bin Meng --- (no changes since v1) include/qemu/osdep.h | 1 + util/osdep.c | 47 2 files changed, 48 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index cc61b00ba9..e22434ce10

Re: [PATCH] ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed

2023-05-23 Thread Bin Meng
; -- Testing this patch with the "-device virtio-gpu-pci -display sdl,gl=on" command line, the assertion mentioned in https://gitlab.com/qemu-project/qemu/-/issues/1644 is fixed. Tested-by: Bin Meng Regards, Bin

Re: [PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Bin Meng
On Fri, Apr 21, 2023 at 12:44 PM Sunil V L wrote: > > On Fri, Apr 21, 2023 at 12:39:46PM +0800, Bin Meng wrote: > > On Fri, Apr 21, 2023 at 12:34 PM Sunil V L wrote: > > > > > > Currently, virt machine supports two pflash instances each with > > > 32MB si

Re: [PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Bin Meng
On Fri, Apr 21, 2023 at 12:34 PM Sunil V L wrote: > > Currently, virt machine supports two pflash instances each with > 32MB size. However, the first pflash is always assumed to > contain M-mode firmware and reset vector is set to this if > enabled. Hence, for S-mode payloads like EDK2, only one

[PATCH v2] target/riscv: Restore the predicate() NULL check behavior

2023-04-16 Thread Bin Meng
for an implemented CSR. Reported-by: Fei Wu Signed-off-by: Bin Meng Reviewed-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis Reviewed-by: LIU Zhiwei --- Changes in v2: - rebase on top of Alistair's riscv-to-apply.next tree target/riscv/csr.c | 11 +-- 1 file

[PATCH] target/riscv: Restore the predicate() NULL check behavior

2023-04-11 Thread Bin Meng
for an implemented CSR. Reported-by: Fei Wu Signed-off-by: Bin Meng --- target/riscv/csr.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index d522efc0b6..736ab64275 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -3797,6

Re: riscv: g_assert for NULL predicate?

2023-04-10 Thread Bin Meng
dicate() for un-allocated CSRs, then a buggy userspace application > > reads CSR such as 0x4 causes qemu to exit, I don't think it's expected. > > Hm That's not good. Userspace shouldn't be able to crash QEMU. I > think we want to revert that patch then. > > @B

Re: [PATCH] net: tap: Drop the close of fds for child process

2023-04-06 Thread Bin Meng
On Thu, Apr 6, 2023 at 8:34 PM Philippe Mathieu-Daudé wrote: > > On 6/4/23 13:20, Bin Meng wrote: > > Current codes using a brute-force traversal of all file descriptors > > do not scale on a system where the maximum number of file descriptors > > are set to a very large

[PATCH] net: tap: Drop the close of fds for child process

2023-04-06 Thread Bin Meng
-by: Zhangjin Wu Signed-off-by: Bin Meng --- net/tap.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/net/tap.c b/net/tap.c index 1bf085d422..49e1915484 100644 --- a/net/tap.c +++ b/net/tap.c @@ -446,13 +446,6 @@ static void launch_script(const char *setup_script, const char *ifname

Re: [PATCH v2 09/10] contrib/gitdm: add more individual contributors

2023-03-15 Thread Bin Meng
On 2023/3/11 2:03:31, "Alex Bennée" wrote: I'll only add names explicitly acked here. Let me know if you want contributions mapped to a company instead. Signed-off-by: Alex Bennée Cc: Bernhard Beschow Cc: Amarjargal Gundjalam Cc: Bin Meng Cc: Jason A. Donenfeld Cc: Strahinj

Re: [PATCH qemu v2] linux-user: Emulate /proc/cpuinfo output for riscv

2023-03-13 Thread Bin Meng
On Tue, Mar 14, 2023 at 4:29 AM ~abordado wrote: > > From: Afonso Bordado > > RISC-V does not expose all extensions via hwcaps, thus some userspace > applications may want to query these via /proc/cpuinfo. > > Currently when querying this file the host's file is shown instead > which is slightly

Re: [PATCH-for-8.0] gitlab-ci: Remove job building EDK2 firmware binaries

2023-03-13 Thread Bin Meng
On Mon, Mar 13, 2023 at 6:01 PM Philippe Mathieu-Daudé wrote: > > On 13/3/23 10:35, Bin Meng wrote: > > Hi Philippe, > > > > On Mon, Mar 13, 2023 at 4:51 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 13/3/23 03:09, Bin Meng wrote: > >>

Re: [PATCH-for-8.0] gitlab-ci: Remove job building EDK2 firmware binaries

2023-03-13 Thread Bin Meng
Hi Philippe, On Mon, Mar 13, 2023 at 4:51 PM Philippe Mathieu-Daudé wrote: > > On 13/3/23 03:09, Bin Meng wrote: > > On Fri, Mar 10, 2023 at 9:50 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 10/3/23 14:38, Peter Maydell wrote: > >>> On F

Re: [PATCH-for-8.0] gitlab-ci: Remove job building EDK2 firmware binaries

2023-03-12 Thread Bin Meng
On Fri, Mar 10, 2023 at 9:50 PM Philippe Mathieu-Daudé wrote: > > On 10/3/23 14:38, Peter Maydell wrote: > > On Fri, 10 Mar 2023 at 13:33, Philippe Mathieu-Daudé > > wrote: > >> > >> When we introduced this Gitlab-CI job in commit 71920809ce > >> ("gitlab-ci.yml: Add jobs to build EDK2 firmware

Re: [PATCH v5 00/16] hw/9pfs: Add 9pfs support for Windows

2023-03-06 Thread Bin Meng
On Mon, Mar 6, 2023 at 10:15 PM Christian Schoenebeck wrote: > > On Monday, February 20, 2023 11:07:59 AM CET Bin Meng wrote: > > At present there is no Windows support for 9p file system. > > This series adds initial Windows support for 9p file system. > > > > 'loc

Re: [PATCH v5 03/16] hw/9pfs: Replace the direct call to xxxdir() APIs with a wrapper

2023-03-06 Thread Bin Meng
On Mon, Mar 6, 2023 at 5:32 PM Philippe Mathieu-Daudé wrote: > > On 20/2/23 11:08, Bin Meng wrote: > > From: Guohuai Shi > > > > xxxdir() APIs are not safe on Windows host. For future extension to > > Windows, let's replace the direct call to xxxdir() APIs with

Re: [PATCH v5 00/16] hw/9pfs: Add 9pfs support for Windows

2023-03-05 Thread Bin Meng
On Mon, Feb 20, 2023 at 6:10 PM Bin Meng wrote: > > At present there is no Windows support for 9p file system. > This series adds initial Windows support for 9p file system. > > 'local' file system backend driver is supported on Windows, > including open, read, write, close, r

Re: [PATCH v2 1/2] gitlab/opensbi: Move to docker:stable

2023-03-03 Thread Bin Meng
RUN apt update \ > git \ > make \ > wget \ > + python3 \ nits: this should be inserted before wget to follow the alphabetical order > && \ > \ > rm -rf /var/lib/apt/lists/* > -- Reviewed-by: Bin Meng

Re: [PATCH v2 1/1] hw/riscv/virt.c: add cbo[mz]-block-size fdt properties

2023-03-02 Thread Bin Meng
ocksize in bytes for the Zicboz cache operations. > > [1] > https://lore.kernel.org/all/20230224162631.405473-1-ajo...@ventanamicro.com/ > > Cc: Andrew Jones > Signed-off-by: Anup Patel > Signed-off-by: Daniel Henrique Barboza > --- > hw/riscv/virt.c | 11 +++ > 1 file changed, 11 insertions(+) > Reviewed-by: Bin Meng

Re: [PATCH 0/4] RISCVCPUConfig related cleanups

2023-03-01 Thread Bin Meng
Hi Palmer, On Thu, Mar 2, 2023 at 10:08 AM Palmer Dabbelt wrote: > > On Fri, 24 Feb 2023 09:45:16 PST (-0800), dbarb...@ventanamicro.com wrote: > > Hi, > > > > These cleanups were suggested by LIU Zhiwei during the review of the > > RISCV_FEATURE_* cleanups, currently on version 7 [1]. > > > >

Re: [PATCH v2 05/18] target/riscv: gdbstub: Do not generate CSR XML if Zicsr is disabled

2023-03-01 Thread Bin Meng
On Thu, Mar 2, 2023 at 7:43 AM Palmer Dabbelt wrote: > > On Wed, 01 Mar 2023 01:55:34 PST (-0800), Bin Meng wrote: > > On Wed, Mar 1, 2023 at 5:52 PM LIU Zhiwei > > wrote: > >> > >> > >> On 2023/2/28 18:40, Bin Meng wrote: > >> > There

Re: [PATCH v6 0/8] net: Pad short frames for network backends

2023-03-01 Thread Bin Meng
Hi Cédric, On Wed, Mar 1, 2023 at 5:13 PM Cédric Le Goater wrote: > > Hello Bin, > > On 3/1/23 10:01, bmeng...@gmail.com wrote: > > From: Bin Meng > > > > The minimum Ethernet frame length is 60 bytes. For short frames with > > smaller length like ARP pack

Re: [PATCH v2 05/18] target/riscv: gdbstub: Do not generate CSR XML if Zicsr is disabled

2023-03-01 Thread Bin Meng
On Wed, Mar 1, 2023 at 5:52 PM LIU Zhiwei wrote: > > > On 2023/2/28 18:40, Bin Meng wrote: > > There is no need to generate the CSR XML if the Zicsr extension > > is not enabled. > > Should we generate the FPU XML or Vector XML when Zicsr is not enabled? Good point

[PATCH v2 16/18] target/riscv: Allow debugger to access sstc CSRs

2023-02-28 Thread Bin Meng
From: Bin Meng At present with a debugger attached sstc CSRs can only be accssed when CPU is in M-mode, or configured correctly. Fix it by adjusting their predicate() routine logic so that the static config check comes before the run-time check, as well as adding a debugger check. Signed-off

[PATCH v2 18/18] target/riscv: Group all predicate() routines together

2023-02-28 Thread Bin Meng
From: Bin Meng Move sstc()/sstc32() to where all predicate() routines live, and smstateen_acc_ok() to near {read,write}_xenvcfg(). Signed-off-by: Bin Meng Reviewed-by: Weiwei Li --- Changes in v2: - move smstateen_acc_ok() to near {read,write}_xenvcfg() target/riscv/csr.c | 177

[PATCH v2 12/18] target/riscv: gdbstub: Drop the vector CSRs in riscv-vector.xml

2023-02-28 Thread Bin Meng
From: Bin Meng It's worth noting that the vector CSR predicate() has a similar run-time check logic to the FPU CSR. With the previous patch our gdbstub can correctly report these vector CSRs via the CSR xml. Commit 719d3561b269 ("target/riscv: gdb: support vector registers for rv64 &a

[PATCH v2 17/18] target/riscv: Drop priv level check in mseccfg predicate()

2023-02-28 Thread Bin Meng
From: Bin Meng riscv_csrrw_check() already does the generic privilege level check hence there is no need to do the specific M-mode access check in the mseccfg predicate(). With this change debugger can access the mseccfg CSR anytime. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li

[PATCH v2 15/18] target/riscv: Allow debugger to access {h, s}stateen CSRs

2023-02-28 Thread Bin Meng
From: Bin Meng At present {h,s}stateen CSRs are not reported in the CSR XML hence gdb cannot access them. Fix it by adjusting their predicate() routine logic so that the static config check comes before the run-time check, as well as adding a debugger check. Signed-off-by: Bin Meng Reviewed

[PATCH v2 13/18] target/riscv: Allow debugger to access user timer and counter CSRs

2023-02-28 Thread Bin Meng
From: Bin Meng At present user timer and counter CSRs are not reported in the CSR XML hence gdb cannot access them. Fix it by adding a debugger check in their predicate() routine. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target

[PATCH v2 14/18] target/riscv: Allow debugger to access seed CSR

2023-02-28 Thread Bin Meng
From: Bin Meng At present seed CSR is not reported in the CSR XML hence gdb cannot access it. Fix it by adding a debugger check in its predicate() routine. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/csr.c | 4 1 file

[PATCH v2 09/18] target/riscv: Simplify getting RISCVCPU pointer from env

2023-02-28 Thread Bin Meng
Use env_archcpu() to get RISCVCPU pointer from env directly. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/csr.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/target

[PATCH v2 11/18] target/riscv: gdbstub: Turn on debugger mode before calling CSR predicate()

2023-02-28 Thread Bin Meng
a debugger. All we need to do is to turn on debugger mode before calling predicate(). Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/gdbstub.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/riscv/gdbstub.c b/ta

[PATCH v2 08/18] target/riscv: Simplify {read, write}_pmpcfg() a little bit

2023-02-28 Thread Bin Meng
Use the register index that has already been calculated in the pmpcfg_csr_{read,write} call. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/csr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target

[PATCH v2 07/18] target/riscv: Use 'bool' type for read_only

2023-02-28 Thread Bin Meng
The read_only variable is currently declared as an 'int', but it should really be a 'bool'. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv

[PATCH v2 10/18] target/riscv: Avoid reporting odd-numbered pmpcfgX in the CSR XML for RV64

2023-02-28 Thread Bin Meng
() routine, so that non-existent pmpcfgX won't be reported in the CSR XML for RV64. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- Changes in v2: - keep the 'RV128 restriction check' todo comment target/riscv/csr.c | 24 +--- 1 file changed, 9

[PATCH v2 06/18] target/riscv: Coding style fixes in csr.c

2023-02-28 Thread Bin Meng
Fix various places that violate QEMU coding style: - correct multi-line comment format - indent to opening parenthesis Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/csr.c | 62 -- 1

[PATCH v2 05/18] target/riscv: gdbstub: Do not generate CSR XML if Zicsr is disabled

2023-02-28 Thread Bin Meng
There is no need to generate the CSR XML if the Zicsr extension is not enabled. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/gdbstub.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/riscv

[PATCH v2 04/18] target/riscv: gdbstub: Minor change for better readability

2023-02-28 Thread Bin Meng
Use a variable 'base_reg' to represent cs->gdb_num_regs so that the call to ricsv_gen_dynamic_vector_xml() can be placed in one single line for better readability. Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/gdbstub.c

[PATCH v2 03/18] target/riscv: Use g_assert() for the predicate() NULL check

2023-02-28 Thread Bin Meng
software forgets to install the hook. Change to use g_assert() instead. Signed-off-by: Bin Meng --- Changes in v2: - new patch: Use assert() for the predicate() NULL check target/riscv/csr.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv

[PATCH v2 02/18] target/riscv: Add some comments to clarify the priority policy of riscv_csrrw_check()

2023-02-28 Thread Bin Meng
not agree with the commit message, that the predicate() check actually came after the read / write check. In fact this was intentional. Add some comments there so that people won't bother trying to change it without a solid reason. Signed-off-by: Bin Meng --- Changes in v2: - Keep the original prior

[PATCH v2 01/18] target/riscv: gdbstub: Check priv spec version before reporting CSR

2023-02-28 Thread Bin Meng
ration logic to fix this issue. Fixes: 7100fe6c2441 ("target/riscv: Enable privileged spec version 1.12") Signed-off-by: Bin Meng Reviewed-by: Weiwei Li Reviewed-by: LIU Zhiwei --- (no changes since v1) target/riscv/gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

  1   2   3   4   5   6   7   8   9   10   >