[PATCH v5] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-12-01 Thread Jai Arora
Patch removes DPRINTF macro and adds multiple tracepoints to capture different kvm events. We also drop the DPRINTFs that don't add any additional information than trace_kvm_run_exit already does. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 Signed-off-by: Jai Arora Reviewed-by:

[PATCH v4 2/6] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-12-01 Thread Volodymyr Babchuk
Xen PV devices in QEMU can be created in two ways: either by QEMU itself, if they were passed via command line, or by Xen toolstack. In the latter case, QEMU scans XenStore entries and configures devices accordingly. In the second case we don't want QEMU to write/delete front-end entries for two r

[PATCH v4 6/6] xen_arm: Add virtual PCIe host bridge support

2023-12-01 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko The bridge is needed for virtio-pci support, as QEMU can emulate the whole bridge with any virtio-pci devices connected to it. This patch provides a flexible way to configure PCIe bridge resources using QEMU machine properties. We made this for several reasons: - We d

[PATCH v4 5/6] xen_arm: set mc->max_cpus to GUEST_MAX_VCPUS

2023-12-01 Thread Volodymyr Babchuk
From: Oleksandr Tyshchenko The number of vCPUs used for the IOREQ configuration (machine->smp.cpus) should really match the system value as for each vCPU we setup a dedicated evtchn for the communication with Xen at the runtime. This is needed for the IOREQ to be properly configured and work if t

[RFC PATCH v4 4/6] xen: add option to disable legacy backends

2023-12-01 Thread Volodymyr Babchuk
This patch makes legacy backends optional. As was discussed at [1] this is a solution to a problem when we can't run QEMU as a device model in a non-privileged domain. This is because legacy backends assume that they are always running in domain with ID = 0. Actually, this may prevent running QEMU

[PATCH v4 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-12-01 Thread Volodymyr Babchuk
From: David Woodhouse This allows a XenDevice implementation to know whether it was created by QEMU, or merely discovered in XenStore after the toolstack created it. This will allow us to create frontend/backend nodes only when we should, rather than unconditionally attempting to overwrite them f

[PATCH v4 3/6] xen: decouple generic xen code from legacy backends codebase

2023-12-01 Thread Volodymyr Babchuk
In xen-all.c there are unneeded dependencies on xen-legacy-backend.c: - xen_init() uses xen_pv_printf() to report errors, but it does not provide a pointer to the struct XenLegacyDevice, so it is kind of useless, we can use standard error_report() instead. - xen-all.c has function xenstore_re

[PATCH v4 0/6] xen-arm: add support for virtio-pci

2023-12-01 Thread Volodymyr Babchuk
Hello, This patch series adds the basic support for virtio-pci for xen-arm guests. The main changes are in "xen_arm: Add virtual PCIe host bridge support", while most of other patches are required to make QEMU work as device model in a non-privileged domains like driver domain. New in version 4:

[PATCH-for-8.2 v2] tests/avocado: Update yamon-bin-02.22.zip URL

2023-12-01 Thread Philippe Mathieu-Daudé
http://www.imgtec.com/tools/mips-tools/downloads/ redirects to https://mips.com/downloads/yamon-version-02-22/ then points to an invalid path to a s3 bucket. Use the correct path. The site will eventually be fixed. Signed-off-by: Philippe Mathieu-Daudé --- Supersedes: <20231201142139.39816-1-phi.

Re: [RFC PATCH] tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 21:10, Alex Bennée wrote: I missed this when going through the recent failure logs. I can run the test 30 times without failure locally but it seems to hang pretty reliably on GitLab's CI infra-structure. Signed-off-by: Alex Bennée Cc: Philippe Mathieu-Daudé --- tests/avocado/repl

[RFC PATCH] tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky

2023-12-01 Thread Alex Bennée
I missed this when going through the recent failure logs. I can run the test 30 times without failure locally but it seems to hang pretty reliably on GitLab's CI infra-structure. Signed-off-by: Alex Bennée Cc: Philippe Mathieu-Daudé --- tests/avocado/replay_kernel.py | 3 +++ 1 file changed, 3

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-01 Thread Shu-Chun Weng
On Fri, Dec 1, 2023 at 4:42 AM Philippe Mathieu-Daudé wrote: > Hi Shu-Chun, > > On 1/12/23 04:21, Shu-Chun Weng wrote: > > Commit b8002058 strengthened openat()'s /proc detection by calling > > realpath(3) on the given path, which allows various paths and symlinks > > that points to the /proc fil

Re: [PATCH 12/12] block: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:53PM -0500, Stefan Hajnoczi wrote: > The AioContext lock no longer exists. > > There is one noteworthy change: > > - * More specifically, these functions use BDRV_POLL_WHILE(bs), which > - * requires the caller to be either in the main thread and hold > - * the

Re: [PATCH v2 2/4] multifd: Implement multifd compression accelerator

2023-12-01 Thread Fabiano Rosas
Yuan Liu writes: > when starting multifd live migration, if the compression method is > enabled, compression method can be accelerated using accelerators. > > Signed-off-by: Yuan Liu > Reviewed-by: Nanhai Zou > --- > migration/multifd.c | 38 -- > migration/

Re: [PATCH 11/12] job: remove outdated AioContext locking comments

2023-12-01 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:52PM -0500, Stefan Hajnoczi wrote: > The AioContext lock no longer exists. > > Signed-off-by: Stefan Hajnoczi > --- > include/qemu/job.h | 20 > 1 file changed, 20 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engi

Re: [PULL 0/6] gdbstub, avocado and gitlab updates

2023-12-01 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 1/12/23 17:50, Philippe Mathieu-Daudé wrote: >> Hi Alex, >> On 1/12/23 16:12, Alex Bennée wrote: >>> The following changes since commit >>> abf635ddfe3242df907f58967f3c1e6763bbca2d: >>> >>>    Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) >>

