Re: [PATCH v3 0/3] Trivial cleanups

2023-06-05 Thread Bernhard Beschow
Am 1. Juni 2023 12:45:47 UTC schrieb Mark Cave-Ayland : >On 01/06/2023 13:07, Michael S. Tsirkin wrote: > >> On Thu, May 25, 2023 at 05:03:15PM +0100, Mark Cave-Ayland wrote: >>> On 23/05/2023 20:56, Bernhard Beschow wrote: >>> This series: * Removes dead code from omap_uart and i823

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-05 Thread Bernhard Beschow
Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow : > > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini >: >>On Sat, 13 May 2023, Bernhard Beschow wrote: >>> Am 21. April 2023 07:38:10 UTC schrieb "Michael S. Tsirkin" >>> : >>> >On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard B

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Thomas Huth
On 02/06/2023 18.34, Thomas Huth wrote: There is no need to disable this useful compiler warning for all versions of the SDL. Unfortunately, various versions are buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are broken, too, see https://github.com/libsdl-org/SDL/issues/6619 ), but we can

[PATCH] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Himanshu Chauhan
On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. Fixes: 90b1fafce06 ("target/riscv: Smepmp: Skip applying default rules when address matches") Signed-off-by: Himanshu Chauhan --- target/riscv/pmp.c | 5 +++-- 1 file change

[PATCH 0/2] Fix venv issues with Avocado by reverting to an older version

2023-06-05 Thread Paolo Bonzini
Bumping avocado to version 101 has two issues. First, there are problems where Avocado is not logging of command lines or terminal output, and not collecting Python logs outside the avocado namespace. Second, the recent changes to Python handling mean that there is a single virtual environment fo

[PATCH 1/2] Revert "tests/requirements.txt: bump up avocado-framework version to 101.0"

2023-06-05 Thread Paolo Bonzini
This reverts commit ec5ffa0056389c3c10ea2de1e78366f66f4e5abc. Bumping avocado to version 101 has two issues. First, there are problems where Avocado is not logging of command lines or terminal output, and not collecting Python logs outside the avocado namespace. Second, the recent changes to Pyt

[PATCH 2/2] tests: update avocado installation to use mkvenv

2023-06-05 Thread Paolo Bonzini
The recent changes to Python handling mean that there is a single virtual environment for all the build, instead of a separate one for testing. Because this virtual environment will often have system site packages available, it makes sense to use mkvenv.py to install avocado, which will avoid using

Re: [PATCH v2 2/2] net: Update MemReentrancyGuard for NIC

2023-06-05 Thread Alexander Bulekov
On 230601 1218, Akihiko Odaki wrote: > Recently MemReentrancyGuard was added to DeviceState to record that the > device is engaging in I/O. The network device backend needs to update it > when delivering a packet to a device. > > This implementation follows what bottom half does, but it does not a

Re: [RFC 0/7] vhost-vdpa: add support for iommufd

2023-06-05 Thread Cindy Lu
On Mon, Jun 5, 2023 at 1:41 PM Michael S. Tsirkin wrote: > > On Fri, May 05, 2023 at 02:29:23PM +0800, Cindy Lu wrote: > > On Fri, May 5, 2023 at 11:29 AM Jason Wang wrote: > > > > > > Hi Cindy > > > > > > On Wed, May 3, 2023 at 5:13 PM Cindy Lu wrote: > > > > > > > > Hi All > > > > There is the

Re: [PATCH v2 1/2] net: Provide MemReentrancyGuard * to qemu_new_nic()

2023-06-05 Thread Alexander Bulekov
On 230601 1218, Akihiko Odaki wrote: > Recently MemReentrancyGuard was added to DeviceState to record that the > device is engaging in I/O. The network device backend needs to update it > when delivering a packet to a device. > > In preparation for such a change, add MemReentrancyGuard * as a > pa

Re: [PATCH 0/3] meson.build: Group some entries in separate summary sections

2023-06-05 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v3] qcow2: add discard-no-unref option

2023-06-05 Thread Jean-Louis Dupond
When we for example have a sparse qcow2 image and discard: unmap is enabled, there can be a lot of fragmentation in the image after some time. Especially on VM's that do a lot of writes/deletes. This causes the qcow2 image to grow even over 110% of its virtual size, because the free gaps in the im

Re: [PATCH v2] qcow2: add discard-no-unref option

