Re: [PATCH] tests/qtest: npcm7xx-emc-test: Skip checking MAC

2022-09-20 Thread Thomas Huth
On 20/09/2022 00.37, Patrick Venture wrote: On Mon, Sep 19, 2022 at 5:44 AM Thomas Huth > wrote: On 06/09/2022 18.31, Patrick Venture wrote: > The register tests walks all the registers to verify they are initially > 0 when appropriate.  However, if the

Re: [PATCH 0/8] RFC: Pass tests for x86_64 machine types compiled individually

2022-09-20 Thread Thomas Huth
On 02/09/2022 19.34, Juan Quintela wrote: [...] There are interesting cases, and are the tests are run with the default machine type (pc) but that work with either of them [...] This tests can be run with both machine types, but as we can't easily put -machine on them (several of them are suppo

Re: [PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

2022-09-20 Thread Daniel P . Berrangé
On Fri, Sep 02, 2022 at 06:51:26PM +0200, Juan Quintela wrote: > With this change "make check" works when configured with --disable-keyring. > > Signed-off-by: Juan Quintela > --- > tests/unit/meson.build | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/unit/mes

[PATCH 1/3] Hexagon (target/hexagon) add instruction attributes from archlib

2022-09-20 Thread Taylor Simpson
The imported files from the architecture library have added some instruction attributes. Some of these will be used in a subsequent patch for determing the size of a store. Signed-off-by: Taylor Simpson --- target/hexagon/attribs_def.h.inc | 37 +++- target/hexagon/imported/ldst.idef

[PATCH 0/3] Hexagon (target/hexagon) improve store handling

2022-09-20 Thread Taylor Simpson
Make store handling faster and more robust Taylor Simpson (3): Hexagon (target/hexagon) add instruction attributes from archlib Hexagon (target/hexagon) move store size tracking to translation Hexagon (target/hexagon) Change decision to set pkt_has_store_s[01] target/hexagon/macros.h

Re: Maximum QMP reply size

2022-09-20 Thread Daniel P . Berrangé
On Mon, Sep 19, 2022 at 08:45:07AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Fri, Sep 16, 2022 at 04:12:00PM +0100, Peter Maydell wrote: > >> On Thu, 15 Sept 2022 at 16:21, Dr. David Alan Gilbert > >> wrote: > >> > > >> > * Peter Maydell (peter.mayd...@linaro.org) wro

[PATCH 2/3] Hexagon (target/hexagon) move store size tracking to translation

2022-09-20 Thread Taylor Simpson
The store width is needed for packet commit, so it is stored in ctx->store_width. Currently, it is set when a store has a TCG override instead of a QEMU helper. In the QEMU helper case, the ctx->store_width is not set, we invoke a helper during packet commit that uses the runtime store width. Th

[PATCH v1 1/1] hw/arm/xlnx-zynqmp: Connect ZynqMP's USB controllers

2022-09-20 Thread Francisco Iglesias
From: Francisco Iglesias Connect ZynqMP's USB controllers. Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-zynqmp.c | 36 include/hw/arm/xlnx-zynqmp.h | 3 +++ 2 files changed, 39 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zyn

[PATCH 3/3] Hexagon (target/hexagon) Change decision to set pkt_has_store_s[01]

2022-09-20 Thread Taylor Simpson
We have found cases where pkt_has_store_s[01] is set incorrectly. This leads to generating an unnecessary store that is left over from a previous packet. Add an attribute to determine if an instruction is a scalar store The attribute is attached to the fSTORE macro (hex_common.py) Simplify the log

[PATCH] This patch is to solve the problem that bitmaps in memory are lost after dirve-mirror is completed.

2022-09-20 Thread Hongleilee
Signed-off-by: Hongleilee <281773...@qq.com> --- block/mirror.c | 29 + 1 file changed, 29 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index 3c4ab1159d..86d2cd6b67 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -24,6 +24,7 @@ #include "qemu/ratelim

Re: QEMU's FreeBSD 13 CI job is failing

2022-09-20 Thread Thomas Huth
On 20/09/2022 10.21, Daniel P. Berrangé wrote: On Tue, Sep 20, 2022 at 08:44:27AM +0200, Thomas Huth wrote: Seen here for example: https://gitlab.com/qemu-project/qemu/-/jobs/3050165356#L2543 ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not foun

Re: QEMU's FreeBSD 13 CI job is failing

2022-09-20 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 10:23:56AM +0200, Thomas Huth wrote: > On 20/09/2022 10.21, Daniel P. Berrangé wrote: > > On Tue, Sep 20, 2022 at 08:44:27AM +0200, Thomas Huth wrote: > > > > > > Seen here for example: > > > > > > https://gitlab.com/qemu-project/qemu/-/jobs/3050165356#L2543 > > > > > > l

Re: [PATCH v14 0/5] Improve PMU support

2022-09-20 Thread Atish Kumar Patra
On Mon, Sep 19, 2022 at 3:08 PM Alistair Francis wrote: > On Thu, Aug 25, 2022 at 8:22 AM Atish Patra wrote: > > > > The latest version of the SBI specification includes a Performance > Monitoring > > Unit(PMU) extension[1] which allows the supervisor to > start/stop/configure > > various PMU ev

Re: QEMU's FreeBSD 13 CI job is failing

2022-09-20 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 08:44:27AM +0200, Thomas Huth wrote: > > Seen here for example: > > https://gitlab.com/qemu-project/qemu/-/jobs/3050165356#L2543 > > ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by > /usr/local/lib/libpython3.9.so.1.0 not found > ERROR: Cannot use '/usr/local/bi

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-20 Thread Klaus Jensen
On Sep 10 13:27, Sam Li wrote: > Add a new zoned_host_device BlockDriver. The zoned_host_device option > accepts only zoned host block devices. By adding zone management > operations in this new BlockDriver, users can use the new block > layer APIs including Report Zone and four zone management ope

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-20 Thread Igor Mammedov
On Fri, 16 Sep 2022 21:15:35 +0800 Robert Hoo wrote: > On Fri, 2022-09-16 at 09:37 +0200, Igor Mammedov wrote: > > > > Fine, get your point now. > > > In ASL it will look like this: > > > Local1 = Package (0x3) {STTS, SLSA, MAXT} > > > Return (Local1) >

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-20 Thread BALATON Zoltan
On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futhe

Re: [kvm-unit-tests PATCH v4 07/12] arm: pmu: Basic event counter Tests

2022-09-20 Thread Eric Auger
Hi Zenghui, On 9/19/22 16:30, Zenghui Yu wrote: > Hi Eric, > > A few comments when looking through the PMU test code (2 years after > the series was merged). Thank you for reviewing even after this time! Do you want to address the issues yourself and send a patch series or do you prefer I proceed

[PATCH] This patch is to solve the problem that the bitmap file in memory is lost after creating a snapshot

2022-09-20 Thread Hongleilee
From: Hongleili Li (李红磊)-云数据中心集团 Signed-off-by: Hongleili Li (李红磊)-云数据中心集团 --- blockdev.c | 4 1 file changed, 4 insertions(+) diff --git a/blockdev.c b/blockdev.c index 9230888e34..a6b85d06b7 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1534,6 +1534,10 @@ static void external_snapshot_pr

Re: [PATCH 1/8] qtest: "-display none" is set in qtest_init()

2022-09-20 Thread Thomas Huth
On 02/09/2022 18.51, Juan Quintela wrote: So we don't need to set anywhere else. Signed-off-by: Juan Quintela --- ... diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index afc1d20355..94b00288d9 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-20 Thread BALATON Zoltan
On Tue, 20 Sep 2022, Philippe Mathieu-Daudé via wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch

[PULL v2 4/9] hw/loongarch: Add platform bus support

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Add platform bus support and add the bus information such as address, size, irq number to FDT table. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-5-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/Kconfig| 1

[PULL v2 1/9] hw/loongarch: Remove vga device when loongarch init

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Remove the vga device when loongarch machine init and we will support other display device in the future. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-2-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 1 -

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-20 Thread Peter Maydell
On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: > > In address-spaces.h it can be read that get_system_memory() and > get_system_io() are temporary interfaces which "should only be used > temporarily > until a proper bus interface is available". This statement certainly extends > to > the

[PULL v2 0/9] loongarch-to-apply queue

2022-09-20 Thread Song Gao
The following changes since commit d29201ff34a135cdfc197f4413c1c5047e4f58bb: Merge tag 'pull-hmp-20220915a' of https://gitlab.com/dagrh/qemu into staging (2022-09-17 10:31:11 -0400) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarc

[PULL v2 2/9] hw/loongarch: Support fw_cfg dma function

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Support fw_cfg dma function for LoongArch virt machine. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-3-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 1 + hw/loongarch/fw_cfg.c | 3 ++- hw/loongarch/virt.

[PULL v2 5/9] hw/loongarch: Add hotplug handler for machine

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Add hotplug handler for LoongArch virt machine and now only support the dynamic sysbus device. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-6-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c | 32 ++

[PULL v2 9/9] hw/loongarch: Improve acpi dsdt table

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Cleanup the previous pci information in acpi dsdt table. And using the common acpi_dsdt_add_gpex function to build the gpex and pci information. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-10-yangxiaoj...@loongson.cn> Signed-off-by: Son

[PULL v2 3/9] hw/loongarch: Add interrupt information to FDT table

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Add interrupt information to FDT table, such as interrupt controller info, compatiable info, etc. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-4-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c | 28 +++

[PATCH v2 02/39] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-20 Thread Bin Meng
From: Bin Meng Previously request_{bios, pflash} cases were skipped on win32, mainly due to create_blob_file() calling mmap() which does not exist on win32. This rewirtes create_blob_file() to be portable, so that we can enable these cases on Windows. Suggested-by: Marc-André Lureau Signed-off-

[PULL v2 7/9] hw/loongarch: Fix acpi ged irq number in dsdt table

2022-09-20 Thread Song Gao
From: Xiaojuan Yang In dsdt, acpi ged irq should use gsi number, and the VIRT_SCI_IRQ means it. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-8-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insert

[PULL v2 6/9] hw/loongarch: Add RAMFB to dynamic_sysbus_devices list

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Add RAMFB device to dynamic_sysbus_devices list so that it can be hotpluged to the machine. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-7-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c | 2 ++ 1 file changed

[PULL v2 8/9] hw/loongarch: Support memory hotplug

2022-09-20 Thread Song Gao
From: Xiaojuan Yang Add hotplug/unplug interface for memory device. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20220908094623.73051-9-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 2 + hw/loongarch/acpi-build.c | 32 +--- hw/lo

[PATCH v2 05/39] tcg: Avoid using hardcoded /tmp

2022-09-20 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 Reviewed-by: Marc-André Lureau --- Changes in v2: - Use g_autofree to declare the variable tcg/tcg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.c b/

[PATCH] gitlab-ci: Update the FreeBSD 13 job from 13.0 to 13.1

2022-09-20 Thread Thomas Huth
The FreeBSD 13 job in our CI started failing since the python port stopped working after 13.1 has been released. Thus update our CI job to FreeBSD 13.1 to get it working again. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- .gitlab-ci.d/cirrus.yml | 2 +- 1 file changed, 1 inse

[PATCH v2 10/39] hw/usb: dev-mtp: Use g_mkdir()

2022-09-20 Thread Bin Meng
From: Bin Meng Use g_mkdir() to create a directory on all platforms. Signed-off-by: Bin Meng --- Changes in v2: - Change to use g_mkdir() hw/usb/dev-mtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 5831395cef..1cac1cd435

Re: [PATCH v2] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic

2022-09-20 Thread Peter Maydell
On Wed, 17 Aug 2022 at 15:33, Peter Maydell wrote: > > On Wed, 17 Aug 2022 at 15:24, Anton Kochkov wrote: > > > > For consistency, function "update_rx_fifo()" should use > > the RX FIFO register names, not the TX FIFO ones even if > > "register field names" > > > they refer to the same memory reg

[PATCH v2 14/39] accel/qtest: Implement a portable qtest accelerator

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng Currently signal SIGIPI [=SIGUSR1] is used to kick the dummy CPU when qtest accelerator is used. However SIGUSR1 is unsupported on Windows. To support Windows, we add a QemuSemaphore CPUState::sem to kick the dummy CPU instead. As a result of this, the POSIX implementation via

Re: [PATCH] target/arm: Fix alignment for VLD4.32

2022-09-20 Thread Peter Maydell
On Wed, 14 Sept 2022 at 14:11, Richard Henderson wrote: > > On 9/14/22 11:50, Clément Chigot wrote: > > When requested, the alignment for VLD4.32 is 8 and not 16. > > > > See ARM documentation about VLD4 encoding: > > ebytes = 1 << UInt(size); > > if size == '10' then > > alignm

Re: [PATCH v2] hw/arm: fix the position of vcram for raspi

2022-09-20 Thread Peter Maydell
On Sat, 27 Aug 2022 at 21:09, Frederik van Hövell wrote: > > From: Alex Bennée > > The previous calculation fell over when I tried to create a 8gb Pi 4 > because the values were only 32 bit. However the quirk of the Pi > hardware is the vcram can only appear in the first 1gb of address > space. T

[PATCH v2 15/39] tests/qtest: libqtest: Adapt global_qtest declaration for win32

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng Commit dd2107497275 ("tests/libqtest: Use libqtest-single.h in tests that require global_qtest") moved global_qtest to libqtest-single.h, by declaring global_qtest attribute to be common and weak. This trick unfortunately does not work on Windows, and building qtest test case

Re: [PATCH] gitlab-ci: Update the FreeBSD 13 job from 13.0 to 13.1

2022-09-20 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 12:20:41PM +0200, Thomas Huth wrote: > The FreeBSD 13 job in our CI started failing since the python port > stopped working after 13.1 has been released. Thus update our CI > job to FreeBSD 13.1 to get it working again. > > Suggested-by: Daniel P. Berrangé > Signed-off-by:

Re: [PULL v3 00/20] tcg patch queue

2022-09-20 Thread Thomas Huth
On 06/09/2022 10.37, Richard Henderson wrote: v2: Fix incorretly resolved rebase conflict in patch 16. v3: Work around clang preprocessor bug in patch 3. r~ The following changes since commit fd28528ece590dc709d1a893fce2ff2f68ddca70: Merge tag 'pull-or1k-20220904' of https://github.com/st

[PATCH v2 19/39] tests/qtest: Support libqtest to build and run on Windows

2022-09-20 Thread Bin Meng
From: Bin Meng At present the libqtest codes were written to depend on several POSIX APIs, including fork(), kill() and waitpid(). Unfortunately these APIs are not available on Windows. This commit implements the corresponding functionalities using win32 native APIs. With this change, all qtest

[PATCH v2 06/39] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files

2022-09-20 Thread Bin Meng
From: Bin Meng Replace the existing logic to get the directory for temporary files with g_get_tmp_dir(), which works for win32 too. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v1) util/qemu-sockets.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[PATCH v2 01/39] tests: Change to use g_mkdir()