[PULL v2 0/5] gdbstub, avocado and gitlab updates

2023-12-01 Thread Alex Bennée
The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d: Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-more-8.2-fixes-011223-2 for you to fetch changes up to 5d25fcb

Re: [PULL 3/6] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 1/12/23 16:12, Alex Bennée wrote: >> The assets are no longer archived by Debian so we can't run this on >> CI. While some people may still have the test in their cache we do >> have more recent images from tuxrun so this isn't a great loss. >> Cc: Stefan Hajno

Re: [PATCH v2 3/4] configure: add qpl option

2023-12-01 Thread Fabiano Rosas
Yuan Liu writes: > the Query Processing Library (QPL) is an open-source library that > supports data compression and decompression features. > > add --enable-qpl and --disable-qpl options to enable and disable > the QPL compression accelerator. The QPL compression accelerator > can accelerate the

Re: [PULL 03/15] tests/acpi/bios-tables-test: do not write new blobs unless there are changes

2023-12-01 Thread Ani Sinha
> On 01-Dec-2023, at 10:45 PM, Michael S. Tsirkin wrote: > > From: Ani Sinha > > When dumping table blobs using rebuild-expected-aml.sh, table blobs from all > test variants are dumped regardless of whether there are any actual changes to > the tables or not. This creates lot of new files fo

[PULL 12/15] virtio-iommu: Remove useless !sdev check in virtio_iommu_probe()