2023-06-05 Thread Jean-Louis Dupond
On 2/06/2023 17:28, Hanna Czenczek wrote: On 02.06.23 14:47, Jean-Louis Dupond wrote: When we for example have a sparse qcow2 image and discard: unmap is enabled, there can be a lot of fragmentation in the image after some time. Especially on VM's that do a lot of writes/deletes. This causes

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Thomas Huth
On 05/06/2023 10.27, Paolo Bonzini wrote: Queued, thanks. Please unqueue it again, I'm still seeing some issues with the patch (not sure why yet): https://gitlab.com/thuth/qemu/-/jobs/4411089009 Thomas

Re: [PATCH v3] qcow2: add discard-no-unref option

2023-06-05 Thread Hanna Czenczek
On 05.06.23 10:45, Jean-Louis Dupond wrote: When we for example have a sparse qcow2 image and discard: unmap is enabled, there can be a lot of fragmentation in the image after some time. Especially on VM's that do a lot of writes/deletes. This causes the qcow2 image to grow even over 110% of its

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Daniel P . Berrangé
On Fri, Jun 02, 2023 at 06:34:52PM +0200, Thomas Huth wrote: > There is no need to disable this useful compiler warning for > all versions of the SDL. Unfortunately, various versions are > buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are > broken, too, see https://github.com/libsdl-org/SD

[PATCH v2 06/11] block: Fix AioContext locking in bdrv_reopen_parse_file_or_backing()

2023-06-05 Thread Kevin Wolf
bdrv_set_file_or_backing_noperm() requires the caller to hold the AioContext lock for the child node, but we hold the one for the parent node in bdrv_reopen_parse_file_or_backing(). Take the other one temporarily. Signed-off-by: Kevin Wolf --- block.c | 35 +-- 1

[PATCH v2 00/11] block: Re-enable the graph lock

2023-06-05 Thread Kevin Wolf
This series fixes the deadlock that was observed before commit ad128dff ('graph-lock: Disable locking for now'), which just disabled the graph lock completely as a workaround to get 8.0.1 stable. In theory the problem is simple: We can't poll while still holding the lock of a different AioContext.

[PATCH v2 08/11] block: Fix AioContext locking in bdrv_open_backing_file()

2023-06-05 Thread Kevin Wolf
bdrv_set_backing() requires the caller to hold the AioContext lock for @backing_hd. Take it in bdrv_open_backing_file() before calling the function. Signed-off-by: Kevin Wolf --- block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block.c b/block.c index 954b9923d9..d5f8231f31 10064

[PATCH v2 10/11] graph-lock: Unlock the AioContext while polling

2023-06-05 Thread Kevin Wolf
If the caller keeps the AioContext lock for a block node in an iothread, polling in bdrv_graph_wrlock() deadlocks if the condition isn't fulfilled immediately. Now that all callers make sure to actually have the AioContext locked when they call bdrv_replace_child_noperm() like they should, we can

[PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Kevin Wolf
Now that bdrv_graph_wrlock() temporarily drops the AioContext lock that its caller holds, it can poll without causing deadlocks. We can now re-enable graph locking. This reverts commit ad128dff0bf4b6f971d05eb4335a627883a19c1d. Signed-off-by: Kevin Wolf --- block/graph-lock.c | 25 --

[PATCH v2 05/11] block: Fix AioContext locking in bdrv_attach_child_common()

2023-06-05 Thread Kevin Wolf
The function can move the child node to a different AioContext. In this case, it also must take the AioContext lock for the new context before calling functions that require the caller to hold the AioContext for the child node. Signed-off-by: Kevin Wolf --- block.c | 21 - 1

[PATCH v2 01/11] iotests: Test active commit with iothread and background I/O

2023-06-05 Thread Kevin Wolf
This is a better regression test for the bugs hidden by commit 80fc5d26 ('graph-lock: Disable locking for now'). With that commit reverted, it hangs instantaneously and reliably for me. It is important to have a reliable test like this, because the following commits will set out to fix the actual

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Thomas Huth
On 05/06/2023 10.53, Daniel P. Berrangé wrote: On Fri, Jun 02, 2023 at 06:34:52PM +0200, Thomas Huth wrote: There is no need to disable this useful compiler warning for all versions of the SDL. Unfortunately, various versions are buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are broken,

[PATCH v2 09/11] blockjob: Fix AioContext locking in block_job_add_bdrv()

2023-06-05 Thread Kevin Wolf
bdrv_root_attach_child() requires callers to hold the AioContext lock for child_bs. Take it in block_job_add_bdrv() before calling the function. Signed-off-by: Kevin Wolf --- blockjob.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/blockjob.c b/blockjob.c

[PATCH v2 04/11] block: Fix AioContext locking in bdrv_open_child()

2023-06-05 Thread Kevin Wolf
bdrv_attach_child() requires that the caller holds the AioContext lock for the new child node. Take it in bdrv_open_child() and document that the caller must not hold any AioContext apart from the main AioContext. Signed-off-by: Kevin Wolf --- block.c | 13 +++-- 1 file changed, 11 inser

[PATCH v2 03/11] test-block-iothread: Lock AioContext for blk_insert_bs()

2023-06-05 Thread Kevin Wolf
blk_insert_bs() requires that callers hold the AioContext lock for the node that should be inserted. Take it. Signed-off-by: Kevin Wolf --- tests/unit/test-block-iothread.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/test-block-iothread.c b/tests/unit/tes

[PATCH v2 07/11] block: Fix AioContext locking in bdrv_open_inherit()

2023-06-05 Thread Kevin Wolf
bdrv_open_inherit() calls several functions for which it needs to hold the AioContext lock, but currently doesn't. This includes calls in bdrv_append_temp_snapshot(), for which bdrv_open_inherit() is the only caller. Fix the locking in these places. Signed-off-by: Kevin Wolf --- block.c | 25 +++

[PATCH v2 02/11] qdev-properties-system: Lock AioContext for blk_insert_bs()

2023-06-05 Thread Kevin Wolf
blk_insert_bs() requires that callers hold the AioContext lock for the node that should be inserted. Take it. Signed-off-by: Kevin Wolf --- hw/core/qdev-properties-system.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Paolo Bonzini
On 6/5/23 10:47, Thomas Huth wrote: On 05/06/2023 10.27, Paolo Bonzini wrote: Queued, thanks. Please unqueue it again, I'm still seeing some issues with the patch (not sure why yet): https://gitlab.com/thuth/qemu/-/jobs/4411089009 Yeah, noticed that myself now. :) Paolo

Re: [PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Paolo Bonzini
On 6/5/23 10:57, Kevin Wolf wrote: void bdrv_graph_rdlock_main_loop(void) @@ -296,18 +276,13 @@ void assert_bdrv_graph_readable(void) { /* reader_count() is slow due to aio_context_list_lock lock contention */ /* TODO Reenable when wrlock is reenabled */ There's still a TODO her

Re: [PATCH] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Weiwei Li
On 2023/6/5 15:51, Himanshu Chauhan wrote: On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. Fixes: 90b1fafce06 ("target/riscv: Smepmp: Skip applying default rules when address matches") Signed-off-by: Himanshu Chauhan -

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-06-05 Thread Nicholas Piggin
On Tue May 30, 2023 at 12:05 AM AEST, Fabiano Rosas wrote: > "Nicholas Piggin" writes: > > > On Tue May 23, 2023 at 2:02 AM AEST, Narayana Murty N wrote: > >> Changes since V2: > >> commit message modified as per feedbak from Nicholas Piggin. > >> Changes since V1: > >> https://lore.kernel.org/qem

Re: [PULL 31/35] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit()

2023-06-05 Thread Peter Maydell
On Sat, 3 Jun 2023 at 19:06, Guenter Roeck wrote: > > On 6/3/23 10:46, Michael Tokarev wrote: > > 03.06.2023 18:03, Guenter Roeck wrote: > >> Hi, > >> > >> On Tue, May 02, 2023 at 01:14:55PM +0100, Peter Maydell wrote: > >>> The Allwinner PIC model uses set_bit() and clear_bit() to update the > >>

Re: [PATCH 0/2] Fix venv issues with Avocado by reverting to an older version

2023-06-05 Thread Peter Maydell
On Mon, 5 Jun 2023 at 08:58, Paolo Bonzini wrote: > > Bumping avocado to version 101 has two issues. First, there are problems > where Avocado is not logging of command lines or terminal output, and not > collecting Python logs outside the avocado namespace. > > Second, the recent changes to Pyth

Re: [PATCH v2] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Paolo Bonzini
On 6/5/23 11:05, Paolo Bonzini wrote: On 05/06/2023 10.27, Paolo Bonzini wrote: Queued, thanks. Please unqueue it again, I'm still seeing some issues with the patch (not sure why yet): https://gitlab.com/thuth/qemu/-/jobs/4411089009 Yeah, noticed that myself now. 😄 I think all you nee

[PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps

2023-06-05 Thread Paolo Bonzini
Unlike other subprojects, these require an overlay directory to include meson rules to build the libraries. The rules are basically lifted from tests/fp/meson.build, with a few changes to create platform.h and publish a dependency. The build defines are passed through a subproject option, and pos

[PATCH 04/10] build: log submodule update from git-submodule.sh

2023-06-05 Thread Paolo Bonzini
Print exactly which submodules have been updated, by reusing the logic of "git-submodule.sh validate" after executing "git submodule update --init'. Signed-off-by: Paolo Bonzini --- Makefile | 4 +--- scripts/git-submodule.sh | 16 +++- 2 files changed, 12 insertions

[PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw

2023-06-05 Thread Paolo Bonzini
Move the handling of the roms/SLOF submodule out of the main Makefile, since we are going to remove submodules from the build process of QEMU. Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 2 +- configure | 7 +++ pc-bios/s390-ccw/Makefile

[PATCH 03/10] git-submodule: allow partial update of .git-submodule-status

2023-06-05 Thread Paolo Bonzini
Allow a specific subdirectory to run git-submodule.sh with only a subset of submodules, without removing the others from the .git-submodule-status file. This also allows scripts/git-submodule.sh to be more lenient: validating an empty set of submodules is not a mistake. Signed-off-by: Paolo Bonzi

[PATCH 09/10] build: remove git submodule handling from main makefile

2023-06-05 Thread Paolo Bonzini
The only remaining user of submodules at build time is roms/SLOF, which is handled in pc-bios/s390-ccw/Makefile. Remove the relevant code from the main makefile. Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 3 +-- Makefile| 10 -- c

[PATCH 05/10] meson: subprojects: replace submodules with wrap files

2023-06-05 Thread Paolo Bonzini
Compared to submodules, .wrap files have several advantages: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a magic entry in the git tree object * we could stop shipping external dependencies that are only used as a fallback, but not b

[PATCH v2 00/10] meson: replace submodules with wrap files

2023-06-05 Thread Paolo Bonzini
This series replaces git submodules for bundled libraries with .wrap files that can be used directly by meson for subprojects. These have several advantages, either immediate or potential: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a m

[PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-06-05 Thread Paolo Bonzini
The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control both cases. Now, --enable-slirp will trigger c

[PATCH 07/10] pc-bios/s390-ccw: always build network bootloader

2023-06-05 Thread Paolo Bonzini
In the beginning, the network bootloader was considered experimental and thus optional, but it is well established nowadays and configure always checks for roms/SLOF before compiling pc-bios/s390-ccw. Therefore, it makes sense to always build it together with the other part of the s390-ccw bios.

[PATCH 10/10] configure: remove --with-git-submodules=

2023-06-05 Thread Paolo Bonzini
Reuse --enable/--disable-download to control git submodules as well. Adjust the error messages of git-submodule.sh to refer to the new option. Signed-off-by: Paolo Bonzini --- configure | 40 +-- .../ci/org.centos/stream/8/x86_64/configure |

[PATCH 01/10] configure: remove --with-git= option

2023-06-05 Thread Paolo Bonzini
The scenario for which --with-git= was introduced was to use a SOCKS proxy such as tsocks. However, this was back in 2017 when QEMU's submodules used the git:// protocol, and it is not as important when using the "smart HTTP" backend; for example, neither "meson subprojects download" nor scripts/c

[PATCH v3 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-05 Thread Yuquan Wang
The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this uses XHCI to provide a usb controller with 64-bit DMA capablity instead of EHCI. Signed-off-by: Yuquan Wang --- hw/arm/sbsa-ref.c | 21 -

[PATCH v3 0/1] use XHCI to replace EHCI

2023-06-05 Thread Yuquan Wang
Please review the change. - sbsa-ref: Replace EHCI with XHCI on sysbus. Yuquan Wang (1): hw/arm/sbsa-ref: use XHCI to replace EHCI hw/arm/sbsa-ref.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) -- 2.34.1

Re: [PATCH v3 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-05 Thread Marcin Juszkiewicz
W dniu 5.06.2023 o 11:55, Yuquan Wang pisze: The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this uses XHCI to provide a usb controller with 64-bit DMA capablity instead of EHCI. Signed-off-by: Yuquan Wang C

Re: [PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Kevin Wolf
Am 05.06.2023 um 11:06 hat Paolo Bonzini geschrieben: > On 6/5/23 10:57, Kevin Wolf wrote: > > void bdrv_graph_rdlock_main_loop(void) > > @@ -296,18 +276,13 @@ void assert_bdrv_graph_readable(void) > > { > > /* reader_count() is slow due to aio_context_list_lock lock > > contention */ >

Re: [PATCH] scripts: remove dead file

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 23:43, Paolo Bonzini wrote: scripts/test-driver.py was used when "make check" was already using meson introspection data, but it did not execute "meson test". It is dead since commit 3d2f73ef75e ("build: use "meson test" as the test harness", 2021-12-23). Signed-off-by: Paolo Bonzini

Re: [PATCH v3 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-05 Thread wangyuquan1236
Sure,but I am handling the email problem with de...@edk2.groups.io that it refused my patch email. I will deal with it as soon as possible. Replied Message FromMarcin JuszkiewiczDate06/05/2023 17:59 ToYuquan Wang,r...@semihalf.com,peter.mayd...@linaro.org Ccquic_llind...@quicinc.com,chenba.

Re: [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 20:12, Mark Cave-Ayland wrote: On 03/06/2023 19:07, Mark Cave-Ayland wrote: On 31/05/2023 21:35, Philippe Mathieu-Daudé wrote: Introduce the ARM_TIMER sysbus device. arm_timer_new() is converted as QOM instance init()/finalize() handlers. Note in arm_timer_finalize() we release a p

Re: [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 20:07, Mark Cave-Ayland wrote: On 31/05/2023 21:35, Philippe Mathieu-Daudé wrote: Introduce the ARM_TIMER sysbus device. arm_timer_new() is converted as QOM instance init()/finalize() handlers. Note in arm_timer_finalize() we release a ptimer handle which was previously leaked. ArmT

Re: [PATCH 01/10] configure: remove --with-git= option

2023-06-05 Thread Alex Bennée
Paolo Bonzini writes: > The scenario for which --with-git= was introduced was to use a SOCKS proxy > such as tsocks. However, this was back in 2017 when QEMU's submodules > used the git:// protocol, and it is not as important when using the > "smart HTTP" backend; for example, neither "meson s

Re: [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-06-05 Thread Alex Bennée
Paolo Bonzini writes: > The behavior of --{enable,disable}-pypi is similar to that of > -Dwrapmode={default,nodownload} respectively. In particular, > in both cases a feature needs to be explicitly enabled for the > dependency to be downloaded. > > So, use a single option to control both cases

Re: [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER

2023-06-05 Thread Peter Maydell
On Mon, 5 Jun 2023 at 11:20, Philippe Mathieu-Daudé wrote: > > On 3/6/23 20:07, Mark Cave-Ayland wrote: > > On 31/05/2023 21:35, Philippe Mathieu-Daudé wrote: > > > >> Introduce the ARM_TIMER sysbus device. > >> > >> arm_timer_new() is converted as QOM instance init()/finalize() > >> handlers. Not

Re: [RFC PATCH 5/5] spapr: Allow up to 8 threads SMT configuration

2023-06-05 Thread Nicholas Piggin
On Thu Jun 1, 2023 at 5:20 PM AEST, Cédric Le Goater wrote: > On 5/31/23 03:23, Nicholas Piggin wrote: > > @@ -267,6 +267,9 @@ static bool spapr_realize_vcpu(PowerPCCPU *cpu, > > SpaprMachineState *spapr, > > cpu_ppc_set_vhyp(cpu, PPC_VIRTUAL_HYPERVISOR(spapr)); > > kvmppc_set_papr(cpu

[RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-05 Thread Sam Li
To configure the zoned format feature on the qcow2 driver, it requires following arguments: the device size, zoned profile, zoned model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append sectors, max open zones, and max_active_zones). To create a qcow2 fi

[RFC 3/4] qcow2: add zoned emulation capability

2023-06-05 Thread Sam Li
By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned integers. Each zo

[RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-05 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. Once the zoned_profile is set to `zbc`, then the qcow2 file can be taken as zoned devices and passed through by virtio-blk device to the guest. Signed-off-by: Sam Li --- docs/system/qemu-block-drivers.rst.inc | 31 ++

[RFC 4/4] iotests: test the zoned format feature for qcow2 file

2023-06-05 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check zoned-qcow2 Signed-off-by: Sam Li --- tests/qemu-iotests/tests/zoned-qcow2 | 110 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 87 ++ 2 files changed, 197 insertions(+) create mode 1

[RFC 0/4] Add full zoned storage emulation to qcow2 driver

2023-06-05 Thread Sam Li
This patch series add a new extension - zoned format - to the qcow2 driver thereby allowing full zoned storage emulation on the qcow2 img file. Users can attach such a qcow2 file to the guest as a zoned device. To create a qcow2 file with zoned format, use command like this: $ qemu-img create

Re: [PATCH 02/35] target/arm: Move aesmc and aesimc tables to crypto/aes.c

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 04:33, Richard Henderson wrote: We do not currently have a table in crypto/ for just MixColumns. Move both tables for consistency. Signed-off-by: Richard Henderson --- include/crypto/aes.h | 6 ++ crypto/aes.c | 142

Re: [PATCH 03/35] crypto/aes: Add constants for ShiftRows, InvShiftRows

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 04:33, Richard Henderson wrote: These symbols will avoid the indirection through memory when fully unrolling some new primitives. Signed-off-by: Richard Henderson --- crypto/aes.c | 50 -- 1 file changed, 48 insertions(+), 2 deletions

Re: [PATCH v2 1/2] net: Provide MemReentrancyGuard * to qemu_new_nic()

2023-06-05 Thread Akihiko Odaki
On 2023/06/05 17:06, Alexander Bulekov wrote: On 230601 1218, Akihiko Odaki wrote: Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. In preparation for such a cha

Re: [PATCH 0/2] Fix venv issues with Avocado by reverting to an older version

2023-06-05 Thread Paolo Bonzini
On 6/5/23 11:46, Peter Maydell wrote: To avoid this issue, tests/requirements.txt should use a ">=" constraint and the version of Avocado should be limited to what distros provide in the system packages. Only Fedora has Avocado, and more specifically version 92.0. For now, this series reverts t

Re: [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status

2023-06-05 Thread Alex Bennée
Paolo Bonzini writes: > Allow a specific subdirectory to run git-submodule.sh with only a > subset of submodules, without removing the others from the > .git-submodule-status file. > > This also allows scripts/git-submodule.sh to be more lenient: > validating an empty set of submodules is not a

vmovqdu/vmovqda inline asm doesn't compile on macos catalina

2023-06-05 Thread Peter Maydell
I just noticed that the recent atomicity changes introduce a build failure on x86 macos (Catalina). Now if we wanted to, we can say "this is too old and outside our support policy", of course... (I don't know if newer x86 macos is OK -- this machine can't upgrade to anything newer than Catalina. So

Re: [PATCH 04/10] build: log submodule update from git-submodule.sh

2023-06-05 Thread Alex Bennée
Paolo Bonzini writes: > Print exactly which submodules have been updated, by reusing the logic of > "git-submodule.sh validate" after executing "git submodule update --init'. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 06/35] target/arm: Demultiplex AESE and AESMC

2023-06-05 Thread Philippe Mathieu-Daudé
On 3/6/23 04:33, Richard Henderson wrote: Split these helpers so that we are not passing 'decrypt' within the simd descriptor. Signed-off-by: Richard Henderson --- target/arm/helper.h | 2 ++ target/arm/tcg/sve.decode | 4 ++-- target/arm/tcg/crypto_helper.c | 37 ++

Re: [PATCH 0/2] Fix venv issues with Avocado by reverting to an older version

2023-06-05 Thread Peter Maydell
On Mon, 5 Jun 2023 at 11:51, Paolo Bonzini wrote: > > On 6/5/23 11:46, Peter Maydell wrote: > >> To avoid this issue, tests/requirements.txt should use a ">=" constraint > >> and the version of Avocado should be limited to what distros provide > >> in the system packages. Only Fedora has Avocado,

Re: [PATCH 02/35] target/arm: Move aesmc and aesimc tables to crypto/aes.c

2023-06-05 Thread Philippe Mathieu-Daudé
On 5/6/23 12:45, Philippe Mathieu-Daudé wrote: On 3/6/23 04:33, Richard Henderson wrote: We do not currently have a table in crypto/ for just MixColumns.  Move both tables for consistency. Signed-off-by: Richard Henderson ---   include/crypto/aes.h   |   6 ++   crypto/aes.c

Re: [PATCH v1 2/2] target/ppc: PMU implement PERFM interrupts

2023-06-05 Thread Daniel Henrique Barboza
On 5/30/23 10:43, Nicholas Piggin wrote: The PMU raises a performance monitor exception (causing an interrupt when MSR[EE]=1) when MMCR0[PMAO] is set, and lowers it when clear. Wire this up and implement the interrupt delivery for books. Linux perf record can now collect PMI-driven samples.

Re: [PATCH v1 1/2] target/ppc: PMU do not clear MMCR0[FCECE] on performance monitor alert

2023-06-05 Thread Daniel Henrique Barboza
On 5/30/23 10:43, Nicholas Piggin wrote: FCECE does not get cleared according to the ISA v3.1B. Signed-off-by: Nicholas Piggin --- Reviewed-by: Daniel Henrique Barboza And queued. Daniel target/ppc/power8-pmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/ppc/power8-p

Re: [PATCH 04/10] build: log submodule update from git-submodule.sh

2023-06-05 Thread Alex Bennée
Paolo Bonzini writes: > Print exactly which submodules have been updated, by reusing the logic of > "git-submodule.sh validate" after executing "git submodule update --init'. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v1] target/ppc: Support directed privileged doorbell interrupt (SDOOR)

2023-06-05 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 5/30/23 10:05, Nicholas Piggin wrote: BookS msgsndp instruction to self or DPDES register can cause SDOOR interrupts which crash QEMU with exception not implemented. Linux does not use msgsndp in SMT1, and KVM only uses DPDES

Re: [PATCH v1] target/ppc: Fix msgclrp interrupt type

2023-06-05 Thread Daniel Henrique Barboza
On 5/30/23 10:07, Nicholas Piggin wrote: msgclrp matches msgsndp and should clear PPC_INTERRUPT_DOORBELL. Signed-off-by: Nicholas Piggin --- Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel target/ppc/excp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH 01/10] configure: remove --with-git= option

2023-06-05 Thread Thomas Huth
On 05/06/2023 11.52, Paolo Bonzini wrote: The scenario for which --with-git= was introduced was to use a SOCKS proxy such as tsocks. However, this was back in 2017 when QEMU's submodules used the git:// protocol, and it is not as important when using the "smart HTTP" backend; for example, neithe

[PATCH v2 2/4] linux-user/elfload: Expose get_elf_hwcap() on s390x

2023-06-05 Thread Ilya Leoshkevich
It is required for implementing /proc/cpuinfo emulation. Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- linux-user/elfload.c | 2 +- linux-user/loader.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index

[PATCH v2 0/4] linux-user: Emulate /proc/cpuinfo on s390x

2023-06-05 Thread Ilya Leoshkevich
v1: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg00299.html v1 -> v2: Add output examples (David). Simplify the CPU 0 special case (David). Fix building on s390x hosts. Hi, This series introduces /proc/cpuinfo linux-user emulation for s390x. /proc/cpuinfo emulation

[PATCH v2 3/4] linux-user/elfload: Introduce elf_hwcap_str() on s390x

2023-06-05 Thread Ilya Leoshkevich
It is required for implementing /proc/cpuinfo emulation. Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- linux-user/elfload.c | 27 +++ linux-user/loader.h | 1 + 2 files changed, 28 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elflo

[PATCH v2 4/4] linux-user: Emulate /proc/cpuinfo on s390x

2023-06-05 Thread Ilya Leoshkevich
Some s390x userspace programs are confused when seeing a foreign /proc/cpuinfo [1]. Add the emulation for s390x; follow the respective kernel code structure where possible. Output example: vendor_id : IBM/S390 # processors: 12 bogomips per cpu: 13370.00 m

[PATCH] accel/tcg: Unmap perf_marker

2023-06-05 Thread Ilya Leoshkevich
Coverity complains that perf_marker is never unmapped. Fix by unmapping it in perf_exit(). Fixes: Coverity CID 1507929 Fixes: 5584e2dbe8c9 ("tcg: add perfmap and jitdump") Signed-off-by: Ilya Leoshkevich --- accel/tcg/perf.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

Re: [PATCH 5/6] qtest: bump bios-table-test timeout to 6 minutes

2023-06-05 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: This is reliably hitting the current 2 minute timeout in GitLab CI for the TCI job, and even hits a 4 minute timeout. At 6 minutes it looks sufficiently reliable. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 2 +- 1 file chang

[PULL 1/3] hw/timer/i8254_common: Share "iobase" property via base class

2023-06-05 Thread Mark Cave-Ayland
From: Bernhard Beschow Both TYPE_KVM_I8254 and TYPE_I8254 have their own but same implementation of the "iobase" property. The storage for the property already resides in PITCommonState, so also move the property definition there. Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Re

[PULL 0/3] qemu-sparc queue 20230605

2023-06-05 Thread Mark Cave-Ayland
tags/qemu-sparc-20230605 for you to fetch changes up to 36c9189890bfb936b1b086da639e37fd92b50215: hw/isa/i82378: Remove unused "io" attribute (2023-06-05 07:43:23 +0100) qemu-sparc queue Hi Richard, This is one o

[PULL 3/3] hw/isa/i82378: Remove unused "io" attribute

2023-06-05 Thread Mark Cave-Ayland
From: Bernhard Beschow The attribute isn't used since commit 5c9736789b79ea49cd236ac326f0a414f63b1015 "i82378: Cleanup implementation". Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Reviewed-by: Mark Cave-Ayland Message-Id: <20230523195608.125820-4-shen...@gmail.com> Signed-off

[PATCH v3] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-05 Thread Thomas Huth
There is no need to disable this useful compiler warning for all versions of the SDL. Unfortunately, various versions are buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are broken, too, see https://github.com/libsdl-org/SDL/issues/6619 ), but we can use a simple compiler check to see whethe

Re: vmovqdu/vmovqda inline asm doesn't compile on macos catalina

2023-06-05 Thread Daniel P . Berrangé
On Mon, Jun 05, 2023 at 11:55:43AM +0100, Peter Maydell wrote: > I just noticed that the recent atomicity changes introduce a build > failure on x86 macos (Catalina). Now if we wanted to, we can say "this > is too old and outside our support policy", of course... Catalina is version 10. Current V

[PULL 2/3] hw/arm/omap: Remove unused omap_uart_attach()

2023-06-05 Thread Mark Cave-Ayland
From: Bernhard Beschow The function is unused since commit bdad3654d3c55f478e538037d9eccd204e5fc8ee ('hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup()'). Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé

[PATCH 4/4] spapr: Allow up to 8 threads SMT on POWER8 and newer

2023-06-05 Thread Nicholas Piggin
PPC TCG now supports multi-threaded CPU configuration for non-hypervisor state. This requires PIR and TIR be set, because that's how sibling thread matching is done. spapr's nested-HV capability does not currently coexist with SMT. This is quite analogous to LPAR-per-core mode on real hardware whi

Re: [PATCH 4/6] qtest: bump aspeed_smc-test timeout to 2 minutes

2023-06-05 Thread Daniel P . Berrangé
On Mon, Jun 05, 2023 at 01:31:36PM +0200, Thomas Huth wrote: > On 01/06/2023 18.31, Daniel P. Berrangé wrote: > > On a reasonably modern laptop this test takes 40 seconds with the arm > > emulator. Raising the timeout to 2 minutes gives greater headroom for > > slowdown under GitLab CI. > > > > Si

[PATCH 3/4] target/ppc: Add msgsndp and DPDES SMT support

2023-06-05 Thread Nicholas Piggin
Doorbells in SMT need to coordinate msgsndp/msgclrp and DPDES access from multiple threads that affect the same state. Signed-off-by: Nicholas Piggin --- hw/ppc/ppc.c | 6 ++ include/hw/ppc/ppc.h | 1 + target/ppc/excp_helper.c | 30 ++- target/ppc/g

[PATCH v2] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Himanshu Chauhan
On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. v2 Changes: o Removed goto to return in place when address matches o Call pmp_hart_has_privs_default at the end of the loop Fixes: 90b1fafce06 ("target/riscv: Smepmp: Skip app

Re: [PATCH 4/6] qtest: bump aspeed_smc-test timeout to 2 minutes

2023-06-05 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: On a reasonably modern laptop this test takes 40 seconds with the arm emulator. Raising the timeout to 2 minutes gives greater headroom for slowdown under GitLab CI. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 1 + 1 file cha

[PATCH v2 1/4] s390x/tcg: Fix CPU address returned by STIDP

2023-06-05 Thread Ilya Leoshkevich
In qemu-user-s390x, /proc/cpuinfo contains: processor 0: version = 00, identification = 00, machine = 8561 processor 1: version = 00, identification = 40, machine = 8561 The highest nibble is supposed to contain the CPU address, but it's off by 2 bits. Fix the shift va

Re: [PATCH 5/6] qtest: bump bios-table-test timeout to 6 minutes

2023-06-05 Thread Daniel P . Berrangé
On Mon, Jun 05, 2023 at 01:37:39PM +0200, Thomas Huth wrote: > On 01/06/2023 18.31, Daniel P. Berrangé wrote: > > This is reliably hitting the current 2 minute timeout in GitLab CI > > for the TCI job, and even hits a 4 minute timeout. At 6 minutes it > > looks sufficiently reliable. > > > > Signe

  1   2   3   4   >