Re: [Qemu-devel] u-boot on qemu-x86

2015-05-24 Thread Bin Meng
Hi Saket, On Tue, May 5, 2015 at 10:11 PM, Saket Sinha wrote: > Hi, > > I am trying to run u-boot as a coreboot payload on qemu-x86.Currently > facing some difficulty in the process. > > Has anyone tried running u-boot bare-metal or as a coreboot payload on > qemu-x86 before? > Reply this threa

Re: [PATCH] chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor

2022-11-19 Thread Bin Meng
On Fri, Nov 11, 2022 at 8:11 AM Bin Meng wrote: > > On Wed, Oct 26, 2022 at 3:39 PM Marc-André Lureau > wrote: > > > > On Tue, Oct 25, 2022 at 6:15 PM Bin Meng wrote: > > > > > > At present when pressing Ctrl+C from a guest running on QEMU Windows > >

Re: [PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-19 Thread Bin Meng
Hi Greg, On Sat, Nov 19, 2022 at 6:20 PM Greg Kurz wrote: > > On Fri, 18 Nov 2022 14:38:00 +0100 > Christian Schoenebeck wrote: > > > On Friday, November 18, 2022 10:29:51 AM CET Greg Kurz wrote: > > > On Fri, 11 Nov 2022 12:22:11 +0800 > > > Bin Meng

[PATCH] target/riscv: Dump sstatus CSR in riscv_cpu_dump_state()

2022-11-22 Thread Bin Meng
sstatus register dump is currently missing in riscv_cpu_dump_state(). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1332 Signed-off-by: Bin Meng --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index d14e95c9dc

Re: [PATCH] target/riscv: Dump sstatus CSR in riscv_cpu_dump_state()

2022-11-22 Thread Bin Meng
Hi Alistair, On Wed, Nov 23, 2022 at 8:03 AM Alistair Francis wrote: > > On Wed, Nov 23, 2022 at 2:07 AM Bin Meng wrote: > > > > sstatus register dump is currently missing in riscv_cpu_dump_state(). > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/13

Re: [PATCH] target/riscv: Dump sstatus CSR in riscv_cpu_dump_state()

2022-11-24 Thread Bin Meng
On Fri, Nov 25, 2022 at 7:58 AM Alistair Francis wrote: > > On Wed, Nov 23, 2022 at 2:07 PM Bin Meng wrote: > > > > Hi Alistair, > > > > On Wed, Nov 23, 2022 at 8:03 AM Alistair Francis > > wrote: > > > > > > On Wed, Nov 23, 2022 at 2:0

[PATCH v2] target/riscv: Add some comments for sstatus CSR in riscv_cpu_dump_state()

2022-11-24 Thread Bin Meng
sstatus register dump is currently missing in riscv_cpu_dump_state(). As sstatus is a copy of mstatus, which is described in the priv spec, it seems redundant to print the same information twice. Add some comments for this to let people know this is intentional. Signed-off-by: Bin Meng

Re: [PATCH v6 11/11] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
Hi Marc-André, On Wed, Nov 23, 2022 at 10:14 PM Marc-André Lureau wrote: > > Hi Bin > > On Fri, Oct 28, 2022 at 9:06 AM Bin Meng wrote: > > > > Now that we have fixed various test case issues as seen when running > > on Windows, let's enable the qtest buil

[PATCH 1/4] .gitlab-ci.d/windows.yml: Unify the prerequisite packages

2022-11-25 Thread Bin Meng
From: Bin Meng At present the prerequisite packages for 64-bit and 32-bit builds are slightly different. Let's use the same packages for both for easier maintenance in the future. Signed-off-by: Bin Meng --- .gitlab-ci.d/windows.yml | 12 +++- 1 file changed, 11 insertions(

[PATCH 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Bin Meng
From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- .gitlab-ci.d/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at least for now. Signed-o

[PATCH 4/4] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/

Re: [PATCH 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
On Fri, Nov 25, 2022 at 6:56 PM Thomas Huth wrote: > > On 25/11/2022 11.49, Bin Meng wrote: > > From: Bin Meng > > > > At present the build scripts of 32-bit and 64-bit are inconsistent. > > Let's keep them consistent for easier maintenance. > > &g

[PATCH v2 2/4] .gitlab-ci.d/windows.yml: Keep 64-bit and 32-bit build scripts consistent

2022-11-25 Thread Bin Meng
From: Bin Meng At present the build scripts of 32-bit and 64-bit are inconsistent. Let's keep them consistent for easier maintenance. While we are here, add some comments to explain that for the 64-bit job, "--without-default-devices" is a must have, at least for now. Signed-o

[PATCH v2 4/4] tests/qtest: Enable qtest build on Windows

2022-11-25 Thread Bin Meng
From: Bin Meng Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- (no changes since v1) tests/qtest/meson.build | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH v2 1/4] .gitlab-ci.d/windows.yml: Unify the prerequisite packages

2022-11-25 Thread Bin Meng
From: Bin Meng At present the prerequisite packages for 64-bit and 32-bit builds are slightly different. Let's use the same packages for both for easier maintenance in the future. Signed-off-by: Bin Meng --- (no changes since v1) .gitlab-ci.d/windows.yml | 12 +++- 1 file ch

[PATCH v2 3/4] .gitlab-ci.d/windows.yml: Exclude qTests from 64-bit CI job for now

2022-11-25 Thread Bin Meng
From: Bin Meng qTests don't run successfully with "--without-default-devices", so let's exclude the qtests from CI for now. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- (no changes since v1) .gitlab-ci.d/windows.yml | 4 +++- 1 file changed, 3 inser

Re: [PATCH v2] riscv: Add RISCVCPUConfig.satp_mode to set sv48, sv57, etc.

2022-11-27 Thread Bin Meng
On Fri, Nov 25, 2022 at 7:01 PM Alexandre Ghiti wrote: > > RISC-V specifies multiple sizes for addressable memory and Linux probes for > the machine's support at startup via the satp CSR register (done in > csr.c:validate_vm). > > As per the specification, sv64 must support sv57, which in turn mus

Re: [PATCH] tests/qtest/migration-test: Fix unlink error and memory leaks

2022-11-27 Thread Bin Meng
migration-test.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) > Tested-by: Bin Meng

Re: [PATCH] hw/intc: sifive_plic: fix out-of-bound access of source_priority array

2022-11-28 Thread Bin Meng
ed-off-by: Jim Shu > --- > hw/intc/sifive_plic.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > Reviewed-by: Bin Meng

[PATCH 15/15] hw/intc: sifive_plic: Fix the pending register range check

2022-12-01 Thread Bin Meng
lock") Signed-off-by: Bin Meng --- hw/intc/sifive_plic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c index 7a6a358c57..a3fc8222c7 100644 --- a/hw/intc/sifive_plic.c +++ b/hw/intc/sifive_plic.c @@ -143,7 +14

[PATCH 14/15] hw/riscv: opentitan: Drop "hartid-base" and "priority-base" initialization

2022-12-01 Thread Bin Meng
"hartid-base" and "priority-base" are zero by default. There is no need to initialize them to zero again. Signed-off-by: Bin Meng --- hw/riscv/opentitan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index be7ff1eea0..da7

[PATCH 09/15] hw/riscv: microchip_pfsoc: Fix the number of interrupt sources of PLIC

2022-12-01 Thread Bin Meng
: 56f6e31e7b7e ("hw/riscv: Initial support for Microchip PolarFire SoC Icicle Kit board") Signed-off-by: Bin Meng --- include/hw/riscv/microchip_pfsoc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/riscv/microchip_pfsoc.h b/include/hw/riscv/microchip_pfs

[PATCH 08/15] hw/intc: sifive_plic: Update "num-sources" property default value

2022-12-01 Thread Bin Meng
here, add a comment to describe the exact meaning of this property that the number should include interrupt source 0. A wrong multi-line comment format is corrected too. Signed-off-by: Bin Meng --- hw/intc/sifive_plic.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCH 12/15] hw/riscv: virt: Fix the value of "riscv, ndev" in the dtb

