Re: [PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 03:37:50PM +0100, Paolo Bonzini wrote: > Python 3.6 is at end-of-life. libvirt-ci now supports overrides for > targets and package mappings, therefore QEMU can use newer versions > provided by CentOS 8 (Python 3.8) and OpenSUSE 15.3 (Python 3.9). > > Packages that the

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-22 Thread Philippe Mathieu-Daudé
On 17/2/23 18:14, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 11:35:44AM -0500, John Snow wrote: However, would it be possible to keep the older Ubuntu test as a manual execution that we could invoke at will, only during RC testing phase? If it's not a lot of work, I could even check

Re: [PATCH 07/10] docs/devel: update and clarify lcitool instructions

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 03:37:49PM +0100, Paolo Bonzini wrote: > Shorten a bit the description of what libvirt-ci does, the name of the > data files is not relevant at that point. However, the procedures to add > new build prerequisites are lacking some information, particularly with > respect to

Re: [PATCH 06/10] lcitool: update submodule

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 03:37:48PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > tests/docker/dockerfiles/alpine.docker | 2 +- > tests/docker/dockerfiles/fedora-win32-cross.docker | 1 + > tests/docker/dockerfiles/fedora-win64-cross.docker | 1 + >

Re: [PATCH 09/12] tests: add tuxrun baseline test to avocado

2023-02-22 Thread Philippe Mathieu-Daudé
On 15/2/23 20:25, Alex Bennée wrote: The TuxRun project (www.tuxrun.org) uses QEMU to run tests on a wide variety of kernel configurations on wide range of our emulated platforms. They publish a known good set of images at: https://storage.tuxboot.com/ to help with bisecting regressions in

Re: [PATCH 04/10] configure: protect against escaping venv when running Meson

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 03:37:46PM +0100, Paolo Bonzini wrote: > If neither --python nor --meson are specified, Meson's generated > build.ninja will invoke Python script using the interpreter *that Meson > itself is running under*; not the one identified by configure. > > This is only an issue if

Re: [PATCH v4] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-02-22 Thread Christian Schoenebeck
On Friday, February 17, 2023 6:07:32 PM CET Dorinda Bassey wrote: > This commit adds a new audiodev backend to allow QEMU to use Pipewire as > both an audio sink and source. This backend is available on most systems > > Add Pipewire entry points for QEMU Pipewire audio backend > Add wrappers for

Re: [PATCH 08/12] tests: skip the nios2 replay_kernel test

2023-02-22 Thread Philippe Mathieu-Daudé
On 15/2/23 21:59, Richard Henderson wrote: On 2/15/23 10:47, Philippe Mathieu-Daudé wrote: +    @skip("nios2 emulation is buggy under record/replay") It will be hard to notice the flakyness got improved. What about:     @skipUnless(os.getenv('AVOCADO_RUN_FLAKY_TESTS'), 'Flaky test')    

Re: [PATCH v5 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-22 Thread Jonathan Cameron via
On Tue, 21 Feb 2023 23:15:49 +0100 Philippe Mathieu-Daudé wrote: > Hi Jonathan, > > On 21/2/23 16:21, Jonathan Cameron wrote: > > CXL uses PCI AER Internal errors to signal to the host that an error has > > occurred. The host can then read more detailed status from the CXL RAS > > capability. >

[PULL 2/4] thread-posix: add support for setting threads name on OpenBSD

2023-02-22 Thread Paolo Bonzini
From: Brad Smith Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: Signed-off-by: Paolo Bonzini --- meson.build | 12

[PULL 1/4] target/i386: Fix 32-bit AD[CO]X insns in 64-bit mode

2023-02-22 Thread Paolo Bonzini
From: Richard Henderson Failure to truncate the inputs results in garbage for the carry-out. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1373 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230115012103.3131796-1-richard.hender...@linaro.org>

[PULL 4/4] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2023-02-22 Thread Paolo Bonzini
From: TaiseiIto Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was a bug causing the problem in 'g' packets sent by QEMU to GDB. The packets have values of registers of machine emulated by QEMU

[PULL 3/4] docs: build-platforms: refine requirements on Python build dependencies

2023-02-22 Thread Paolo Bonzini
Historically, the critical dependency for both building and running QEMU has been the distro packages. Because QEMU is written in C and C's package management has been tied to distros (at least if you do not want to bundle libraries with the binary, otherwise I suppose you could use something

[PULL 0/4] Misc + target/i386 pull request for 2023-02-22

2023-02-22 Thread Paolo Bonzini
The following changes since commit 003ba52a8b327180e284630b289c6ece5a3e08b9: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-02-16 11:16:39 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch

[PATCH 03/10] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-22 Thread Paolo Bonzini
From: John Snow Once upon a time, "sphinx-build" on certain RPM platforms invoked specifically a Python 2.x version, while "sphinx-build-3" was a distro shim for the Python 3.x version. These days, none of our supported platforms utilize a 2.x version, so it should be safe to search for

[PATCH 07/10] docs/devel: update and clarify lcitool instructions

2023-02-22 Thread Paolo Bonzini
Shorten a bit the description of what libvirt-ci does, the name of the data files is not relevant at that point. However, the procedures to add new build prerequisites are lacking some information, particularly with respect to regenerating the output test files for lcitool's unit tests. While at

[PATCH 04/10] configure: protect against escaping venv when running Meson

2023-02-22 Thread Paolo Bonzini
If neither --python nor --meson are specified, Meson's generated build.ninja will invoke Python script using the interpreter *that Meson itself is running under*; not the one identified by configure. This is only an issue if Meson's Python interpreter is not "the first one in the path", which is

[PATCH v4 0/9] improvement to Python detection, preparation for dropping 3.6

2023-02-22 Thread Paolo Bonzini
This is my take on John's patches to improve Python detection and to prepare for dropping Python 3.6 support. The main change with respect to John's work is that lcitool is updated and the container images for CI can install Sphinx via pip; this way documentation is still built on the CentOS 8

[PATCH 09/10] Python: Drop support for Python 3.6

2023-02-22 Thread Paolo Bonzini
Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6, but won't until QEMU does. Versions of Python

[PATCH 08/10] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions

2023-02-22 Thread Paolo Bonzini
Python 3.6 is at end-of-life. libvirt-ci now supports overrides for targets and package mappings, therefore QEMU can use newer versions provided by CentOS 8 (Python 3.8) and OpenSUSE 15.3 (Python 3.9). Packages that the distro does not provide are included in the image via PyPI; lcitool knows

[PATCH 10/10] configure: Add courtesy hint to Python version failure message

2023-02-22 Thread Paolo Bonzini
From: John Snow If we begin requiring Python 3.7+, a few platforms are going to need to install an additional Python interpreter package. As a courtesy to the user, suggest the optional package they might need to install. This will hopefully minimize any downtime caused by the change in Python

[PATCH 05/10] configure: Look for auxiliary Python installations

2023-02-22 Thread Paolo Bonzini
From: John Snow At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo every time. We can

[PATCH 02/10] python: drop pipenv

2023-02-22 Thread Paolo Bonzini
From: John Snow The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git. Signed-off-by:

[PATCH 06/10] lcitool: update submodule

2023-02-22 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/docker/dockerfiles/alpine.docker | 2 +- tests/docker/dockerfiles/fedora-win32-cross.docker | 1 + tests/docker/dockerfiles/fedora-win64-cross.docker | 1 + tests/lcitool/libvirt-ci | 2 +- 4 files changed, 4

[PATCH 01/10] python: support pylint 2.16

2023-02-22 Thread Paolo Bonzini
From: John Snow Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail. 1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception". Fix these minor issues and turn the lights green.

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Anton Kuchin
On 22/02/2023 14:43, Michael S. Tsirkin wrote: On Wed, Feb 22, 2023 at 03:20:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 17.02.23 20:00, Anton Kuchin wrote: Migration of vhost-user-fs device requires transfer of FUSE internal state from backend. There is no standard way to do it now so

Re: [PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-22 Thread Eugenio Perez Martin
On Wed, Feb 22, 2023 at 5:05 AM Jason Wang wrote: > > > 在 2023/2/8 17:42, Eugenio Pérez 写道: > > Next patches enable devices to be migrated even if vdpa netdev has not > > been started with x-svq. However, not all devices are migratable, so we > > need to block migration if we detect that. > > > >

[PATCH v16 06/11] s390x/cpu topology: interception of PTF instruction

2023-02-22 Thread Pierre Morel
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are

[PATCH v16 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-22 Thread Pierre Morel
S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch --- qapi/machine.json | 9 - hw/core/machine-qmp-cmds.c | 2 ++ 2 files

[PATCH v16 00/11] s390x: CPU Topology

2023-02-22 Thread Pierre Morel
Hi, No big changes here, some bug corrections and comments modifications following Thomas and Nina comments and Daniel and Markus reommandations. Implementation discussions == CPU models -- Since the facility 11, S390_FEAT_CONFIGURATION_TOPOLOGY is already in

[PATCH v16 10/11] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-02-22 Thread Pierre Morel
When the guest asks to change the polarization this change is forwarded to the admin using QAPI. The admin is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 34 ++

[PATCH v16 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-02-22 Thread Pierre Morel
The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books and sockets in the case they are not specified. - verify the CPU attributes - check that we have still room on

[PATCH v16 07/11] target/s390x/cpu topology: activating CPU topology

2023-02-22 Thread Pierre Morel
The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced for SE (secure

[PATCH v16 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-22 Thread Pierre Morel
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h | 21 +++ include/hw/s390x/sclp.h | 1 + target/s390x/cpu.h | 72

[PATCH v16 01/11] s390x/cpu topology: add s390 specifics to CPU topology

2023-02-22 Thread Pierre Morel
S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling and help the guest take the best decisions on the scheduling of threads on the vCPUs. Let

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Anton Kuchin
On 22/02/2023 14:20, Vladimir Sementsov-Ogievskiy wrote: On 17.02.23 20:00, Anton Kuchin wrote: Migration of vhost-user-fs device requires transfer of FUSE internal state from backend. There is no standard way to do it now so by default migration must be blocked. But if this state can be

[PATCH v16 05/11] s390x/cpu topology: resetting the Topology-Change-Report

2023-02-22 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- include/hw/s390x/cpu-topology.h | 1 +

[PATCH v16 08/11] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-02-22 Thread Pierre Morel
The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifiers like polarization

[PATCH v16 11/11] docs/s390x/cpu topology: document s390x cpu topology

2023-02-22 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 378 + docs/system/target-s390x.rst | 1 + 2 files changed, 379 insertions(+) create mode 100644

[PATCH v16 04/11] s390x/sclp: reporting the maximum nested topology entries

2023-02-22 Thread Pierre Morel
The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

Re: [PATCH] coverity: physmem: use simple assertions instead of modelling

2023-02-22 Thread Stefan Hajnoczi
On Wed, 15 Feb 2023 at 15:22, Vladimir Sementsov-Ogievskiy wrote: > > ping > > [add Stefan] I'm not familiar with the Coverity models. Peter Maydell is the maintainer. Stefan

Re: [PATCH v6 0/4] memory: prevent dma-reentracy issues

2023-02-22 Thread Stefan Hajnoczi
On Sat, Feb 04, 2023 at 11:07:33PM -0500, Alexander Bulekov wrote: > These patches aim to solve two types of DMA-reentrancy issues: > > 1.) mmio -> dma -> mmio case > To solve this, we track whether the device is engaged in io by > checking/setting a reentrancy-guard within APIs used for MMIO

Re: [PATCH v6 19/29] target/arm: Move 64-bit TCG CPUs into tcg/

2023-02-22 Thread Fabiano Rosas
Peter Maydell writes: > On Fri, 17 Feb 2023 at 20:15, Fabiano Rosas wrote: >> >> Move the 64-bit CPUs that are TCG-only: >> - cortex-a35 >> - cortex-a55 >> - cortex-a72 >> - cortex-a76 >> - a64fx >> - neoverse-n1 >> >> Keep the CPUs that can be used with KVM: >> - cortex-a57 >> - cortex-a53 >>

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-22 Thread Alex Bennée
Reinoud Zandijk writes: > On Wed, Feb 22, 2023 at 09:51:57AM +, Daniel P. Berrangé wrote: >> On Wed, Feb 22, 2023 at 09:11:13AM +, Bernhard Beschow wrote: >> > Are there any plans or ideas to support 128 bit architectures >> > such as CHERI in the future? There is already a QEMU fork

Re: [RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 22/2/23 12:01, Alex Bennée wrote: >> This is a mandatory feature for Armv8.1 architectures but we don't >> state the feature clearly in our emulation list. > > Split in 2 patches? Its all pretty much a NOP aside from the comments. I split the isar code just

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread Paul Durrant
On 22/02/2023 12:51, David Woodhouse wrote: On 22 February 2023 12:14:00 GMT, Paul Durrant wrote: On 22/02/2023 12:03, Paul Durrant wrote: On 22/02/2023 09:21, David Woodhouse wrote: On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: @@ -1246,6 +1470,16 @@ static bool

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread Paul Durrant
On 22/02/2023 12:51, David Woodhouse wrote: On 22 February 2023 12:14:00 GMT, Paul Durrant wrote: On 22/02/2023 12:03, Paul Durrant wrote: On 22/02/2023 09:21, David Woodhouse wrote: On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: @@ -1246,6 +1470,16 @@ static bool

Re: [RFC PATCH v2 00/25] Virtio Sound card Implementation

2023-02-22 Thread Stefano Garzarella
Hi Shreyansh, On Fri, Feb 11, 2022 at 11:18 PM Shreyansh Chouhan wrote: > > The second RFC for implementing the VirtIO Sound card as described in > the virtio specs. Sorry for the absence of activity on this. Thanks for starting working on virtio-sound device for QEMU! I'm interested in

Re: [PATCH 3/5] bulk: Replace [g_]assert(0) -> g_assert_not_reached()

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 12:56, Thomas Huth wrote: On 22/02/2023 00.25, Philippe Mathieu-Daudé wrote: In order to avoid warnings such commit c0a6665c3c ("target/i386: Remove compilation errors when -Werror=maybe-uninitialized"), replace all assert(0) and g_assert(0) by g_assert_not_reached(). Remove any

Re: Reference-counting and finalizers that can fail are uneasy partners (was: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image)

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 01:08:05PM +0100, Markus Armbruster wrote: > A half-baked thought has been sloshing around in my head. Perhaps I can > bake it some more by writing it up. > > Reference-counting and finalizers that can fail are uneasy partners. > > When managing lifetimes manually, you

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread David Woodhouse
On 22 February 2023 12:14:00 GMT, Paul Durrant wrote: >On 22/02/2023 12:03, Paul Durrant wrote: >> On 22/02/2023 09:21, David Woodhouse wrote: >>> On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: @@ -1246,6 +1470,16 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 03:20:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 17.02.23 20:00, Anton Kuchin wrote: > > Migration of vhost-user-fs device requires transfer of FUSE internal state > > from backend. There is no standard way to do it now so by default migration > > must be blocked.

Re: [PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds

2023-02-22 Thread Fabiano Rosas
Peter Maydell writes: > On Fri, 17 Feb 2023 at 20:13, Fabiano Rosas wrote: >> >> Addressed Peter's comments and dropped the cpregs change which is not >> related to fixing the --disable-tcg build. This unblocks the xenpvh >> series and I can tackle the regs split without holding up the build >>

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-22 Thread Reinoud Zandijk
On Wed, Feb 22, 2023 at 09:51:57AM +, Daniel P. Berrangé wrote: > On Wed, Feb 22, 2023 at 09:11:13AM +, Bernhard Beschow wrote: > > Are there any plans or ideas to support 128 bit architectures > > such as CHERI in the future? There is already a QEMU fork > > implementing CHERI for RISC V

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
On 17.02.23 20:00, Anton Kuchin wrote: Migration of vhost-user-fs device requires transfer of FUSE internal state from backend. There is no standard way to do it now so by default migration must be blocked. But if this state can be externally transferred by orchestrator give it an option to

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread Paul Durrant
On 22/02/2023 12:03, Paul Durrant wrote: On 22/02/2023 09:21, David Woodhouse wrote: On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: @@ -1246,6 +1470,16 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct kvm_xen_exit *exit)   }   switch (code) { +    case

Reference-counting and finalizers that can fail are uneasy partners (was: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image)

2023-02-22 Thread Markus Armbruster
A half-baked thought has been sloshing around in my head. Perhaps I can bake it some more by writing it up. Reference-counting and finalizers that can fail are uneasy partners. When managing lifetimes manually, you control where finalization happens. When finalization can fail, you're as

Re: [PATCH 5/5] hw: Remove mentions of NDEBUG

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 12:25:20AM +0100, Philippe Mathieu-Daudé wrote: > Since commit 262a69f428 ("osdep.h: Prohibit disabling > assert() in supported builds") 'NDEBUG' can not be defined. > > Signed-off-by: Philippe Mathieu-Daudé this exactly says NDEBUG is not allowed. why are you removing

Re: [PATCH v12 60/60] hw/xen: Subsume xen_be_register_common() into xen_be_init()

2023-02-22 Thread Paul Durrant
On 20/02/2023 20:47, David Woodhouse wrote: From: David Woodhouse Every caller of xen_be_init() checks and exits on error, then calls xen_be_register_common(). Just make xen_be_init() abort for itself and return void, and register the common devices too. Signed-off-by: David Woodhouse ---

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread Paul Durrant
On 22/02/2023 09:21, David Woodhouse wrote: On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: @@ -1246,6 +1470,16 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct kvm_xen_exit *exit) } switch (code) { +    case __HYPERVISOR_set_timer_op: +    if

Re: [PATCH 3/5] bulk: Replace [g_]assert(0) -> g_assert_not_reached()

2023-02-22 Thread Thomas Huth
On 22/02/2023 00.25, Philippe Mathieu-Daudé wrote: In order to avoid warnings such commit c0a6665c3c ("target/i386: Remove compilation errors when -Werror=maybe-uninitialized"), replace all assert(0) and g_assert(0) by g_assert_not_reached(). Remove any code following g_assert_not_reached().

Re: [PATCH 3/5] bulk: Replace [g_]assert(0) -> g_assert_not_reached()

2023-02-22 Thread Thomas Huth
On 22/02/2023 07.29, Richard Henderson wrote: On 2/21/23 18:06, Thomas Huth wrote:   int postcopy_wake_shared(struct PostCopyFD *pcfd,    uint64_t client_addr,    RAMBlock *rb)   { -    assert(0); -    return -1; +    g_assert_not_reached();   }  

Re: [RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 12:01, Alex Bennée wrote: This is a mandatory feature for Armv8.1 architectures but we don't state the feature clearly in our emulation list. Split in 2 patches? Reviewed-by: Philippe Mathieu-Daudé While checking verify our cortex-a76 model matches up with the current TRM by

Re: [PATCH v4 5/9] hw/i386/pc_{q35, piix}: Minimize usage of get_system_memory()

2023-02-22 Thread Philippe Mathieu-Daudé
On 13/2/23 17:20, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth --- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 3/9] hw/i386/pc_q35: Reuse machine parameter

2023-02-22 Thread Philippe Mathieu-Daudé
On 13/2/23 17:19, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 66cd718b70..dee2b38474 100644 --- a/hw/i386/pc_q35.c +++

[RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-22 Thread Alex Bennée
This is a mandatory feature for Armv8.1 architectures but we don't state the feature clearly in our emulation list. While checking verify our cortex-a76 model matches up with the current TRM by breaking out the long form isar into a more modern readable FIELD_DP code. Signed-off-by: Alex Bennée

Re: [PATCH v4 1/9] hw/pci-host/i440fx: Inline sysbus_add_io()

2023-02-22 Thread Philippe Mathieu-Daudé
On 13/2/23 17:19, Bernhard Beschow wrote: sysbus_add_io() just wraps memory_region_add_subregion() while also obscuring where the memory is attached. So use memory_region_add_subregion() directly and attach it to the existing memory region s->bus->address_space_io which is set as an alias to

Re: [PATCH v2 14/17] audio: wire up st_rate_frames_out()

2023-02-22 Thread Marc-André Lureau
Hi On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Wire up the st_rate_frames_out() function and replace > audio_frontend_frames_in() to make audio packet length > calculation exact. > > Acked-by: Mark Cave-Ayland > Signed-off-by: Volker Rümelin Same comments as st_rate_frames_in

Re: [PATCH v2 17/17] audio: remove sw->ratio

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Simplify the resample buffer size calculation. > > For audio playback we have > sw->ratio = ((int64_t)sw->hw->info.freq << 32) / sw->info.freq; > samples = ((int64_t)sw->HWBUF.size << 32) / sw->ratio; > > This can be simplified to >

Re: [PATCH v2 07/17] audio: don't misuse audio_pcm_sw_write()

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > The audio_pcm_sw_write() function is intended to convert a > PCM audio stream to the internal representation, adjust the > volume, and then mix it with the other audio streams with a > possibly changed sample rate in mix_buf. In order for

Re: [PATCH v2 12/17] audio: rename variables in audio_pcm_sw_read()

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > The audio_pcm_sw_read() function uses a few very unspecific > variable names. Rename them for better readability. > > ret => total_out > total => total_in > size => buf_len > samples => frames_out_max > > Acked-by: Mark Cave-Ayland >

Re: [PATCH v2 11/17] audio: replace the resampling loop in audio_pcm_sw_read()

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Replace the resampling loop in audio_pcm_sw_read() with the new > function audio_pcm_sw_resample_in(). Unlike the old resample > loop the new function will try to consume input frames even if > the output buffer is full. This is necessary

Re: [PATCH v2 06/17] audio: rename variables in audio_pcm_sw_write()

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > The audio_pcm_sw_write() function uses a lot of very unspecific > variable names. Rename them for better readability. > > ret => total_in > total => total_out > size => buf_len > hwsamples => hw->mix_buf.size > samples => frames_in_max > >

Re: [PATCH v2 16/17] audio/audio_template: substitute sw->hw with hw

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Substitute sw->hw with hw in the audio_pcm_sw_alloc_resources_* > functions. > > Acked-by: Mark Cave-Ayland > Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau > --- > audio/audio_template.h | 6 +++--- > 1 file changed,

Re: [PATCH v2 09/17] audio/mixeng: calculate number of input frames

2023-02-22 Thread Marc-André Lureau
Hi On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > Calculate the exact number of audio input frames needed to get > a given number of audio output frames. The exact number of > frames depends only on the difference of opos - ipos and the > number of output frames. When downsampling,

Re: [PATCH v2 10/17] audio: wire up st_rate_frames_in()

2023-02-22 Thread Marc-André Lureau
Hi On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Wire up the st_rate_frames_in() function and replace > audio_frontend_frames_out() to make audio packet length > calculation exact. When upsampling, it's still possible that > the audio frontends can't write the last audio frame. This

Re: [PATCH v2 08/17] audio: remove unused noop_conv() function

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > The function audio_capture_mix_and_clear() no longer uses > audio_pcm_sw_write() to resample audio frames from one internal > buffer to another. For this reason, the noop_conv() function is > now unused. Remove it. > > Acked-by: Mark

Re: [PATCH v2 15/17] audio: handle leftover audio frame from upsampling

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Upsampling may leave one remaining audio frame in the input > buffer. The emulated audio playback devices are currently > resposible to write this audio frame again in the next write > cycle. Push that task down to audio_pcm_sw_write. > >

Re: [PATCH v2 04/17] audio: replace the resampling loop in audio_pcm_sw_write()

2023-02-22 Thread Marc-André Lureau
Hi On Mon, Feb 6, 2023 at 10:53 PM Volker Rümelin wrote: > > Replace the resampling loop in audio_pcm_sw_write() with the new > function audio_pcm_sw_resample_out(). Unlike the old resample > loop the new function will try to consume input frames even if > the output buffer is full. This is

Re: [PATCH v2 05/17] audio: remove sw == NULL check

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > All call sites of audio_pcm_sw_write() guarantee that sw is not > NULL. Remove the unnecessary NULL check. > > Acked-by: Mark Cave-Ayland > Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau > --- > audio/audio.c | 4

Re: [PATCH v2 01/17] audio: change type of mix_buf and conv_buf

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > Change the type of mix_buf in struct HWVoiceOut and conv_buf > in struct HWVoiceIn from STSampleBuffer * to STSampleBuffer. > However, a buffer pointer is still needed. For this reason in > struct STSampleBuffer samples[] is changed to

Re: [PATCH v2 03/17] audio: make the resampling code greedy

2023-02-22 Thread Marc-André Lureau
Hi On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > Read the maximum possible number of audio frames instead of the > minimum necessary number of frames when the audio stream is > downsampled and the output buffer is limited. This makes the > function symmetrical to upsampling when the

Re: [PATCH v2 02/17] audio: change type and name of the resample buffer

2023-02-22 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin wrote: > > Change the type of the resample buffer from struct st_sample * > to STSampleBuffer. Also change the name from buf to resample_buf > for better readability. > > The new variables resample_buf.size and resample_buf.pos will be > used after

Re: [PATCH 3/3] hw/mips: Add MIPS virt board

2023-02-22 Thread Jiaxun Yang
Ping? > 2023年2月6日 01:08,Jiaxun Yang 写道: > > > >> 2023年2月5日 11:48,Philippe Mathieu-Daudé 写道: >> >> Hi Jiaxun, >> >> On 2/2/23 14:21, Jiaxun Yang wrote: >>> MIPS virt board is design to utilize existing VirtIO infrastures >>> but also comptitable with MIPS's existing internal simulation

Re: [PATCH v3 07/10] qapi: implement conditional command arguments

2023-02-22 Thread Marc-André Lureau
Hi On Wed, Feb 22, 2023 at 2:23 PM Markus Armbruster wrote: > > Another option is to always pass a dummy last argument? :) > > > > void command(first, > > #ifdef A > > a, > > #endif > > #ifdef B > > b, > > #endif > > dummy) > > Yet another option: > > void command(first > #ifdef

Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement

2023-02-22 Thread Jiaxun Yang
Ping? > 2023年2月11日 17:34,Jiaxun Yang 写道: > > Previously switchable NaN2008 requires fcsr31.nan2008 to be writable > for guest. However as per MIPS arch spec this bit can never be writable. > This cause NaN2008 ELF to be rejected by QEMU. > > NaN2008 can be enabled on R2~R5 processors, just

Re: [PATCH v3 07/10] qapi: implement conditional command arguments

2023-02-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Feb 20, 2023 at 12:10 PM Markus Armbruster wrote: >> >> Marc-André Lureau writes: >> >> > Hi Markus >> > >> > On Fri, Feb 17, 2023 at 12:28 PM Markus Armbruster >> > wrote: >> > >> >> marcandre.lur...@redhat.com writes: >> >> >> >> > From: Marc-André

Re: [PATCH v2 5/6] spec: Introduce NBD_FLAG_BLOCK_STATUS_PAYLOAD

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:54PM -0600, Eric Blake wrote: > Simple reply message > > @@ -1232,6 +1235,19 @@ The field has the following format: >will be faster than a regular write). Clients MUST NOT set the >`NBD_CMD_FLAG_FAST_ZERO` request flag unless this transmission flag >

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-22 Thread Daniel P . Berrangé
On Wed, Feb 22, 2023 at 09:11:13AM +, Bernhard Beschow wrote: > > > Am 30. Januar 2023 20:45:47 UTC schrieb "Alex Bennée" > : > > > >Daniel P. Berrangé writes: > > > >> On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: > >>> On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: >

Re: [PATCH v3 20/25] target/arm: Use get_phys_addr_with_struct for stage2

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: This fixes a bug in which we failed to initialize the result attributes properly after the memset. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git

Re: [PATCH v2 3/6] spec: Add NBD_OPT_EXTENDED_HEADERS

2023-02-22 Thread Wouter Verhelst
On Mon, Nov 14, 2022 at 04:46:52PM -0600, Eric Blake wrote: [...] > @@ -1370,9 +1475,10 @@ of the newstyle negotiation. > Return a list of `NBD_REP_META_CONTEXT` replies, one per context, > followed by an `NBD_REP_ACK` or an error. > > -This option SHOULD NOT be requested unless

Re: [PATCH v3 19/25] target/arm: Move s1_is_el0 into S1Translate

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: Instead of passing this to get_phys_addr_lpae, stash it in the S1Translate structure. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 27 --- 1 file changed, 12 insertions(+), 15

Re: [PATCH v3 13/25] target/arm: Remove __attribute__((nonnull)) from ptw.c

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: This was added in 7e98e21c098 as part of a reorg in which one of the argument had been legally NULL, and this caught actual instances. Now that the reorg is complete, this serves little purpose. Signed-off-by: Richard Henderson --- target/arm/ptw.c

Re: [PATCH v3 12/25] target/arm: Introduce ARMMMUIdx_Phys_{Realm,Root}

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: With FEAT_RME, there are four physical address spaces. For now, just define the symbols, and mention them in the same spots as the other Phys indexes in ptw.c. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu-param.h |

Re: [PATCH v3 05/25] target/arm: Add isar_feature_aa64_rme

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: Add the missing field for ID_AA64PFR0, and the predicate. Disable it if EL3 is forced off by the board or command-line. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 ++ target/arm/cpu.c | 4 2

Re: [PATCH v3 03/25] target/arm: Diagnose incorrect usage of arm_is_secure subroutines

2023-02-22 Thread Philippe Mathieu-Daudé
On 22/2/23 03:33, Richard Henderson wrote: In several places we use arm_is_secure_below_el3 and arm_is_el3_or_mon separately from arm_is_secure. These functions make no sense for m-profile, and would indicate prior incorrect feature testing. Signed-off-by: Richard Henderson ---

Re: [PATCH v6 2/4] target/riscv: implement Zicboz extension

2023-02-22 Thread Daniel Henrique Barboza
On 2/18/23 16:35, Richard Henderson wrote: On 2/17/23 23:28, Daniel Henrique Barboza wrote: "A cache-block zero instruction is permitted to access the specified cache block whenever a store instruction is permitted to access the corresponding physical addresses and when the PMAs indicate

Re: [PATCH v12 47/60] i386/xen: handle PV timer hypercalls

2023-02-22 Thread David Woodhouse
On Mon, 2023-02-20 at 20:47 +, David Woodhouse wrote: > @@ -1246,6 +1470,16 @@ static bool do_kvm_xen_handle_exit(X86CPU *cpu, struct > kvm_xen_exit *exit) > } >   > switch (code) { > +    case __HYPERVISOR_set_timer_op: > +    if (exit->u.hcall.longmode) { > +    return

Re: [PATCH v6 1/9] target/riscv: turn write_misa() into an official no-op

2023-02-22 Thread LIU Zhiwei
On 2023/2/22 2:22, Daniel Henrique Barboza wrote: On 2/21/23 14:06, Andrew Jones wrote: On Tue, Feb 21, 2023 at 12:49:11PM -0300, Daniel Henrique Barboza wrote: Hey, On 2/16/23 22:42, LIU Zhiwei wrote: On 2023/2/17 5:55, Daniel Henrique Barboza wrote: At this moment, and apparently

Re: [PATCH v4 0/6] qapi: static typing conversion, pt5c

2023-02-22 Thread Markus Armbruster
John Snow writes: > On Tue, Feb 21, 2023, 1:42 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > On Wed, Feb 15, 2023 at 8:39 AM Markus Armbruster >> wrote: >> >> >> >> I had a few suggestions, but none of them requires a respin. Let's >> >> discuss them, and then I merge. >> > >> >

<    1   2   3   4   >