2023-12-01 Thread Michael S. Tsirkin
From: Eric Auger The code already checks iommu_mr is not NULL so there is no need to check container_of() is not NULL. Remove the check. Fixes: CID 1523901 Fixes: 09b4c3d6a2 ("virtio-iommu: Record whether a probe request has been issued") Signed-off-by: Eric Auger Reported-by: Coverity (CID 152

[PULL 08/15] virtio-sound: add realize() error cleanup path

2023-12-01 Thread Michael S. Tsirkin
From: Manos Pitsidianakis QEMU crashes on exit when a virtio-sound device has failed to realise. Its vmstate field was not cleaned up properly with qemu_del_vm_change_state_handler(). This patch changes the realize() order as 1. Validate the given configuration values (no resources allocated

[PULL 14/15] vhost-user: fix the reconnect error

2023-12-01 Thread Michael S. Tsirkin
From: Li Feng If the error occurs in vhost_dev_init, the value of s->connected is set to true in advance, and there is no chance to enter this function execution again in the future. Signed-off-by: Li Feng Message-Id: <20231123055431.217792-2-fen...@smartx.com> Reviewed-by: Raphael Norwitz Rev

[PULL 11/15] hw/i386: fix short-circuit logic with non-optimizing builds

2023-12-01 Thread Michael S. Tsirkin
From: Daniel Hoffman `kvm_enabled()` is compiled down to `0` and short-circuit logic is used to remove references to undefined symbols at the compile stage. Some build configurations with some compilers don't attempt to simplify this logic down in some cases (the pattern appears to be that the li

[PULL 02/15] netdev: set timeout depending on loadavg

2023-12-01 Thread Michael S. Tsirkin
netdev test keeps failing sometimes. I don't think we should increase the timeout some more: let's try something else instead, testing how busy the system is. Seems to work for me. Signed-off-by: Michael S. Tsirkin --- tests/qtest/netdev-socket.c | 28 +++- 1 file change

[PULL 09/15] pcie_sriov: Remove g_new assertion

2023-12-01 Thread Michael S. Tsirkin
From: Akihiko Odaki g_new() aborts if the allocation fails so it returns NULL only if the requested allocation size is zero. register_vfs() makes such an allocation if NumVFs is zero so it should not assert that g_new() returns a non-NULL value. Fixes: 7c0fa8dff8 ("pcie: Add support for Single R

[PULL 00/15] virtio,pc,pci: fixes

2023-12-01 Thread Michael S. Tsirkin
We have a reported regression because of the switch to smbios 3.0, and maybe need to revert that, but Igor asked for a bit more time to investigate. The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d: Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) ar

[PULL 06/15] hw/audio/hda-codec: reenable the audio mixer

2023-12-01 Thread Michael S. Tsirkin
From: Volker Rümelin Commit b7639b7dd0 ("hw/audio: Simplify hda audio init") inverted the sense of hda codec property mixer during initialization. Change the code so that mixer=on enables the hda mixer emulation and mixer=off disables the hda mixer emulation. With this change audio playback and

[PULL 15/15] vhost-user-scsi: free the inflight area when reset

2023-12-01 Thread Michael S. Tsirkin
From: Li Feng Keep it the same to vhost-user-blk. At the same time, fix the vhost_reset_device. Signed-off-by: Li Feng Message-Id: <20231123055431.217792-3-fen...@smartx.com> Reviewed-by: Raphael Norwitz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/scsi/vhost-use

[PULL 01/15] osdep: add getloadavg

2023-12-01 Thread Michael S. Tsirkin
getloadavg is supported on Linux, BSDs, Solaris. Following man page: RETURN VALUE If the load average was unobtainable, -1 is returned; otherwise, the number of samples actually retrieved is returned. accordingly, make stub for systems which don't support this function return -1 for

[PULL 05/15] hw/audio/hda-codec: fix multiplication overflow

2023-12-01 Thread Michael S. Tsirkin
From: Volker Rümelin After a relatively short time, there is an multiplication overflow when multiplying (now - buft_start) with hda_bytes_per_second(). While the uptime now - buft_start only overflows after 2**63 ns = 292.27 years, this happens hda_bytes_per_second() times faster with the multip

[PULL 07/15] virtio-snd: check AUD_register_card return value

2023-12-01 Thread Michael S. Tsirkin
From: Manos Pitsidianakis AUD_register_card might fail. Even though errp was passed as an argument, the call's return value was not checked for failure. Fixes: Coverity CID 1523899 Signed-off-by: Manos Pitsidianakis Message-Id: <20231109162034.2108018-1-manos.pitsidiana...@linaro.org> Reviewed-

[PULL 03/15] tests/acpi/bios-tables-test: do not write new blobs unless there are changes

2023-12-01 Thread Michael S. Tsirkin
From: Ani Sinha When dumping table blobs using rebuild-expected-aml.sh, table blobs from all test variants are dumped regardless of whether there are any actual changes to the tables or not. This creates lot of new files for various test variants that are not part of the git repository. This is b

[PULL 10/15] hw/acpi/erst: Do not ignore Error* in realize handler

2023-12-01 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé erst_realizefn() passes @errp to functions without checking for failure. If it runs into another failure, it trips error_setv()'s assertion. Use the ERRP_GUARD() macro and check *errp, as suggested in commit ae7c80a7bd ("error: New macro ERRP_GUARD()"). Cc: qemu-st

[PULL 13/15] msix: unset PCIDevice::msix_vector_poll_notifier in rollback

2023-12-01 Thread Michael S. Tsirkin
From: Robert Hoo In the rollback in msix_set_vector_notifiers(), original patch forgot to undo msix_vector_poll_notifier pointer. Fixes: bbef882cc193 ("msi: add API to get notified about pending bit poll") Signed-off-by: Robert Hoo Message-Id: <20231113081349.1307-1-robert.hoo.li...@gmail.com>

[PULL 04/15] hw/audio/virtio-snd-pci: fix the PCI class code

2023-12-01 Thread Michael S. Tsirkin
From: Volker Rümelin The virtio sound device is currently an unclassified PCI device. ~> sudo lspci -s '00:02.0' -v -nn | head -n 2 00:02.0 Unclassified device [00ff]: Red Hat, Inc. Device [1af4:1059] (rev 01) Subsystem: Red Hat, Inc. Device [1af4:1100] Set the correct PCI class code t

Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2023-12-01 Thread Steven Sistare
On 11/30/2023 5:10 PM, Peter Xu wrote: > On Thu, Nov 30, 2023 at 01:37:16PM -0800, Steve Sistare wrote: >> Currently, a vm in the suspended state is not completely stopped. The VCPUs >> have been paused, but the cpu clock still runs, and runstate notifiers for >> the transition to stopped have not

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-01 Thread Helge Deller
On 12/1/23 04:21, Shu-Chun Weng wrote: Commit b8002058 strengthened openat()'s /proc detection by calling realpath(3) on the given path, which allows various paths and symlinks that points to the /proc file system to be intercepted correctly. Using realpath(3), though, has a side effect that it

Re: [PULL 0/6] gdbstub, avocado and gitlab updates

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 17:50, Philippe Mathieu-Daudé wrote: Hi Alex, On 1/12/23 16:12, Alex Bennée wrote: The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d:    Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) are available in the Git repository at:    https://

Re: [PULL 0/6] gdbstub, avocado and gitlab updates

2023-12-01 Thread Philippe Mathieu-Daudé
Hi Alex, On 1/12/23 16:12, Alex Bennée wrote: The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d: Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-more-8.2-fix

Re: [PULL 3/6] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 16:12, Alex Bennée wrote: The assets are no longer archived by Debian so we can't run this on CI. While some people may still have the test in their cache we do have more recent images from tuxrun so this isn't a great loss. Cc: Stefan Hajnoczi Cc: Philippe Mathieu-Daudé Acked-by: S

Re: [PATCH 4/4] dma-helpers: don't lock AioContext in dma_blk_cb()

2023-12-01 Thread Kevin Wolf
Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > Commit abfcd2760b3e ("dma-helpers: prevent dma_blk_cb() vs > dma_aio_cancel() race") acquired the AioContext lock inside dma_blk_cb() > to avoid a race with scsi_device_purge_requests() running in the main > loop thread. > > The SCSI code n

Re: [PATCH 3/4] scsi: don't lock AioContext in I/O code path

2023-12-01 Thread Kevin Wolf
Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > blk_aio_*() doesn't require the AioContext lock and the SCSI subsystem's > internal state also does not anymore. > > Signed-off-by: Stefan Hajnoczi With this one, I'm not really confident enough to give a R-b. I couldn't find a problem, b

[PULL 1/1] migration: Plug memory leak with migration URIs

2023-12-01 Thread Peter Xu
From: Het Gala migrate_uri_parse() allocates memory to 'channel' if the user opts for old syntax - uri, which is leaked because there is no code for freeing 'channel'. So, free channel to avoid memory leak in case where 'channels' is empty and uri parsing is required. Fixes: 5994024f ("migration

[PULL 0/1] Migration 20231201 patches

2023-12-01 Thread Peter Xu
The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d: Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) are available in the Git repository at: https://github.com/xzpeter/qemu.git tags/migration-20231201-pull-request for you to fetch changes up to

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-01 Thread Steven Sistare
On 11/30/2023 6:06 PM, Peter Xu wrote: > On Thu, Nov 30, 2023 at 01:37:18PM -0800, Steve Sistare wrote: >> If the outgoing machine was previously suspended, propagate that to the >> incoming side via global_state, so a subsequent vm_start restores the >> suspended state. To maintain backward and f

Re: [PATCH 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-12-01 Thread Kevin Wolf
Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > virtio_queue_aio_attach_host_notifier() does not require the AioContext > lock. Stop taking the lock and remember add an explicit smp_wmb() > because we were relying on the implicit barrier in the AioContext lock > before. > > Signed-off-by

Re: [PATCH 1/4] scsi: only access SCSIDevice->requests from one thread

2023-12-01 Thread Kevin Wolf
Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > Stop depending on the AioContext lock and instead access > SCSIDevice->requests from only one thread at a time: > - When the VM is running only the BlockBackend's AioContext may access > the requests list. > - When the VM is stopped only t

Re: [RFC 1/2] qapi/virtio: introduce the "show-bits" argument for x-query-virtio-status

2023-12-01 Thread Laurent Vivier
On 12/1/23 16:21, Markus Armbruster wrote: Laurent Vivier writes: On 11/21/23 08:58, Markus Armbruster wrote: Laurent, there's a question for you at the end. Yong Huang writes: On Thu, Nov 16, 2023 at 10:44 PM Markus Armbruster wrote: Hyman Huang writes: This patch allows to display

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-12-01 Thread Peter Xu
On Fri, Dec 01, 2023 at 07:19:45AM +0100, Markus Armbruster wrote: > I meant the first visible case, i.e. if (channels). Sorry for being > less than clear! > > The problem is to free the result of migrate_uri_parse(). > > The patch's solution is to use @channel *only* for holding that result, >

Re: [RFC 1/2] qapi/virtio: introduce the "show-bits" argument for x-query-virtio-status

2023-12-01 Thread Markus Armbruster
Laurent Vivier writes: > On 11/21/23 08:58, Markus Armbruster wrote: >> Laurent, there's a question for you at the end. >> >> Yong Huang writes: >> >>> On Thu, Nov 16, 2023 at 10:44 PM Markus Armbruster >>> wrote: >>> Hyman Huang writes: > This patch allows to display feature a

Re: [PATCH v2 4/7] tests/avocado: drop malta yamon tests

2023-12-01 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 1/12/23 13:49, Alex Bennée wrote: >> Philippe Mathieu-Daudé writes: >> >>> Hi Alex, >>> >>> On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer available on the website so these are blocking CI. >>> >>> How are these "blocking CI"? Mi

[PULL 2/6] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-12-01 Thread Alex Bennée
It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no point developers running the tests locally

Re: [PATCH v2 3/7] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 1/12/23 14:45, Philippe Mathieu-Daudé wrote: >> On 1/12/23 10:36, Alex Bennée wrote: >>> The assets are no longer archived by Debian so we can't run this on >>> CI. While some people may still have the test in their cache we do >>> have more recent images from

[PULL 6/6] gitlab: add optional job to run flaky avocado tests

2023-12-01 Thread Alex Bennée
One problem with flaky tests is they often only fail under CI conditions which makes it hard to debug. We add an optional allow_fail job so developers can trigger the only the flaky tests in the CI environment if they are debugging. Reviewed-by: Richard Henderson Acked-by: Stefan Hajnoczi Signed

[PULL 3/6] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Alex Bennée
The assets are no longer archived by Debian so we can't run this on CI. While some people may still have the test in their cache we do have more recent images from tuxrun so this isn't a great loss. Cc: Stefan Hajnoczi Cc: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Alex Ben

[PULL 4/6] tests/avocado: tag sbsa tests as tcg only

2023-12-01 Thread Alex Bennée
As firmware runs at a higher privilege level than the hypervisor we can only run these tests under TCG emulation. Reviewed-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Message-Id: <20231201093633.2551497-6-alex.ben...@linaro.org> diff --git a/tests/avocado/ma

[PULL 1/6] gdbstub: use a better signal when we halt for IO reasons

2023-12-01 Thread Alex Bennée
The gdb description GDB_SIGNAL_IO is "I/O possible" and by default gdb will try and restart the guest, getting us nowhere. Report GDB_SIGNAL_STOP instead which should at least halt the session at the failure point. Reviewed-by: Luis Machado Reviewed-by: Richard Henderson Acked-by: Stefan Hajnocz

[PULL 0/6] gdbstub, avocado and gitlab updates

2023-12-01 Thread Alex Bennée
The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d: Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-more-8.2-fixes-011223-1 for you to fetch changes up to a7a740c

[PULL 5/6] gitlab: build the correct microblaze target

2023-12-01 Thread Alex Bennée
We inadvertently built the LE target for BE tests. Fixes: 78ebc00b06 (gitlab: shuffle some targets and reduce avocado noise) Reviewed-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Alex Bennée Message-Id: <20231201093633.2551497-7-alex.ben...@linaro.org> diff --git a/.gitl

Re: accel/tcg: Define TCG_GUEST_DEFAULT_MO in cpu-param.h?

2023-12-01 Thread Anton Johansson via
On 01/12/23, Philippe Mathieu-Daudé wrote: > Hi, > > Trying to restrict "cpu.h" to target-specific code, > any objection to define TCG_GUEST_DEFAULT_MO (used in > accel/tcg/) in cpu-param.h? > > Thanks, > > Phil. Not from our end, seems like a good idea! Btw, I've managed to get cputlb.c to co

accel/tcg: Define TCG_GUEST_DEFAULT_MO in cpu-param.h?

2023-12-01 Thread Philippe Mathieu-Daudé
Hi, Trying to restrict "cpu.h" to target-specific code, any objection to define TCG_GUEST_DEFAULT_MO (used in accel/tcg/) in cpu-param.h? Thanks, Phil.

[PATCH-for-9.0 2/2] target/arm/kvm: Use generic kvm_supports_guest_debug()

2023-12-01 Thread Philippe Mathieu-Daudé
Do not open-code the generic kvm_supports_guest_debug(). Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm64.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 3c175c93a7..031d20ad92 100644 --- a/target/arm/kvm64.c

[PATCH-for-9.0 0/2] target/arm/kvm: Use generic kvm_supports_guest_debug()

2023-12-01 Thread Philippe Mathieu-Daudé
Expose kvm_supports_guest_debug() to all targets and simplify ARM using it. Philippe Mathieu-Daudé (2): accel/kvm: Expose kvm_supports_guest_debug() prototype target/arm/kvm: Use generic kvm_supports_guest_debug() accel/kvm/kvm-cpus.h | 1 - include/sysemu/kvm.h | 1 + target/arm/kvm64.c |

[PATCH-for-9.0 1/2] accel/kvm: Expose kvm_supports_guest_debug() prototype

2023-12-01 Thread Philippe Mathieu-Daudé
kvm_supports_guest_debug() should be accessible by KVM implementations. Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-cpus.h | 1 - include/sysemu/kvm.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-cpus.h b/accel/kvm/kvm-cpus.h index ca40add32c..a23

[PATCH 3/3] iotests: Basic tests for internal snapshots

2023-12-01 Thread Kevin Wolf
We have a few test cases that include tests for corner case aspects of internal snapshots, but nothing that tests that they actually function as snapshots or that involves deleting a snapshot. Add a test for this kind of basic internal snapshot functionality. The error cases include a regression t

[PATCH 1/3] block: Fix crash when loading snapshot on inactive node

2023-12-01 Thread Kevin Wolf
bdrv_is_read_only() only checks if the node is configured to be read-only eventually, but even if it returns false, writing to the node may not be permitted at the moment (because it's inactive). bdrv_is_writable() checks that the node can be written to right now, and this is what the snapshot ope

[PATCH 0/3] block: Make snapshots fail gracefully on inactive images

2023-12-01 Thread Kevin Wolf
Kevin Wolf (3): block: Fix crash when loading snapshot on inactive node vl: Improve error message for conflicting -incoming and -loadvm iotests: Basic tests for internal snapshots block/snapshot.c | 4 +- system/vl.c | 4 +

[PATCH 2/3] vl: Improve error message for conflicting -incoming and -loadvm

2023-12-01 Thread Kevin Wolf
Currently, the conflict between -incoming and -loadvm is only detected when loading the snapshot fails because the image is still inactive for the incoming migration. This results in a suboptimal error message: $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer qemu-system-x86

[PATCH-for-8.2] tests/avocado: Stop fetching yamon-bin-02.22.zip

2023-12-01 Thread Philippe Mathieu-Daudé
Per https://mips.com/develop/tools/boot-loaders/: To support existing users of these, and the QEMU project, YAMON is now available under the GPL License. However the link https://mips.com/downloads/yamon-version-02-22/ is invalid: > GET /tools/mips-tools/downloads/yamon/yamon-bin-02.22.zip

Re: [PATCH v2 4/7] tests/avocado: drop malta yamon tests

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 13:49, Alex Bennée wrote: Philippe Mathieu-Daudé writes: Hi Alex, On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer available on the website so these are blocking CI. How are these "blocking CI"? Missing artifact wasn't be fatal, is it now? Also, did the artifact ca

[PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2023-12-01 Thread Wentao Jia
VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature are important feature for dpdk vdpa packets transmitting performance, add the 2 features at vhost-user front-end to negotiation with backend. Signed-off-by: Kyle Xu zhenbing...@corigine.com Signed-off-by: Wen

Re: [PATCH v2 3/7] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 14:57, Philippe Mathieu-Daudé wrote: On 1/12/23 14:45, Philippe Mathieu-Daudé wrote: On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer archived by Debian so we can't run this on CI. While some people may still have the test in their cache we do have more recent images fro

Re: [PATCH v2 3/7] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 14:45, Philippe Mathieu-Daudé wrote: On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer archived by Debian so we can't run this on CI. While some people may still have the test in their cache we do have more recent images from tuxrun so this isn't a great loss. Signed-off-

Re: [PATCH v2 3/7] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer archived by Debian so we can't run this on CI. While some people may still have the test in their cache we do have more recent images from tuxrun so this isn't a great loss. Signed-off-by: Alex Bennée Cc: Stefan Hajnoczi Cc: Philipp

Re: [PATCH v2 0/7] final fixes for 8.2

2023-12-01 Thread Stefan Hajnoczi
On Fri, 1 Dec 2023 at 07:56, Alex Bennée wrote: > > 8.2 is looking fairly stable but I do have one bug fix for gdbstub > which I came across while debugging something else. The changes for > avocado rationalise all flaky tests under the QEMU_TEST_FLAKY_TESTS > environment variable. The final patch

Re: [PATCH v2 4/7] tests/avocado: drop malta yamon tests

2023-12-01 Thread Philippe Mathieu-Daudé
Hi Alex, On 1/12/23 13:49, Alex Bennée wrote: Philippe Mathieu-Daudé writes: Hi Alex, On 1/12/23 10:36, Alex Bennée wrote: The assets are no longer available on the website so these are blocking CI. How are these "blocking CI"? Missing artifact wasn't be fatal, is it now? Also, did the a

Re: [PATCH v6 0/4] compare machine type compat_props

2023-12-01 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Maksim, > > On 8/11/23 16:38, Maksim Davydov wrote: >> This script can be used to choose the best machine type in the >> appropriate cases. Also we have to check compat_props of the old MT >> after changes to be sure that they haven't broken old the MT. For >>

Re: [PATCH v2 4/7] tests/avocado: drop malta yamon tests

2023-12-01 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 1/12/23 10:36, Alex Bennée wrote: >> The assets are no longer available on the website so these are >> blocking CI. >> > > How are these "blocking CI"? Missing artifact wasn't be fatal, > is it now? Also, did the artifact cache got flushed? These

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-01 Thread Philippe Mathieu-Daudé
Hi Shu-Chun, On 1/12/23 04:21, Shu-Chun Weng wrote: Commit b8002058 strengthened openat()'s /proc detection by calling realpath(3) on the given path, which allows various paths and symlinks that points to the /proc file system to be intercepted correctly. Using realpath(3), though, has a side e

Re: [PATCH-for-8.2? 1/2] linux-user: Define TARGET_O_LARGEFILE for aarch64

2023-12-01 Thread Philippe Mathieu-Daudé
On 1/12/23 04:21, Shu-Chun Weng wrote: In 050a1ba, when moving the macros from preprocessor-guarding to file-based definition, TARGET_O_LARGEFILE appeared to have been accidentally left off. This may have correctness implication, but so far I was only confused by strace's output. Fixes: 050a1

[PATCH 0/7] ppc: pnv ChipTOD and various timebase fixes

2023-12-01 Thread Nicholas Piggin
The chiptod/TFMR/state machine is not really tied to the other time register fixes, but they touch some of the same code, and logically same facility. Changes since v1 of chiptod patches: - Split hackish ChipTOD<->TFMR/TBST interface into its own patch - Fix multi-socket addressing on P9 / chip ID

[PATCH] target/ppc: Re-name registers to match ISA

2023-12-01 Thread Nicholas Piggin
Several registers have names that don't match the ISA (or convention with other QEMU PPC registers), making them unintuitive to use with GDB. Fortunately most of these registers are obscure and/or have not been correctly implemented in the gdb server (e.g., DEC, TB, CFAR), so risk of breaking user

[PATCH v3 5/8] ppc/pnv: Wire ChipTOD model to powernv9 and powernv10 machines

2023-12-01 Thread Nicholas Piggin
Wire the ChipTOD model to powernv9 and powernv10 machines. Suggested-by-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- include/hw/ppc/pnv_chip.h | 3 +++ hw/ppc/pnv.c | 30 ++ 2 files changed, 33 insertions(+) diff --git a/include/hw/ppc/pnv_c

[PATCH v3 7/8] target/ppc: Implement core timebase state machine and TFMR

2023-12-01 Thread Nicholas Piggin
This implements the core timebase state machine, which is the core side of the time-of-day system in POWER processors. This facility is operated by control fields in the TFMR register, which also contains status fields. The core timebase interacts with the chiptod hardware, primarily to receive TO

[PATCH v3 8/8] target/ppc: Add SMT support to time facilities

2023-12-01 Thread Nicholas Piggin
The TB, VTB, PURR, HDEC SPRs are per-LPAR registers, and the TFMR is a per-core register. Add the necessary SMT synchronisation and value sharing. The TFMR can only drive the timebase state machine via thread 0 of the core, which is almost certainly not right, but it is enough for skiboot and cert

[PATCH v3 6/8] pnv/chiptod: Implement the ChipTOD to Core transfer

2023-12-01 Thread Nicholas Piggin
One of the functions of the ChipTOD is to transfer TOD to the Core (aka PC - Pervasive Core) timebase facility. The ChipTOD can be programmed with a target address to send the TOD value to. The hardware implementation seems to perform this by sending the TOD value to a SCOM address. This implemen

[PATCH v3 1/8] target/ppc: Rename TBL to TB on 64-bit

2023-12-01 Thread Nicholas Piggin
>From the earliest PowerPC ISA, TBR (later SPR) 268 has been called TB and accessed with mftb instruction. The problem is that TB is the name of the 64-bit register, and 32-bit implementations can only read the lower half with one instruction, so 268 has also been called TBL and it does only read T

[PATCH v3 4/8] pnv/chiptod: Add POWER9/10 chiptod model

2023-12-01 Thread Nicholas Piggin
The ChipTOD (for Time-Of-Day) is a chip pervasive facility in IBM POWER (powernv) processors that keeps a time of day clock. In particular for this model are facilities that initialise and start the time of day clock, and that synchronise that clock to cores on the chip, and to other chips. In thi

[PATCH v3 2/8] target/ppc: Improve timebase register defines naming

2023-12-01 Thread Nicholas Piggin
The timebase in ppc started out with the mftb instruction which is like mfspr but addressed timebase registers (TBRs) rather than SPRs. These instructions could be used to read TB and TBU at 268 and 269. Timebase could be written via the TBL and TBU SPRs at 284 and 285. The ISA changed around v2.0

[PATCH v3 3/8] target/ppc: Fix move-to timebase SPR access permissions

2023-12-01 Thread Nicholas Piggin
The move-to timebase registers TBU and TBL can not be read, and they can not be written in supervisor mode on hypervisor-capable CPUs. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- target/ppc/helper_regs.c | 31 +++ 1 file changed, 23 insertions(+)

[PATCH v3 0/8] ppc: pnv ChipTOD and various timebase fixes

2023-12-01 Thread Nicholas Piggin
This accumulated a few changes and review comment fixes since v2: - Remove the now unnecessary class xscom ops. - Split the introduction of the chiptod model from wiring it to machines. - Fix chiptod model patch changelog. - Wrap chiptod/tb state machine variables in CPUArchState in a struct. Wi

[PATCH v5] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-12-01 Thread Jai Arora
Patch removes DPRINTF macro and adds multiple tracepoints to capture different kvm events. We also drop the DPRINTFs that don't add any additional information than trace_kvm_run_exit already does. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 Signed-off-by: Jai Arora Reviewed-by:

[PATCH 1/2] target/riscv: FIX xATP_MODE validation

2023-12-01 Thread Irina Ryapolova
The SATP register is an SXLEN-bit read/write WARL register. It means that CSR fields are only defined for a subset of bit encodings, but allow any value to be written while guaranteeing to return a legal value whenever read (See riscv-privileged-20211203, SATP CSR). For example on rv64 we are tr

[PATCH 2/2] target/riscv: UPDATE xATP write CSR

2023-12-01 Thread Irina Ryapolova
Added xATP_MODE validation for vsatp/hgatp CSRs. The xATP register is an SXLEN-bit read/write WARL register, so the legal value must be returned (See riscv-privileged-20211203, SATP/VSATP/HGATP CSRs). Signed-off-by: Irina Ryapolova --- target/riscv/csr.c | 52 ++-

Re: [PATCH v2 3/7] tests/avocado: drop BootLinuxConsole.test_mips_malta_cpio test

2023-12-01 Thread Stefan Hajnoczi
On Fri, Dec 1, 2023, 04:38 Alex Bennée wrote: > The assets are no longer archived by Debian so we can't run this on > CI. While some people may still have the test in their cache we do > have more recent images from tuxrun so this isn't a great loss. > > Signed-off-by: Alex Bennée > Cc: Stefan H

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-12-01 Thread Claudio Fontana
On 11/30/23 18:51, Daniel P. Berrangé wrote: > On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: >> On 30.11.23 17:01, Sean Christopherson wrote: >>> On Thu, Nov 30, 2023, David Hildenbrand wrote: On 30.11.23 08:32, Xiaoyao Li wrote: > On 11/20/2023 5:26 PM, David Hildenbr

Re: [PATCH v3 57/70] i386/tdx: Wire TDX_REPORT_FATAL_ERROR with GuestPanic facility

2023-12-01 Thread Markus Armbruster
Xiaoyao Li writes: > Integrate TDX's TDX_REPORT_FATAL_ERROR into QEMU GuestPanic facility > > Originated-from: Isaku Yamahata > Signed-off-by: Xiaoyao Li > --- > Changes from v2: > - Add docmentation of new type and struct (Daniel) > - refine the error message handling (Daniel) > --- > qapi/ru

Re: [PATCH v6 0/4] compare machine type compat_props

2023-12-01 Thread Philippe Mathieu-Daudé
Hi Maksim, On 8/11/23 16:38, Maksim Davydov wrote: This script can be used to choose the best machine type in the appropriate cases. Also we have to check compat_props of the old MT after changes to be sure that they haven't broken old the MT. For example, pc_compat_3_1 of pc-q35-3.1 has Icelake

Re: [PATCH v3 52/70] i386/tdx: handle TDG.VP.VMCALL

2023-12-01 Thread Markus Armbruster
Xiaoyao Li writes: > From: Isaku Yamahata > > For GetQuote, delegate a request to Quote Generation Service. > Add property "quote-generation-socket" to tdx-guest, whihc is a property > of type SocketAddress to specify Quote Generation Service(QGS). > > On request, connect to the QGS, read reques

  1   2   >