2022-09-20 Thread Bin Meng
From: Bin Meng Commit 413bebc04603 ("tests: Use g_mkdir_with_parents()") replaces the mkdir() call in the test codes with glib's g_mkdir_with_parents(), but the exact portable replacement for mkdir() should be g_mkdir(). I probably was misled by the GTK glib doc [1] before, thinking that g_mkdir

[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/ahci-test.c | 2

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

2022-09-20 Thread Bin Meng
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 v2: - new patch: "tests: Change to use g_mkdir()" - new patch: "tests/qtest: i440fx-test: Rew

[PATCH v2 13/39] tests/qtest: qmp-test: Skip running test_qmp_oob for win32

2022-09-20 Thread Bin Meng
From: Bin Meng The test_qmp_oob test case calls mkfifo() which does not exist on win32. Exclude it. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- Changes in v2: - Add a comment in the code to explain why test_qmp_oob test case is skipped on win32 tests/qtest/qmp-test.c | 7 +++

[PATCH v2 17/39] tests/qtest: libqtest: Exclude the *_fds APIs for win32

2022-09-20 Thread Bin Meng
From: Bin Meng libqmp.c::qmp_fd_vsend_fds() is not available on Windows, hence any APIs in libqtest that call libqmp.c::qmp_fd_vsend_fds() should be excluded for win32 too. This includes the following: * qtest_qmp_vsend_fds() * qtest_vqmp_fds() * qtest_qmp_fds() * qtest_qmp_add_client()

[PATCH v2 11/39] tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32

2022-09-20 Thread Bin Meng
From: Bin Meng Some of the virtio-net-test test cases require socketpair() to do the test setup. Skip them for win32. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v2: - Change to skip only part of the virtio-net-test cases that require socketpair() intead of disabli

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

[PATCH v2 27/39] hw/ppc: spapr: Use qemu_vfree() to free spapr->htab

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng spapr->htab is allocated by qemu_memalign(), hence we should use qemu_vfree() to free it. Fixes: c5f54f3e31bf ("pseries: Move hash page table allocation to reset time") Fixes: b4db54132ffe ("target/ppc: Implement H_REGISTER_PROCESS_TABLE H_CALL"") Signed-off-by: Xuzhou Cheng

[PATCH v2 12/39] tests/qtest: Build test-filter-{mirror, redirector} cases for posix only

2022-09-20 Thread Bin Meng
From: Bin Meng The test-filter-{mirror,redirector} cases use socketpair() API that is only available on POSIX and should only be built for POSIX. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v2: - Introduce a new variable qtests_filter and add that to the qtests_ARC

[PATCH v2 16/39] tests/qtest: Use send/recv for socket communication

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng Socket communication in the libqtest and libqmp codes uses read() and write() which work on any file descriptor on *nix, and sockets in *nix are an example of a file descriptor. However sockets on Windows do not use *nix-style file descriptors, so read() and write() cannot be

[PATCH v2 04/39] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

2022-09-20 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 --- (no changes since v1) semihosting/arm-compat-semi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-sem

[PATCH v2 18/39] tests/qtest: libqtest: Install signal handler via signal()

2022-09-20 Thread Bin Meng
From: Bin Meng At present the codes uses sigaction() to install signal handler with a flag SA_RESETHAND. Such usage can be covered by the signal() API that is a simplified interface to the general sigaction() facility. Update to use signal() to install the signal handler, as it is available on W

[PATCH v2 25/39] chardev/char-file: Add FILE_SHARE_WRITE when openning the file for win32

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng The combination of GENERIC_WRITE and FILE_SHARE_READ options does not allow the same file to be opened again by CreateFile() from another QEMU process with the same options when the previous QEMU process still holds the file handle opened. This was triggered by running the tes

[PATCH v2 28/39] hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng pnv_phb3_root_bus_info and pnv_phb4_root_bus_info are missing the instance_size initialization. This results in accessing out-of-bound memory when setting 'chip-id' and 'phb-id', and eventually crashes glib's malloc functionality with the following message: "qemu-system-ppc6

[PATCH v2 29/39] tests/qtest: microbit-test: Fix socket access for win32

2022-09-20 Thread Bin Meng
From: Bin Meng Sockets on Windows do not use *nix-style file descriptors, so write()/read()/close() do not work on Windows. Switch over to use send()/recv()/closesocket() which work with sockets on all platforms. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v1

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

[PATCH v2 21/39] tests/qtest: bios-tables-test: Adapt the case for win32

2022-09-20 Thread Bin Meng
From: Bin Meng Single quotes in the arguments (oem_id='CRASH ') are not removed in the Windows environment before it is passed to the QEMU executable. The space in the argument causes the "-acpitable" option parser to think that all of its parameters are done, hence it complains: '-acpitable'

[PATCH v2 33/39] io/channel-watch: Drop the unnecessary cast

2022-09-20 Thread Bin Meng
From: Bin Meng There is no need to do a type cast on ssource->socket as it is already declared as a SOCKET. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- Changes in v2: - new patch: "io/channel-watch: Drop the unnecessary cast" io/channel-watch.c | 6 +++--- 1 file changed, 3

[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 to u

[PATCH v2 30/39] tests/qtest: libqtest: Replace the call to close a socket with closesocket()

2022-09-20 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() r

[PATCH v2 22/39] tests/qtest: migration-test: Disable IO redirection for win32

2022-09-20 Thread Bin Meng
From: Bin Meng On Windows the QEMU executable is created via CreateProcess() and IO redirection does not work, so don't bother adding IO redirection to the command line. Signed-off-by: Bin Meng --- Changes in v2: - Change the place that sets IO redirection in the command line tests/qtest/mig

[PATCH v2 35/39] tests/qtest: migration-test: Skip running some TLS cases for win32

2022-09-20 Thread Bin Meng
From: Bin Meng Some migration test cases use TLS to communicate, but they fail on Windows with the following error messages: qemu-system-x86_64: TLS handshake failed: Insufficient credentials for that request. qemu-system-x86_64: TLS handshake failed: Error in the pull function. query-mig

[PATCH v2 09/39] fsdev/virtfs-proxy-helper: Use g_mkdir()

2022-09-20 Thread Bin Meng
From: Bin Meng Use g_mkdir() to create a directory on all platforms. Signed-off-by: Bin Meng --- Changes in v2: - Change to use g_mkdir() fsdev/virtfs-proxy-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.

Re: [PATCH v3 4/6] accel/tcg: Introduce probe_access_full

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:26, Richard Henderson wrote: > > Add an interface to return the CPUTLBEntryFull struct > that goes with the lookup. The result is not intended > to be valid across multiple lookups, so the user must > use the results immediately. > > Signed-off-by: Richard Henderson Re

[PATCH v2 39/39] docs/devel: testing: Document writing portable test cases

2022-09-20 Thread Bin Meng
From: Bin Meng Update the best practices of how to write portable test cases that can be built and run successfully on both Linux and Windows hosts. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v2: - Minor wording changes docs/devel/testing.rst | 30

[PATCH v2 26/39] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng Make sure QEMU process "to" exited before launching another target for migration in the test_multifd_tcp_cancel case. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v2: - Change to a busy wait after migration is canceled

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

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng By default Windows opens file in text mode, while a POSIX compliant implementation treats text files and binary files the same. The fopen() 'mode' string can include the letter 'b' to indicate binary mode shall be used. POSIX spec says the character 'b' shall have no effect, b

[PATCH v2 31/39] tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32

2022-09-20 Thread Bin Meng
From: Bin Meng Some qtest cases don't get response from the QEMU executable under test in time on Windows. It turns out that the socket receive call got timeout before it receive the complete response. The timeout value is supposed to be set to 50 seconds via the setsockopt() call, but there is

[PATCH v4 4/7] tests/x86: Add 'q35' machine type to drive_del-test

2022-09-20 Thread Michael Labiuk via
Configure pci bridge setting to run tests on 'q35' machine type. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 111 +++ 1 file changed, 111 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 5e6d58b4dd.

[PATCH v2 24/39] tests/qtest: virtio-net-failover: Disable migration tests for win32

2022-09-20 Thread Bin Meng
From: Xuzhou Cheng These tests use the exec migration protocol, which is unsupported on Windows as of today. Disable these tests for now. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- (no changes since v1) tests/qtest/virtio-net-failover.c | 9 - 1 file changed, 8 insertio

[PATCH v4 6/7] tests/x86: Refactor hot unplug hd-geo-test

2022-09-20 Thread Michael Labiuk via
Moving common code to function. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 133 +++--- 1 file changed, 53 insertions(+), 80 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 58b1107d64..d488ad9ac0 100644 ---

Re: [PATCH v3 1/6] accel/tcg: Rename CPUIOTLBEntry to CPUTLBEntryFull

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:23, Richard Henderson wrote: > > This structure will shortly contain more than just > data for accessing MMIO. Rename the 'addr' member > to 'xlat_section' to more clearly indicate its purpose. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell tha

[PATCH v2 32/39] io/channel-watch: Drop a superfluous '#ifdef WIN32'

2022-09-20 Thread Bin Meng
From: Bin Meng In the win32 version qio_channel_create_socket_watch() body there is no need to do a '#ifdef WIN32'. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v1) io/channel-watch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/io/channel-watch.c b/i

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

2022-09-20 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 --- Changes in v2: - new patch: "tests/qtest: Enable qtest build on Windows" tests/qtest/meson.build | 5 ++--- 1 file changed, 2 i

[PATCH v2 34/39] io/channel-watch: Fix socket watch on Windows

2022-09-20 Thread Bin Meng
From: Bin Meng Random failure was observed when running qtests on Windows due to "Broken pipe" detected by qmp_fd_receive(). What happened is that the qtest executable sends testing data over a socket to the QEMU under test but no response is received. The errno of the recv() call from the qtest

Re: [PATCH v3 6/6] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:26, Richard Henderson wrote: > > Allow the target to cache items from the guest page tables. > > Signed-off-by: Richard Henderson > --- > include/exec/cpu-defs.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/include/exec/cpu-defs.h b/include/exec/cpu

[PATCH v4 0/7] Add 'q35' machine type to hotplug tests

2022-09-20 Thread Michael Labiuk via
Add pci bridge setting to run hotplug tests on q35 machine type. Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b Changes from v3: * Moving helper function process_device_remove() to separate commit. * Refactoring hd-geo-test to avoid code duplication. Michael Labiuk (7): t

[PATCH v2 36/39] .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes

2022-09-20 Thread Bin Meng
From: Bin Meng commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices" changed to compile QEMU with the --without-default-devices switch for the msys2-64bit job, due to the build could not complete within the project timeout (1h), and also mentioned that

[PATCH v4 7/7] tests/x86: Add 'q35' machine type to hotplug hd-geo-test

2022-09-20 Thread Michael Labiuk via
Add pci bridge setting to test hotplug. Duplicate tests for plugging scsi and virtio devices for q35 machine type. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 76 +++ 1 file changed, 76 insertions(+) diff --git a/tests/qtest/hd-geo-test.c b/

Re: [PATCH v2 28/39] hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure

2022-09-20 Thread Cédric Le Goater
On 9/20/22 12:31, Bin Meng wrote: From: Xuzhou Cheng pnv_phb3_root_bus_info and pnv_phb4_root_bus_info are missing the instance_size initialization. This results in accessing out-of-bound memory when setting 'chip-id' and 'phb-id', and eventually crashes glib's malloc functionality with the fol

Re: [PATCH v3 5/6] accel/tcg: Introduce tlb_set_page_full

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:29, Richard Henderson wrote: > > Now that we have collected all of the page data into > CPUTLBEntryFull, provide an interface to record that > all in one go, instead of using 4 arguments. This interface > allows CPUTLBEntryFull to be extended without having to > change t

[PATCH v4 2/7] tests/x86: Add subtest with 'q35' machine type to device-plug-test

2022-09-20 Thread Michael Labiuk via
Configure pci bridge setting to plug pci device and unplug. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index e595b45b66..d

Re: [PATCH v2 10/39] hw/usb: dev-mtp: Use g_mkdir()

2022-09-20 Thread Gerd Hoffmann
On Tue, Sep 20, 2022 at 06:31:30PM +0800, Bin Meng wrote: > From: Bin Meng > > Use g_mkdir() to create a directory on all platforms. > > Signed-off-by: Bin Meng Acked-by: Gerd Hoffmann

[PATCH v2 37/39] .gitlab-ci.d/windows.yml: Display meson test logs

2022-09-20 Thread Bin Meng
From: Bin Meng When CI fails we don't know what causes the failure. Displaying the meson test logs can be helpful. Signed-off-by: Bin Meng --- Changes in v2: - new patch: Display meson test logs in the Windows CI .gitlab-ci.d/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH v3 3/6] accel/tcg: Suppress auto-invalidate in probe_access_internal

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:26, Richard Henderson wrote: > > When PAGE_WRITE_INV is set when calling tlb_set_page, > we immediately set TLB_INVALID_MASK in order to force > tlb_fill to be called on the next lookup. Here in > probe_access_internal, we have just called tlb_fill > and eliminated true

Re: [PATCH v3 2/6] accel/tcg: Drop addr member from SavedIOTLB

2022-09-20 Thread Peter Maydell
On Mon, 5 Sept 2022 at 21:27, Richard Henderson wrote: > > This field is only written, not read; remove it. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v4 1/7] tests/x86: Move common code to function in device-plug-test

2022-09-20 Thread Michael Labiuk via
Move common code for device removing to function. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 42 ++ 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index a1fb99

[PATCH v4 3/7] tests/x86: Add 'q35' machine type to ivshmem-test

2022-09-20 Thread Michael Labiuk via
Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk --- tests/qtest/ivshmem-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index 9611d05eb5..0f9755abc6 100644 ---

[PATCH v4 5/7] tests/x86: Add 'q35' machine type to override-tests in hd-geo-test

2022-09-20 Thread Michael Labiuk via
Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 105 +++--- 1 file changed, 98 insertions(+), 7 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 413cf964c0..58b1107d64 100644 --- a/tests/qtest/hd-geo-test.c +++ b/

Re: [kvm-unit-tests PATCH v4 07/12] arm: pmu: Basic event counter Tests

2022-09-20 Thread Zenghui Yu via
Hi Eric, On 2022/9/20 17:23, Eric Auger wrote: Hi Zenghui, On 9/19/22 16:30, Zenghui Yu wrote: Hi Eric, A few comments when looking through the PMU test code (2 years after the series was merged). Thank you for reviewing even after this time! Do you want to address the issues yourself and s

Re: [PATCH v4 for 7.2 00/22] virtio-gpio and various virtio cleanups

2022-09-20 Thread Alex Bennée
Stefan Hajnoczi writes: > [[PGP Signed Part:Undecided]] > On Fri, Sep 16, 2022 at 07:51:40AM +0100, Alex Bennée wrote: >> >> Alex Bennée writes: >> >> > Hi, >> > >> > This is an update to the previous series which fixes the last few >> > niggling CI failures I was seeing. >> > >> >Subjec

Re: [RFC PATCH] libvduse: Do not truncate terminating NUL character with strncpy()

2022-09-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > GCC 8 added a -Wstringop-truncation warning: > > The -Wstringop-truncation warning added in GCC 8.0 via r254630 for > bug 81117 is specifically intended to highlight likely unintended > uses of the strncpy function that truncate the terminating NUL > chara

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-20 Thread Markus Armbruster
Alistair Francis writes: > On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: >> >> SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to >> inherit from TYPE_MACHINE. This is an inconsistency which can cause >> undefined behavior such as memory corruption. >> >> Change S

Re: [PULL v3 00/20] tcg patch queue

2022-09-20 Thread Ilya Leoshkevich
On Tue, 2022-09-20 at 12:27 +0200, Thomas Huth wrote: > On 06/09/2022 10.37, Richard Henderson wrote: > > v2: Fix incorretly resolved rebase conflict in patch 16. > > v3: Work around clang preprocessor bug in patch 3. > > > > > > r~ > > > > > > The following changes since commit > > fd28528ece5

[PATCH] linux-user/host/s390: Add vector instructions to host_signal_write()

2022-09-20 Thread Ilya Leoshkevich
The new noexec test fails on s390x with "unexpected SEGV". This test overwrites code using libc's memcpy(), which uses VSTL instruction. host_signal_write() does not recognize it, which causes SEGV to be incorrectly forwarded to the test. Add all vector instructions that write to memory to host_si

  1   2   3   4   >