2022-12-01 Thread Bin Meng
tform bus"). Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by: Bin Meng --- include/hw/riscv/virt.h | 5 ++--- hw/riscv/virt.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/riscv/virt

[PATCH 10/15] hw/riscv: sifive_e: Fix the number of interrupt sources of PLIC

2022-12-01 Thread Bin Meng
dom E Series RISC-V Machine") Signed-off-by: Bin Meng --- include/hw/riscv/sifive_e.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/hw/riscv/sifive_e.h b/include/hw/riscv/sifive_e.h index d738745925..9e58247fd8 100644 --- a/include/hw/riscv/sifive_e.h +++ b/

[PATCH 03/15] hw/riscv: Fix opentitan dependency to SIFIVE_PLIC

2022-12-01 Thread Bin Meng
Since commit ef6310064820 ("hw/riscv: opentitan: Update to the latest build") the IBEX PLIC model was replaced with the SiFive PLIC model in the 'opentitan' machine but we forgot the add the dependency there. Signed-off-by: Bin Meng --- hw/riscv/Kconfig | 1 + 1 file

[PATCH 11/15] hw/riscv: sifive_u: Avoid using magic number for "riscv, ndev"

2022-12-01 Thread Bin Meng
At present magic number is used to create "riscv,ndev" property in the dtb. Let's use the macro SIFIVE_U_PLIC_NUM_SOURCES that is used to instantiate the PLIC model instead. Signed-off-by: Bin Meng --- hw/riscv/sifive_u.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 02/15] hw/intc: Select MSI_NONBROKEN in RISC-V AIA interrupt controllers

