Re: [Qemu-devel] [RFC PATCH] Add qemu .clang-format

2022-08-30 Thread Wang, Lei
On 10/2/2015 1:30 AM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau clang-format is awesome to reflow your code according to qemu coding style in an editor (in the region you modify). (note: clang-tidy should be able to add missing braces around statements, but I haven't tried i

[PATCH REPOST] hw/i386/e820: remove legacy reserved entries for e820

2022-08-30 Thread Ani Sinha
e820 reserved entries were used before the dynamic entries with fw config files were intoduced. Please see the following change: 7d67110f2d9a6("pc: add etc/e820 fw_cfg file") Identical support was introduced into seabios as well with the following commit: ce39bd4031820 ("Add support for etc/e820 f

[PATCH] linux-user: fix bug about missing signum convert of sigqueue

2022-08-30 Thread fanwj
From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001 From: fanwenjie Date: Wed, 31 Aug 2022 11:55:25 +0800 Subject: [PATCH] linux-user: fix bug about missing signum convert of sigqueue Signed-off-by: fanwenjie --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH v2] pci: Assert that capabilities never overlap

2022-08-30 Thread Akihiko Odaki
pci_add_capability appears most PCI devices. Its error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the function - just ignoring The

Re: [PATCH] target/sh4: Fix TB_FLAG_UNALIGN

2022-08-30 Thread Yoshinori Sato
On Tue, 30 Aug 2022 01:10:29 +0900, Richard Henderson wrote: > > On 8/29/22 02:05, BALATON Zoltan wrote: > > On Sun, 28 Aug 2022, Richard Henderson wrote: > >> The value previously chosen overlaps GUSA_MASK. > >> > >> Cc: qemu-sta...@nongnu.org > >> Fixes: 4da06fb3062 ("target/sh4: Implement prct

Re: [PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on mprotect()

2022-08-30 Thread Ilya Leoshkevich
On Tue, 2022-08-23 at 15:05 -0700, Richard Henderson wrote: > From: Ilya Leoshkevich > > Currently it's possible to execute pages that do not have PAGE_EXEC > if there is an existing translation block. Fix by clearing > tb_jmp_cache > and invalidating TBs, which forces recheck of permission bits.

Re: [PATCH v7 13/20] accel/tcg: Document the faulting lookup in tb_lookup_cmp

2022-08-30 Thread Ilya Leoshkevich
On Tue, 2022-08-23 at 15:05 -0700, Richard Henderson wrote: > It was non-obvious to me why we can raise an exception in > the middle of a comparison function, but it works. > While nearby, use TARGET_PAGE_ALIGN instead of open-coding. > > Signed-off-by: Richard Henderson > --- >  accel/tcg/cpu-ex

[ANNOUNCE] QEMU 7.1.0 is now available

2022-08-30 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 7.1.0 release. This release contains 2800+ commits from 238 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at: h

Re: [PATCH v2 03/10] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory()

2022-08-30 Thread BALATON Zoltan
On Tue, 30 Aug 2022, Bernhard Beschow wrote: Unlike get_system_memory(), pci_address_space() respects the memory tree available to the parent device. I don't know if this is correct but likely nothing will use it so probably does not break anything. Regards, BALATON Zoltan Signed-off-by: B

Re: [PATCH v2 07/10] hw/isa/vt82c686: Instantiate PM function in host device

2022-08-30 Thread BALATON Zoltan
On Tue, 30 Aug 2022, Bernhard Beschow wrote: The PM controller has activity bits which monitor activity of other built-in devices in the host device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 2 +- hw/ppc/pegasos2.c | 3

Re: [PATCH v2 06/10] hw/isa/vt82c686: Instantiate USB functions in host device

2022-08-30 Thread BALATON Zoltan
On Tue, 30 Aug 2022, Bernhard Beschow wrote: The USB functions can be enabled/disabled through the ISA function. Also its interrupt routing can be influenced there. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 3 --- hw/ppc/pegasos2.c | 4 --

Re: [PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the VT82xx

Re: [PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the VT82xx

Re: [PATCH v2 10/10] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. IIUC, this is

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 18:18, Peter Xu wrote: On Tue, Aug 30, 2022 at 02:06:32PM +0200, Philippe Mathieu-Daudé wrote: On 27/8/22 20:59, Peter Xu wrote: Hi, Alberto, On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: Apply cache->xlat to addr before passing it to flatview_(read|write)_continue

QEMU 7.2 release schedule

2022-08-30 Thread Stefan Hajnoczi
Hi, Richard Henderson has tagged QEMU 7.1 and handed over to me for the 7.2 release cycle. Thanks to Richard and Michael Roth their work on 7.1! Please check the proposed release schedule and let me know if they fall on inconvenient dates: - 2022-08-30: Beginning of development phase - 2022-11-1:

Re: [RFC v4 01/11] blkio: add libblkio block driver

2022-08-30 Thread Stefan Hajnoczi
On Tue, Aug 30, 2022 at 09:30:16AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > > high-performance disk I/O. It currently supports io_uring, > > virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional

Re: [RFC v4 11/11] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-08-30 Thread Stefan Hajnoczi
On Thu, Aug 25, 2022 at 09:43:16AM +0200, David Hildenbrand wrote: > On 23.08.22 21:22, Stefan Hajnoczi wrote: > > On Tue, Aug 23, 2022 at 10:01:59AM +0200, David Hildenbrand wrote: > >> On 23.08.22 00:24, Stefan Hajnoczi wrote: > >>> Register guest RAM using BlockRAMRegistrar and set the > >>> BDR

Re: [PATCH] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read()

2022-08-30 Thread Christian A. Ehrhardt
Hi, Shameer: Thanks for bringing this to my attention. Some comments inline. On Tue, Aug 30, 2022 at 06:43:56AM +, Shameerali Kolothum Thodi wrote: > > > > -Original Message- > > From: Shameerali Kolothum Thodi > > Sent: 26 August 2022 13:15 > > To: 'Laszlo Ersek' ; qemu-devel@no

Re: [PATCH 4/9] hw/isa/vt82c686: QOM'ify via-ide creation

2022-08-30 Thread BB
Am 29. August 2022 20:12:21 MESZ schrieb BB : > > >Am 29. August 2022 19:04:06 MESZ schrieb BALATON Zoltan : >>On Mon, 29 Aug 2022, BB wrote: >>> Am 25. August 2022 01:18:56 MESZ schrieb BALATON Zoltan >>> : On Thu, 25 Aug 2022, Bernhard Beschow wrote: > On Wed, Aug 24, 2022 at 3:54 PM

[PATCH v2 08/10] hw/isa/vt82c686: Instantiate AC97 and MC97 functions in host device

2022-08-30 Thread Bernhard Beschow
The AC97 function's wakeup status is wired to the PM function and both the AC97 and MC97 interrupt routing is determined by the ISA function. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 16 hw/mips/fuloong2e.c | 4 hw/ppc/pegasos2.c | 5 - 3 files chan

[PATCH v2 02/10] hw/isa/vt82c686: Resolve unneeded attribute

2022-08-30 Thread Bernhard Beschow
Now that also the super io device is realized in the common realize method, the isa_bus attribute can be turned into a temporary. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/

[PATCH v2 01/10] hw/isa/vt82c686: Resolve chip-specific realize methods

2022-08-30 Thread Bernhard Beschow
The object creation now happens in chip-specific init methods which allows the realize methods to be consolidated into one method. Shifting the logic into the init methods has the addidional advantage that the parent object's init methods are called implicitly - like constructors in object-oriented

[PATCH v2 04/10] hw/isa/vt82c686: Reuse errp

2022-08-30 Thread Bernhard Beschow
Rather than terminating abruptly, make use of the already present errp and propagate the error to the caller. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 5582c0b179..37

[PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Bernhard Beschow
v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the VT82xx south bridges in the south bridges themsel

[PATCH v2 10/10] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-30 Thread Bernhard Beschow
According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c |

[PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation

2022-08-30 Thread Thomas Huth
The Windows jobs are currently aborting at weird places - and there's the suspicion that it's due to memory constraints in the Windows containers. Let's switch to single-threaded compilation to decrease the pressure on the memory load, and to make the job more deterministic for further investigatio

[PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports

2022-08-30 Thread Thomas Huth
In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later, let's use the new way for accessing the fi

[PULL 22/23] tests/qtest/ac97-test: Correct reference to driver

2022-08-30 Thread Thomas Huth
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20220829083301.143527-1-akihiko.od...@daynix.com> Signed-off-by: Thomas Huth --- tests/qtest/ac97-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/ac97-test.c b/t

[PATCH v2 09/10] hw/isa/vt82c686: Embed RTCState in host device

2022-08-30 Thread Bernhard Beschow
Embed the rtc in the host device, analoguous to the other child devices and analoguous to PIIX4. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 150e9401d0..0ef94463

[PULL 15/23] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The test cases 'test_{tx,rx}' call socketpair() which does not exist on win32. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-44-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/npcm7xx_emc-test.c | 8

[PULL 19/23] tests/avocado: Fix trivial typo

2022-08-30 Thread Thomas Huth
The intention was likely to use "intend" instead of "indent" here. Message-Id: <20220824080926.568935-1-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2 07/10] hw/isa/vt82c686: Instantiate PM function in host device

2022-08-30 Thread Bernhard Beschow
The PM controller has activity bits which monitor activity of other built-in devices in the host device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 2 +- hw/ppc/pegasos2.c | 3 +-- include/hw/isa/vt82c686.h | 2 -- 4 fi

[PULL 14/23] tests/qtest: machine-none-test: Use double quotes to pass the cpu option

2022-08-30 Thread Thomas Huth
From: Bin Meng Single quotes in the arguments (e.g.: -cpu 'qemu64,apic-id=0') are not removed in the Windows environment before it is passed to the QEMU executable. Such argument causes a failure in the QEMU CPU option parser codes. Change to use double quotes which works fine on all platforms.

[PATCH v2 06/10] hw/isa/vt82c686: Instantiate USB functions in host device

2022-08-30 Thread Bernhard Beschow
The USB functions can be enabled/disabled through the ISA function. Also its interrupt routing can be influenced there. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 12 hw/mips/fuloong2e.c | 3 --- hw/ppc/pegasos2.c | 4 3 files changed, 12 insertions(+), 7 del

[PULL 10/23] tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The test case 'test_migrate_fd_proto' calls socketpair() which does not exist on win32. Exclude it. The helper function wait_command_fd() is not needed anymore, hence exclude it too. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-

[PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available

2022-08-30 Thread Thomas Huth
Some avocado tests blindly assume that QEMU has been compiled with libslirp enabled and fail badly if it is missing. Add a proper check to cancel the tests in this case. Message-Id: <20220824151122.704946-6-th...@redhat.com> Acked-by: Samuel Thibault Signed-off-by: Thomas Huth --- tests/avocado

[PULL 16/23] tests/qtest: prom-env-test: Use double quotes to pass the prom-env option

2022-08-30 Thread Thomas Huth
From: Bin Meng Single quotes like -prom-env 'nvramrc=cafec0de 4000 l!' in the arguments are not removed in the Windows environment before it is passed to the QEMU executable. Such argument causes a failure in the QEMU prom-env option parser codes. Change to use double quotes which works fine on

[PATCH v2 05/10] hw/isa/vt82c686: Instantiate IDE function in host device

2022-08-30 Thread Bernhard Beschow
The IDE function is closely tied to the ISA function (e.g. the IDE interrupt routing happens there), so it makes sense that the IDE function is instantiated within the south bridge itself. Signed-off-by: Bernhard Beschow --- configs/devices/mips64el-softmmu/default.mak | 1 - hw/isa/Kconfig

[PULL 11/23] tests/qtest: libqos: Drop inclusion of

2022-08-30 Thread Thomas Huth
From: Xuzhou Cheng There is no in the Windows build environment. Actually this is not needed in the non-win32 builds too. Drop it. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Tested-by: Thomas Huth Message-Id: <20220824094029.1634519-25-bmeng...@gmail.com> Signed-off-by: Thomas Huth

[PULL 01/23] tests/qtest: Use g_setenv()

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a setenv() API, but glib does. Replace setenv() call with the glib version. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-2-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz.c | 8 ++

[PATCH v2 03/10] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory()

2022-08-30 Thread Bernhard Beschow
Unlike get_system_memory(), pci_address_space() respects the memory tree available to the parent device. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 9d12e1cae4..5582c0b179 10

[PULL 12/23] tests/qtest: libqos: Rename malloc.h to libqos-malloc.h

2022-08-30 Thread Thomas Huth
From: Xuzhou Cheng The qtest/libqos directory is included via the "-I" option to search for header files when building qtest. Unfortunately the malloc.h has a name conflict with the standard libc header, leading to a build failure on the Windows host, due to the MinGW libc stdlib.h header file in

[PULL 09/23] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng The request_{bios,pflash} test cases call mmap() which does not exist on win32. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-21-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/i440fx-test.c | 6 ++ 1 file

[PULL 08/23] tests/qtest: Build cases that use memory-backend-file for posix only

2022-08-30 Thread Thomas Huth
From: Bin Meng As backends/meson.build tells us, hostmem-file.c is only supported on POSIX platforms, hence any test case that utilizes the memory backend file should be guarded by CONFIG_POSIX too. Signed-off-by: Bin Meng Acked-by: Thomas Huth Message-Id: <20220824094029.1634519-19-bmeng...@g

[PULL 20/23] docs/devel/testing: fix minor typo

2022-08-30 Thread Thomas Huth
From: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Message-Id: <421fb28678d1077c0b14978e359b4e1469cc0168.1661262376.git.quic_mathb...@quicinc.com> Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng There is no tm_gmtoff member in 'struct tm' on Windows. Update rtc-test.c and m48t59-test.c accordingly. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-16-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/m48t59-test.c | 2 +-

[PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32

2022-08-30 Thread Thomas Huth
From: Bin Meng These headers and macros do not exist on Windows. Exclude them. Signed-off-by: Bin Meng Reviewed-by: Stefan Berger Message-Id: <20220824094029.1634519-15-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- backends/tpm/tpm_ioctl.h | 4 1 file changed, 4 insertions(+) diff

[PULL 17/23] tests/vm: Add libslirp to the VM tests

2022-08-30 Thread Thomas Huth
We are going to remove the slirp submodule from the QEMU repository, so we should make sure to install the distro's libslirp to get the same test coverage as before in the VMs. Message-Id: <20220824151122.704946-3-th...@redhat.com> Acked-by: Samuel Thibault Signed-off-by: Thomas Huth --- tests/

[PULL 04/23] tests/qtest: migration-test: Handle link() for win32

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a link() API like POSIX. Instead it provides a similar API CreateHardLink() that does the same thing, but with different argument order and return value. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-14-b

[PULL 03/23] tests: Use g_mkdir_with_parents()

2022-08-30 Thread Thomas Huth
From: Bin Meng Use the same g_mkdir_with_parents() call to create a directory on all platforms. Signed-off-by: Bin Meng Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-13-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/migration/stress.c | 2 +-

[PULL 13/23] tests/qtest: device-plug-test: Reverse the usage of double/single quotes

2022-08-30 Thread Thomas Huth
From: Bin Meng The usage of double/single quotes in test_pci_unplug_json_request() should be reversed to work on both win32 and non-win32 platforms: - The value of -device parameter needs to be surrounded by "" as Windows does not drop '' when passing it to QEMU which causes QEMU command lin

[PULL 07/23] tests/qtest: Build e1000e-test for posix only

2022-08-30 Thread Thomas Huth
From: Bin Meng The whole e1000e-test test case relies on socketpair() which does not exist on win32. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-17-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 4 +++- 1 file changed, 3

[PULL 02/23] tests/qtest: Use g_mkdtemp()

2022-08-30 Thread Thomas Huth
From: Bin Meng Windows does not provide a mkdtemp() API, but glib does. Replace mkdtemp() call with the glib version. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Message-Id: <20220824094029.1634519-3-bmeng...@gmail.com> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz_config

[PULL 00/23] First testing patches for QEMU 7.2

2022-08-30 Thread Thomas Huth
Hi Peter, hi Richard, sorry for flooding you with so many pull request mails right after QEMU 7.1 has been tagged, but I'll be away from keyboard starting tomorrow, and I still wanted to get these out before I'm away... The following changes since commit 9a99f964b152f8095949bbddca7841744ad418da:

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-30 Thread Alex Williamson
On Tue, 30 Aug 2022 13:37:35 +0200 Markus Armbruster wrote: >if (!offset) { >offset = pci_find_space(pdev, size); >/* out of PCI config space is programming error */ >assert(offset); >} else { >/* Verify that capabilities don't overla

[PULL 2/6] s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

2022-08-30 Thread Thomas Huth
From: Christian Borntraeger Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.1 and older. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Message-Id: <20220727135120.12784-1-borntrae...@linux.ibm.com> Acked-by:

[PULL 4/6] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-30 Thread Thomas Huth
It is currently not possible yet to use "memory-backend-memfd" on s390x with hugepages enabled. This problem is caused by qemu_maxrampagesize() not taking memory-backend-memfd objects into account yet, so the code in s390_memory_init() fails to enable the huge page support there via s390_set_max_pa

[PULL 5/6] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-30 Thread Thomas Huth
Now that host_memory_backend_pagesize() is not depending on the hugetlb memory path handling anymore, we can also remove the #ifdef and the TOCTTOU comment from the calling functions - the code should now work equally well on all host architectures. Message-Id: <20220810125720.3849835-3-th...@redh

[PULL 0/6] First s390x updates for QEMU 7.2

2022-08-30 Thread Thomas Huth
Hi Richard, hi Peter! The following changes since commit 9a99f964b152f8095949bbddca7841744ad418da: Update version for v7.1.0-rc4 release (2022-08-24 19:27:56 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/s390x-pull-request-2022-08-30 for you to fetc

[PULL 3/6] target/s390x: Fix CLFIT and CLGIT immediate size

2022-08-30 Thread Thomas Huth
From: Ilya Leoshkevich I2 is 16 bits, not 32. Found by running valgrind's none/tests/s390x/traps. Fixes: 1c2687518235 ("target-s390: Implement COMPARE AND TRAP") Signed-off-by: Ilya Leoshkevich Message-Id: <20220817161529.597414-1-...@linux.ibm.com> Reviewed-by: David Hildenbrand Signed-off-b

[PULL 6/6] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-30 Thread Thomas Huth
The last user of this function has just been removed, so we can drop this function now, too. Message-Id: <20220810125720.3849835-4-th...@redhat.com> Reviewed-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Signed-off-by: Thomas Huth --- include/qemu/mmap-alloc.h | 2 -- util/mmap-alloc.c

[PULL 1/6] hw: Add compat machines for 7.2

2022-08-30 Thread Thomas Huth
From: Cornelia Huck Add 7.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michael S. Tsirkin Message-Id: <20220727121755.395894-1-coh...@redhat.com> [thuth: fixed conflict with pcmc->legacy_no_rng_seed] Signed

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Peter Xu
On Tue, Aug 30, 2022 at 02:06:32PM +0200, Philippe Mathieu-Daudé wrote: > On 27/8/22 20:59, Peter Xu wrote: > > Hi, Alberto, > > > > On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: > > > Apply cache->xlat to addr before passing it to > > > flatview_(read|write)_continue(), to conver

[PATCH v1 09/16] qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event

2022-08-30 Thread Victor Toso
Example output is missing a ',' delimiter and it has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/qdev.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/qd

[PATCH v1 13/16] qapi: fix example of query-hotpluggable-cpus command

2022-08-30 Thread Victor Toso
The example return type has the wrong member name. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json in

[PATCH v1 10/16] qapi: fix example of MEM_UNPLUG_ERROR event

2022-08-30 Thread Victor Toso
Example output was missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5f1f

[PATCH v1 07/16] qapi: fix example of BLOCK_JOB_READY event

2022-08-30 Thread Victor Toso
Example output is missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json in

[PATCH v1 12/16] qapi: fix example of blockdev-add command

2022-08-30 Thread Victor Toso
The example output is setting optional member "backing" with null. This has no runtime impact. Remove it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/block-core.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH v1 05/16] qapi: fix example of query-dump-guest-memory-capability command

2022-08-30 Thread Victor Toso
Example output is missing closing curly brackets. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/dump.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/dump.json b/qapi/dump.json index 90859c5483..22971a991

[PATCH v1 06/16] qapi: fix example of query-blockstats command

2022-08-30 Thread Victor Toso
Example output is missing several ',' delimiter between members. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/block-core.json | 32 1 file changed, 16 insertions(+), 16 deletions(-)

[PATCH v1 16/16] RFC: add a generator for qapi's examples

2022-08-30 Thread Victor Toso
The goal of this generator is to validate QAPI examples and transform them into a format that can be used for 3rd party applications to validate their QAPI/QMP introspection. For each Example section, we parse server and client messages into a python dictionary. This step alone has found several i

[PATCH v1 11/16] qapi: fix examples of blockdev-add with qcow2

2022-08-30 Thread Victor Toso
The examples use "qcow2" driver with the wrong member name for BlockdevRef alternate type. This patch changes all wrong member names from "file" to "data-file" which is the correct member name in BlockdevOptionsQcow2 for the BlockdevRef field. Problem was noticed when using the example as a test c

[PATCH v1 15/16] qapi: fix examples of events missing timestamp

2022-08-30 Thread Victor Toso
I've used real timestamp and changing them one by one so they would not be all equal. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-)

[PATCH v1 03/16] qapi: fix example of query-spice command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/u

[PATCH v1 08/16] qapi: fix example of NIC_RX_FILTER_CHANGED event

2022-08-30 Thread Victor Toso
Example output has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/net.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index 75ba2cb9

[PATCH v1 04/16] qapi: fix example of query-rocker-of-dpa-flows command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter and a foreign comment format. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/rocker.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/rocker.json

[PATCH v1 14/16] qapi: fix example of query-migrate command

2022-08-30 Thread Victor Toso
The example's return type has several missing mandatory member names. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso --- qapi/migration.json | 56 + 1 file changed, 52 insertions(+), 4 del

[PATCH v1 00/16] qapi examples fixes and rfc for another generator

2022-08-30 Thread Victor Toso
Hi, I've been using the examples as a way to test the qapi-go proposal [0] and I thought it would be neat to have a way to parse those examples and regenerate them in a way that we could use for testing. The first 10 patches are fixes to issues found when loading the Example into python's json li

[PATCH v1 02/16] qapi: fix example of query-vnc command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter in member "websocket" and it lacks it in "family" member. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/ui.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v1 01/16] qapi: fix example of query-ballon command

2022-08-30 Thread Victor Toso
Example output has an extra ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 6af

Re: [PATCH v4 3/4] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-08-30 Thread Alistair Francis
On Tue, Aug 30, 2022 at 2:37 PM Philippe Mathieu-Daudé via wrote: > > On 23/8/22 08:12, Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > > > This patch adds the `rw1c` functionality to the respective > > registers. The status fields are cleared when the respective > > field is set. > > > > Si

Re: [PATCH 2/2] util/log: add timestamp to logs via qemu_log()

2022-08-30 Thread Richard Henderson
On 8/30/22 04:09, Markus Armbruster wrote: Dongli Zhang writes: The qemu_log is very helpful for diagnostic. Add the timestamp to the log when it is enabled (e.g., "-msg timestamp=on"). While there are many other places that may print to log file, this patch is only for qemu_log(), e.g., the

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

2022-08-30 Thread Sam Li
Markus Armbruster 于2022年8月30日周二 23:09写道: > > Sam Li writes: > > > Markus Armbruster 于2022年8月30日周二 19:57写道: > >> > >> Sam Li writes: > >> > >> > By adding zone management operations in BlockDriver, storage controller > >> > emulation can use the new block layer APIs including Report Zone and > >

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

2022-08-30 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2022年8月30日周二 19:57写道: >> >> Sam Li writes: >> >> > By adding zone management operations in BlockDriver, storage controller >> > emulation can use the new block layer APIs including Report Zone and >> > four zone management operations (open, close, finish, res

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

2022-08-30 Thread Sam Li
Markus Armbruster 于2022年8月30日周二 19:57写道: > > Sam Li writes: > > > By adding zone management operations in BlockDriver, storage controller > > emulation can use the new block layer APIs including Report Zone and > > four zone management operations (open, close, finish, reset). > > > > Add zoned st

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Peter Xu
On Sat, Aug 27, 2022 at 10:22:18AM +0200, Paolo Bonzini wrote: > The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If > the read of the fields are not ordered after the read of the flag, > QEMU might see stale values. > > Cc: Peter Xu > Cc: Gavin Shan > Signed-off-by: Paolo Bonzin

Re: [PATCH] tpm_crb: Avoid backend startup just before shutdown under Xen

2022-08-30 Thread Stefan Berger
On 8/30/22 09:51, Ross Lagerwall wrote: From: Stefan Berger Sent: Friday, August 26, 2022 5:27 PM To: Ross Lagerwall ; Stefan Berger Cc: qemu-devel@nongnu.org Subject: Re: [PATCH] tpm_crb: Avoid backend startup just before shutdown under Xen On 8/26/22 12:15, Ross Lagerwall wrote: Fro

Re: [PATCH v5 12/18] dump/dump: Add section string table support

2022-08-30 Thread Janosch Frank
On 8/30/22 13:35, Steffen Eiden wrote: Hi Janosch, On 8/11/22 14:11, Janosch Frank wrote: As sections don't have a type like the notes do we need another way to determine their contents. The string table allows us to assign each section an identification string which architectures can then use

Re: [RFC PATCH 4/4] target/riscv: Support Ventana disassemble

2022-08-30 Thread LIU Zhiwei
Hi Alistair, Thanks for your comments. On 2022/8/30 17:03, Alistair Francis wrote: On Wed, Aug 24, 2022 at 5:37 PM LIU Zhiwei wrote: Pass through the custom information to disassemble by the target_info field. In disassemble, select the decode path according to the custom extension. Signed-o

Re: [PATCH 1/2] target/arm: Remove useless TARGET_BIG_ENDIAN check in armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Arm system emulation targets always have TARGET_BIG_ENDIAN clear, so there is no need to have handling in armv7m_load_kernel() for the case when it is defined. Remove the unnecessary code. Side notes: * our M-profile implementation is always little-endia

Re: [PATCH v4 3/4] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 08:12, Wilfred Mallawa wrote: From: Wilfred Mallawa This patch adds the `rw1c` functionality to the respective registers. The status fields are cleared when the respective field is set. Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- hw/ssi/ibex_spi_host.c

Re: [PATCH 40/51] chardev/char-file: Add FILE_SHARE_WRITE when openning the file for win32

2022-08-30 Thread Marc-André Lureau
Hi On Sun, Aug 28, 2022 at 3:19 AM Bin Meng wrote: > On Fri, Aug 26, 2022 at 9:23 PM Marc-André Lureau > wrote: > > > > Hi > > > > On Fri, Aug 26, 2022 at 5:16 PM Bin Meng wrote: > >> > >> On Thu, Aug 25, 2022 at 3:59 PM Marc-André Lureau > >> wrote: > >> > > >> > Hi > >> > > >> > On Wed, Aug

Re: [PATCH 2/2] target/arm: Make boards pass base address to armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Currently armv7m_load_kernel() takes the size of the block of memory where it should load the initial guest image, but assumes that it should always load it at address 0. This happens to be true of all our M-profile boards at the moment, but it isn't guaran

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

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: 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 Rev

Re: [PATCH v3 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng Fix the logic in qemu_add_wait_object() to avoid adding the same HANDLE twice, as the behavior is undefined when passing an array that contains same HANDLEs to WaitForMultipleObjects() API. Signed-off-by: Bin Meng --- Changes in v3: - new patc

Re: [PATCH 0/7] configure: fix misc shellcheck warnings

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:06, Peter Maydell wrote: Currently if you run shellcheck on our configure script it generates a ton of warnings. This patchset fixes some of the easier ones. I wasn't aiming for completeness or consistency; I just wanted to zap some of the ones where the fix is clear and didn't take

Re: [PATCH 5/7] configure: Remove use of backtick `...` syntax

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1

Re: [PATCH 6/7] configure: Check mkdir result directly, not via $?

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: Shellcheck warns that we have one place where we run a command and then check if it failed using $?; this is better written to simply check the command in the 'if' statement directly. It is also safer, in case someone add another command between the two li

Re: [PATCH 4/7] configure: Add './' on front of glob of */config-devices.mak.d

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Interesting, TIL. Reviewed-by: Philippe Mathieu-Daudé Fix this by adding './'. Signed-o

  1   2   >