2022-12-01 Thread Bin Meng
hw/pci/Kconfig says MSI_NONBROKEN should be selected by interrupt controllers regardless of how MSI is implemented. msi_nonbroken is initialized to true in both riscv_aplic_realize() and riscv_imsic_realize(). Select MSI_NONBROKEN in RISCV_APLIC and RISCV_IMSIC. Signed-off-by: Bin Meng --- hw

[PATCH 01/15] hw/riscv: Select MSI_NONBROKEN in SIFIVE_PLIC

2022-12-01 Thread Bin Meng
hw/pci/Kconfig says MSI_NONBROKEN should be selected by interrupt controllers regardless of how MSI is implemented. msi_nonbroken is initialized to true in sifive_plic_realize(). Let SIFIVE_PLIC select MSI_NONBROKEN and drop the selection from RISC-V machines. Signed-off-by: Bin Meng --- hw

[PATCH 13/15] hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0

2022-12-01 Thread Bin Meng
t;priority-base" to 0x04 too. Note the irq number calculation in sifive_plic_{read,write} is correct as the codes make up for the irq number by adding 1. Let's simply update "priority-base" to start from interrupt source 0 and add a comment to make it crystal clear. Signed-off-

[PATCH 05/15] hw/riscv: spike: Remove misleading comments

2022-12-01 Thread Bin Meng
PLIC is not included in the 'spike' machine. Signed-off-by: Bin Meng --- hw/riscv/spike.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index 1e1d752c00..13946acf0d 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -8,7 +8,6 @@ *

[PATCH 06/15] hw/intc: sifive_plic: Drop PLICMode_H

2022-12-01 Thread Bin Meng
H-mode has been removed since priv spec 1.10. Drop it. Signed-off-by: Bin Meng --- include/hw/intc/sifive_plic.h | 1 - hw/intc/sifive_plic.c | 1 - 2 files changed, 2 deletions(-) diff --git a/include/hw/intc/sifive_plic.h b/include/hw/intc/sifive_plic.h index 134cf39a96..d3f45ec248

[PATCH 04/15] hw/riscv: Sort machines Kconfig options in alphabetical order

2022-12-01 Thread Bin Meng
SHAKTI_C machine Kconfig option was inserted in disorder. Fix it. Signed-off-by: Bin Meng --- hw/riscv/Kconfig | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 1e4b58024f..4550b3b938 100644 --- a/hw/riscv/Kconfig

[PATCH 07/15] hw/intc: sifive_plic: Improve robustness of the PLIC config parser

2022-12-01 Thread Bin Meng
At present the PLIC config parser can only handle legal config string like "MS,MS". However if a config string like ",MS,MS,,MS,MS,," is given the parser won't get the correct configuration. This commit improves the config parser to make it more robust. Signed-off-by

[PATCH] target/riscv: Fix mret exception cause when no pmp rule is configured

2022-12-04 Thread Bin Meng
present the exception cause is set to 'illegal instruction' but should have been 'instruction access fault'. Fixes: d102f19a2085 ("target/riscv/pmp: Raise exception if no PMP entry is configured") Signed-off-by: Bin Meng --- target/riscv/op_helper.c | 2 +- 1 f

Re: [PATCH 15/15] hw/intc: sifive_plic: Fix the pending register range check

2022-12-05 Thread Bin Meng
On Fri, Dec 2, 2022 at 8:28 AM Wilfred Mallawa wrote: > > On Thu, 2022-12-01 at 22:08 +0800, Bin Meng wrote: > > The pending register upper limit is currently set to > > plic->num_sources >> 3, which is wrong, e.g.: considering > > plic->num_sources is 7, t

Re: [PATCH v2 2/3] target/riscv: Extend isa_ext_data for single letter extensions

2022-12-05 Thread Bin Meng
y: Alistair Francis > --- > target/riscv/cpu.c | 41 +++-- > 1 file changed, 23 insertions(+), 18 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v2 3/3] target/riscv: kvm: Support selecting VCPU extensions

2022-12-05 Thread Bin Meng
On Mon, Dec 5, 2022 at 6:37 PM Mayuresh Chitale wrote: > > Set the state of each ISA extension on the vcpu depending on what > is set in the CPU property and what is allowed by KVM for that extension. > > Signed-off-by: Mayuresh Chitale > Reviewed-by: Andrew Jones > Reviewed-by: Alistair Francis

Re: [PATCH] .cirrus.yml: Change winsymlinks to 'native'

2022-07-24 Thread Bin Meng
On Wed, Jul 20, 2022 at 12:12 AM Bin Meng wrote: > > From: Bin Meng > > At present winsymlinks is set to 'nativestrict', and its behavior is: > > a) if native symlinks are enabled and exists, creates > as a native Windows symlink; > b) else if nat

[PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Bin Meng
From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not defined, so the runtime behavior of winsymli

Re: How to read RISC-V mcycle CSR from Linux userspace app?

2022-07-25 Thread Bin Meng
On Tue, Jul 26, 2022 at 12:58 AM Maxim Blinov wrote: > > Hi all, stupid question but I can't for the life of me figure this out > even with all the docs open. > > I need to get an estimate figure for the cyclecount of a busy loop in > one of my small Linux userspace apps. The app in question is ru

Re: [PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Bin Meng
On Mon, Jul 25, 2022 at 9:48 PM Alex Bennée wrote: > > > Bin Meng writes: > > > From: Bin Meng > > > > The following error message was seen during the configure: > > > > "ln: failed to create symbolic link > > 'x86_64-softmmu/qemu

Re: [PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-26 Thread Bin Meng
On Tue, Jul 26, 2022 at 9:38 AM Bin Meng wrote: > > On Mon, Jul 25, 2022 at 9:48 PM Alex Bennée wrote: > > > > > > Bin Meng writes: > > > > > From: Bin Meng > > > > > > The following error message was seen during the configure: > >

[PATCH 1/5] util/qemu-sockets: Replace the call to close a socket with closesocket()

2022-07-27 Thread Bin Meng
From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket

[PATCH 0/5] Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
communicate with each other. Introduce a new build time config option CONFIG_AF_UNIX when the build host has such a capability, and a run-time check afunix_available() for Windows host in the QEMU sockets util codes. [1] https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ Bin Meng

[PATCH 3/5] qga/commands-win32: Use os_get_win_version()

2022-07-27 Thread Bin Meng
From: Bin Meng Drop its own ga_get_win_version() implementation, and use the one provided in oslib-win32 instead. Signed-off-by: Bin Meng --- qga/commands-win32.c | 27 +-- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/qga/commands-win32.c b/qga

[PATCH 2/5] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
From: Bin Meng This adds a helper to get the Windows version via the RtlGetVersion call, for QEMU codes to determine the Windows version at run-time. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- include/sysemu/os-win32.h | 2 ++ util/oslib-win32.c| 15 +++ 2

[PATCH 5/5] chardev/char-socket: Update AF_UNIX for Windows

2022-07-27 Thread Bin Meng
From: Bin Meng Now that AF_UNIX has come to Windows, update the existing logic in qemu_chr_compute_filename() and qmp_chardev_open_socket() for Windows. Signed-off-by: Bin Meng --- chardev/char-socket.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chardev/char

[PATCH 4/5] util/qemu-sockets: Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
From: Bin Meng Support for the unix socket has existed both in BSD and Linux for the longest time, but not on Windows. Since Windows 10 build 17063 [1], the native support for the unix socket has came to Windows. Starting this build, two Win32 processes can use the AF_UNIX address family over

Re: [PATCH 2/5] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 4:50 PM Yan Vugenfirer wrote: > > On Wed, Jul 27, 2022 at 10:43 AM Bin Meng wrote: > > > > From: Bin Meng > > > > This adds a helper to get the Windows version via the RtlGetVersion > > call, for QEMU codes to determine the Windows ver

Re: [PATCH 4/5] util/qemu-sockets: Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 4:51 PM Yan Vugenfirer wrote: > > On Wed, Jul 27, 2022 at 10:46 AM Bin Meng wrote: > > > > From: Bin Meng > > > > Support for the unix socket has existed both in BSD and Linux for the > > longest time, but not on Windows. Since Window

Re: [PATCH 4/5] util/qemu-sockets: Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 4:53 PM Konstantin Kostiuk wrote: > > > > > > On Wed, Jul 27, 2022 at 10:47 AM Bin Meng wrote: >> >> From: Bin Meng >> >> Support for the unix socket has existed both in BSD and Linux for the >> longest time, but not on W

Re: [PATCH 0/5] Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 5:06 PM Daniel P. Berrangé wrote: > > On Wed, Jul 27, 2022 at 03:35:37PM +0800, Bin Meng wrote: > > Support for the unix socket has existed both in BSD and Linux for the > > longest time, but not on Windows. Since Windows 10 build 17063 [1], > > th

Re: [PATCH 0/5] Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 6:24 PM Daniel P. Berrangé wrote: > > On Wed, Jul 27, 2022 at 06:15:50PM +0800, Bin Meng wrote: > > On Wed, Jul 27, 2022 at 5:06 PM Daniel P. Berrangé > > wrote: > > > > > > On Wed, Jul 27, 2022 at 03:35:37PM +0800, Bin Meng wrote: >

Re: [PATCH 2/5] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 6:00 PM Daniel P. Berrangé wrote: > > On Wed, Jul 27, 2022 at 05:38:27PM +0800, Bin Meng wrote: > > On Wed, Jul 27, 2022 at 4:50 PM Yan Vugenfirer wrote: > > > > > > On Wed, Jul 27, 2022 at 10:43 AM Bin Meng wrote: > > > > &g

Re: [PATCH 0/5] Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 7:45 PM Stefan Weil wrote: > > Am 27.07.22 um 13:37 schrieb Bin Meng: > > > On Wed, Jul 27, 2022 at 6:24 PM Daniel P. Berrangé > > wrote: > >> That isn't qtest, that is basic unit tests. I would expect those to > >> be able to

Re: [PATCH 2/5] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 8:53 PM Daniel P. Berrangé wrote: > > On Wed, Jul 27, 2022 at 07:55:40PM +0800, Bin Meng wrote: > > On Wed, Jul 27, 2022 at 6:00 PM Daniel P. Berrangé > > wrote: > > > > > > On Wed, Jul 27, 2022 at 05:38:27PM +0800, Bin Meng wrote: >

Re: [PATCH 2/5] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 9:18 PM Konstantin Kostiuk wrote: > > > > On Wed, Jul 27, 2022 at 2:58 PM Bin Meng wrote: >> >> On Wed, Jul 27, 2022 at 6:00 PM Daniel P. Berrangé >> wrote: >> > >> > On Wed, Jul 27, 2022 at 05:38:27PM +0800, Bin Meng w

[PATCH v2 1/6] util/qemu-sockets: Replace the call to close a socket with closesocket()

2022-07-27 Thread Bin Meng
From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket

[PATCH v2 0/6] Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
v2: - move #include to os-win32.h - define WIN_BUILD_AF_UNIX only when CONFIG_WIN32 - drop #include as it is now already included in osdep.h - new patch: tests/unit: Update test-io-channel-socket.c for Windows Bin Meng (6): util/qemu-sockets: Replace the call to close a socket with

[PATCH v2 3/6] qga/commands-win32: Use os_get_win_version()

2022-07-27 Thread Bin Meng
From: Bin Meng Drop its own ga_get_win_version() implementation, and use the one provided in oslib-win32 instead. Signed-off-by: Bin Meng --- (no changes since v1) qga/commands-win32.c | 27 +-- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/qga

[PATCH v2 2/6] util/oslib-win32: Add a helper to get the Windows version

2022-07-27 Thread Bin Meng
From: Bin Meng This adds a helper to get the Windows version via the RtlGetVersion call, for QEMU codes to determine the Windows version at run-time. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- (no changes since v1) include/sysemu/os-win32.h | 2 ++ util/oslib-win32.c

[PATCH v2 4/6] util/qemu-sockets: Enable unix socket support on Windows

2022-07-27 Thread Bin Meng
From: Bin Meng Support for the unix socket has existed both in BSD and Linux for the longest time, but not on Windows. Since Windows 10 build 17063 [1], the native support for the unix socket has came to Windows. Starting this build, two Win32 processes can use the AF_UNIX address family over

[PATCH v2 5/6] chardev/char-socket: Update AF_UNIX for Windows

2022-07-27 Thread Bin Meng
From: Bin Meng Now that AF_UNIX has come to Windows, update the existing logic in qemu_chr_compute_filename() and qmp_chardev_open_socket() for Windows. Signed-off-by: Bin Meng --- Changes in v2: - drop #include as it is now already included in osdep.h chardev/char-socket.c | 4 +++- 1

[PATCH v2 6/6] tests/unit: Update test-io-channel-socket.c for Windows

2022-07-27 Thread Bin Meng
From: Bin Meng Enable the following 3 test cases for Windows when AF_UNIX is available: * test_io_channel_unix_sync * test_io_channel_unix_async * test_io_channel_unix_listen_cleanup Signed-off-by: Bin Meng --- Changes in v2: - new patch: tests/unit: Update test-io-channel-socket.c for

Re: fu740 target

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 10:24 PM Ben Dooks wrote: > > Is anyone working on adding a sifive-u74 core to the list of supported > CPU types? I was looking at full emulation of the Unmatched but at the > moment the best we have is sifive-u54 and I think that misses at least > two CSRs the sifive-u74 h

Re: fu740 target

2022-07-27 Thread Bin Meng
On Wed, Jul 27, 2022 at 10:44 PM Ben Dooks wrote: > > On 27/07/2022 15:38, Bin Meng wrote: > > On Wed, Jul 27, 2022 at 10:24 PM Ben Dooks wrote: > >> > >> Is anyone working on adding a sifive-u74 core to the list of supported > >> CPU types? I was looking

Re: [PATCH 4/5] util/qemu-sockets: Enable unix socket support on Windows

2022-07-28 Thread Bin Meng
On Thu, Jul 28, 2022 at 9:11 PM Marc-André Lureau wrote: > > Hi > > On Wed, Jul 27, 2022 at 2:05 PM Bin Meng wrote: >> >> On Wed, Jul 27, 2022 at 4:53 PM Konstantin Kostiuk >> wrote: >> > >> > >> > >> > >> > >&g

Re: [PATCH v2] ci: Upgrade msys2 release to 20220603

2022-07-28 Thread Bin Meng
On Fri, Jul 29, 2022 at 4:04 AM Yonggang Luo wrote: > > Signed-off-by: Yonggang Luo > --- > .cirrus.yml | 2 +- > .gitlab-ci.d/windows.yml | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

[PATCH v3 0/4] Enable unix socket support on Windows

2022-07-30 Thread Bin Meng
eck afunix_available() Changes in v2: - move #include to os-win32.h - define WIN_BUILD_AF_UNIX only when CONFIG_WIN32 - drop #include as it is now already included in osdep.h - new patch: tests/unit: Update test-io-channel-socket.c for Windows Bin Meng (4): util/qemu-sockets: Replace the call to

[PATCH v3 1/4] util/qemu-sockets: Replace the call to close a socket with closesocket()

2022-07-30 Thread Bin Meng
From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket

[PATCH v3 2/4] util/qemu-sockets: Enable unix socket support on Windows

2022-07-30 Thread Bin Meng
From: Bin Meng Support for the unix socket has existed both in BSD and Linux for the longest time, but not on Windows. Since Windows 10 build 17063 [1], the native support for the unix socket has come to Windows. Starting this build, two Win32 processes can use the AF_UNIX address family over

[PATCH v3 4/4] tests/unit: Update test-io-channel-socket.c for Windows

2022-07-30 Thread Bin Meng
From: Bin Meng Enable the following 3 test cases for Windows when AF_UNIX is available: * test_io_channel_unix_sync * test_io_channel_unix_async * test_io_channel_unix_listen_cleanup Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - new patch: tests/unit: Update test

[PATCH v3 3/4] chardev/char-socket: Update AF_UNIX for Windows

2022-07-30 Thread Bin Meng
From: Bin Meng Now that AF_UNIX has come to Windows, update the existing logic in qemu_chr_compute_filename() and qmp_chardev_open_socket() for Windows. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v2) Changes in v2: - drop #include as it is now already

[PATCH v4 0/4] Enable unix socket support on Windows

2022-08-02 Thread Bin Meng
now already included in osdep.h - new patch: tests/unit: Update test-io-channel-socket.c for Windows Bin Meng (4): util/qemu-sockets: Replace the call to close a socket with closesocket() util/qemu-sockets: Enable unix socket support on Windows chardev/char-socket: Update AF_UNIX for

[PATCH v4 2/4] util/qemu-sockets: Enable unix socket support on Windows

2022-08-02 Thread Bin Meng
From: Bin Meng Support for the unix socket has existed both in BSD and Linux for the longest time, but not on Windows. Since Windows 10 build 17063 [1], the native support for the unix socket has come to Windows. Starting this build, two Win32 processes can use the AF_UNIX address family over

[PATCH v4 3/4] chardev/char-socket: Update AF_UNIX for Windows

2022-08-02 Thread Bin Meng
From: Bin Meng Now that AF_UNIX has come to Windows, update the existing logic in qemu_chr_compute_filename() and qmp_chardev_open_socket() for Windows. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v4: - drop CONFIG_AF_UNIX Changes in v2: - drop #include as it is

[PATCH v4 1/4] util/qemu-sockets: Replace the call to close a socket with closesocket()

2022-08-02 Thread Bin Meng
From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket

[PATCH v4 4/4] tests/unit: Update test-io-channel-socket.c for Windows

2022-08-02 Thread Bin Meng
From: Bin Meng Change to dynamically include the test cases by checking AF_UNIX availability using a new helper socket_check_afunix_support(). With such changes testing on a Windows host can be covered as well. Signed-off-by: Bin Meng --- Changes in v4: - introduce a new helper

Re: [PATCH] hw/riscv: remove 'fdt' param from riscv_setup_rom_reset_vec()

2022-08-02 Thread Bin Meng
gt; > Cc: Palmer Dabbelt > Cc: Alistair Francis > Cc: Bin Meng > Cc: Vijai Kumar K > Signed-off-by: Daniel Henrique Barboza > --- > hw/riscv/boot.c| 4 +--- > hw/riscv/microchip_pfsoc.c | 2 +- > hw/riscv/shakti_c.c| 3 +-- > hw/riscv/spike.c

[PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-05 Thread Bin Meng
From: Bin Meng The maximum number of wait objects for win32 should be MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. Signed-off-by: Bin Meng --- util/main-loop.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/main-loop.c b/util/main-loop.c index

[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 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-08 Thread Bin Meng
On Fri, Aug 5, 2022 at 10:56 PM Bin Meng wrote: > > From: Bin Meng > > The maximum number of wait objects for win32 should be > MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. > > Signed-off-by: Bin Meng > --- > > util/main-loop.c | 8 > 1

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 > &g

Re: [PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-09 Thread Bin Meng
On Tue, Aug 9, 2022 at 9:15 PM Marc-André Lureau wrote: > > Hi > > On Fri, Aug 5, 2022 at 6:57 PM Bin Meng wrote: >> >> From: Bin Meng >> >> The maximum number of wait objects for win32 should be >> MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1.

[PATCH v2 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-09 Thread Bin Meng
From: Bin Meng The maximum number of wait objects for win32 should be MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. Fix the logic in qemu_add_wait_object() to avoid adding the same HANDLE twice. Signed-off-by: Bin Meng --- Changes in v2: - fix the logic in qemu_add_wait_object() to

[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 '

Re: [PATCH v2 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-10 Thread Bin Meng
On Wed, Aug 10, 2022 at 1:06 AM Marc-André Lureau wrote: > > Hi > > On Tue, Aug 9, 2022 at 8:43 PM Bin Meng wrote: >> >> From: Bin Meng >> >> The maximum number of wait objects for win32 should be >> MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. &

Re: [PATCH 2/3] hw/ssi: fixup coverity issue

2022-08-10 Thread Bin Meng
On Thu, Aug 11, 2022 at 8:58 AM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > This patch addresses the coverity issues specified in [1], > as suggested, `FIELD_DP32()`/`FIELD_EX32()` macros have been > implemented to clean up the code. > > Additionally, the `EVENT_ENABLE` register is corre

Re: [PATCH v2 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-11 Thread Bin Meng
On Wed, Aug 10, 2022 at 11:57 PM Marc-André Lureau wrote: > > > > On Wed, Aug 10, 2022 at 7:20 PM Bin Meng wrote: >> >> On Wed, Aug 10, 2022 at 1:06 AM Marc-André Lureau >> wrote: >> > >> > Hi >> > >> > On Tue, Aug 9, 2022 at 8:

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 Ati

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 &

[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: [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

Re: [PATCH 2/2] hw/char/riscv_htif: Fix the console syscall on big endian hosts

2023-07-21 Thread Bin Meng
: Support 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 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] 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

[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

Re: [Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding

2019-06-06 Thread Bin Meng
On Thu, May 30, 2019 at 11:36 AM Bin Meng wrote: > > Hi Alistair, > > On Thu, May 30, 2019 at 11:14 AM Alistair Francis > wrote: > > > > On Wed, May 29, 2019 at 1:52 AM Bin Meng wrote: > > > > > > The largest pci bus number should be calculated from

  1   2   3   4   5   6   7   8   9   10   >