Re: [PATCH v8 00/23] Consolidate PIIX south bridges

2023-04-21 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 10:21:38PM +0100, Bernhard Beschow wrote: > This series consolidates the implementations of the PIIX3 and PIIX4 south > bridges and is an extended version of [1]. The motivation is to share as much > code as possible and to bring both device models to feature parity such tha

[PATCH 1/4] target/i386: Enable XSAVES support for user mode CET states

2023-04-21 Thread Yang Weijiang
Add CET_U bit support in XSS MSR and report data size in CPUID. XSAVES/XRSTORS are used to boost CET states save/restore process, XSS[bit 11] corresponds to user mode CET states. CET Shadow Stack(SHSTK) and Indirect Branch Tracking(IBT) features are enumerated via CPUID.(EAX=07H,ECX=0H):ECX[7] and

[PATCH 0/4] Enable VMM userspace support for CET virtualization

2023-04-21 Thread Yang Weijiang
These are VMM userspace enabling patches for CET virtualization. Currently CET user mode SHSTK/IBT and kernel mode IBT are supported. supervisor SHSTK are not supported now, so related MSRs support are not included in this series. Yang Weijiang (4): target/i386: Enable XSAVES support for user mo

[PATCH 2/4] target/i386: Add CET MSRs access interfaces

2023-04-21 Thread Yang Weijiang
Add access interfaces for supported CET MSRs. These CET MSRs include: MSR_IA32_U_CET - store user mode CET control bits. MSR_IA32_S_CET - store supervisor mode CET control bits. MSR_IA32_PL3_SSP - strore user mode shadow stack pointer. MSR_KVM_GUEST_SSP - store current shadow stack pointer. Other

[PATCH 3/4] target/i386: Enable CET states migration

2023-04-21 Thread Yang Weijiang
Add supported CET states in vmstate for VM migration. Other MSRs, i.e., MSR_IA32_PL{0,1,2}_SSP and MSR_IA32_INTR_SSP_TBL are for non-supported supervisor mode shadow stack, are ignored now. Signed-off-by: Yang Weijiang --- target/i386/machine.c | 81 +++

Re: [PATCH 01/11] Signed-off-by: Karim Taha

2023-04-21 Thread Daniel P . Berrangé
On Fri, Apr 21, 2023 at 07:22:45AM +0200, Karim Taha wrote: > From: Warner Losh > > Allow guest_base to be initialized on 64-bit hosts, the initial value is used > by g2h_untagged function defined in include/exec/cpu_ldst.h This commit message is all incorrectly structured I'm afraid. There ne

[PATCH 4/4] target/i386: Advertise CET flags in feature words

2023-04-21 Thread Yang Weijiang
Add SHSTK and IBT flags in feature words alone with entry/exit control flags. CET SHSTK and IBT feature are enumerated via CPUID(EAX=7,ECX=0) ECX[bit 7] and EDX[bit 20]. CET states load/restore at vmentry/ vmexit are controlled by VMX_ENTRY_CTLS[bit 20] and VMX_EXIT_CTLS[bit 28]. Enable these flag

Re: [PATCH v4 0/7] QEMU CXL Provide mock CXL events and irq support

2023-04-21 Thread Michael S. Tsirkin
On Fri, Mar 03, 2023 at 03:28:56PM +, Jonathan Cameron wrote: > Whilst I'm an optimist, I suspect this is now 8.1 material because we have > 5 CXL patch sets outstanding before it. Current bottleneck being QAPI review > for the RAS error series. RAS thing is in, right? could you rebase this o

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-04-21 Thread Michael S. Tsirkin
On Mon, Apr 03, 2023 at 09:41:17AM +0200, Bernhard Beschow wrote: > There is currently a dedicated PIIX3 device model for use under Xen. By > reusing > existing PCI API during initialization this device model can be eliminated and > the plain PIIX3 device model can be used instead. > > Resolving

Re: [PATCH v4 2/7] hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()

2023-04-21 Thread Michael S. Tsirkin
On Mon, Apr 03, 2023 at 09:41:19AM +0200, Bernhard Beschow wrote: > When calling pci_bus_irqs() multiple times on the same object without calling > pci_bus_irqs_cleanup() in between PCIBus::irq_count[] is currently leaked. > Let's fix this because Xen will do just that in a few commits, and because

Re: [PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd

2023-04-21 Thread Michael S. Tsirkin
On Tue, Mar 28, 2023 at 09:37:16AM +0200, Eugenio Perez Martin wrote: > > > diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c > > > index bbabea18f3..7a2053b8d9 100644 > > > --- a/hw/virtio/vhost-vdpa.c > > > +++ b/hw/virtio/vhost-vdpa.c > > > @@ -335,38 +335,45 @@ static const MemoryLis

Re: [RFC PATCH v1 00/26] migration: File based migration with multifd and fixed-ram

2023-04-21 Thread Daniel P . Berrangé
On Thu, Apr 20, 2023 at 03:19:39PM -0400, Peter Xu wrote: > On Thu, Apr 20, 2023 at 10:02:43AM +0100, Daniel P. Berrangé wrote: > > On Wed, Apr 19, 2023 at 03:07:19PM -0400, Peter Xu wrote: > > > On Wed, Apr 19, 2023 at 06:12:05PM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Apr 18, 2023 at 03:

Re: [REPOST PATCH v3 0/5] Support x2APIC mode with TCG accelerator

2023-04-21 Thread Michael S. Tsirkin
On Tue, Apr 11, 2023 at 09:24:35PM +0700, Bui Quang Minh wrote: > [Reposting due to broken threading in previous post] > > Hi everyone, > > This series implements x2APIC mode in userspace local APIC and the > RDMSR/WRMSR helper to access x2APIC registers in x2APIC mode. Intel iommu > and AMD iomm

Re: [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests

2023-04-21 Thread Michael S. Tsirkin
On Tue, Apr 18, 2023 at 07:20:29PM +0200, Andrey Ryabinin wrote: > > > On 4/18/23 08:17, Michael S. Tsirkin wrote: > > On Tue, Apr 18, 2023 at 05:13:11AM +, Raphael Norwitz wrote: > >> Hey Andrey - apologies for the late reply here. > >> > >> It sounds like you are dealing with a buggy guest,

Re: [PATCH] pcie: Release references of virtual functions

2023-04-21 Thread Michael S. Tsirkin
On Tue, Apr 11, 2023 at 12:11:30PM +0200, Philippe Mathieu-Daudé wrote: > On 11/4/23 11:04, Akihiko Odaki wrote: > > pci_new() automatically retains a reference to a virtual function when > > registering it so we need to release the reference when unregistering. > > > > Fixes: 7c0fa8dff8 ("pcie: A

Re: [PATCH v2 3/4] hw/acpi: i386: bump MADT to revision 5

2023-04-21 Thread Michael S. Tsirkin
On Thu, Apr 20, 2023 at 09:22:57AM -0500, Eric DeVolder wrote: > > > On 4/20/23 03:05, Ani Sinha wrote: > > On Tue, Apr 18, 2023 at 10:22 PM Eric DeVolder > > wrote: > > > > > > Currently i386 QEMU generates MADT revision 3, and reports > > > MADT revision 1. ACPI 6.3 introduces MADT revision

Re: [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance.

2023-04-21 Thread Michael S. Tsirkin
On Thu, Apr 20, 2023 at 03:27:48PM +0100, Jonathan Cameron wrote: > Peter Maydell highlighted an incorrect conversion to TYPE_PXB_DEVICE from > a device that didn't have that a an ancestor type. PXB_DEV() used instead of > PXB_CXL_DEV()/ > > https://lore.kernel.org/qemu-devel/cafeaca-+de+eelce4ysa

Re: [PULL 00/11] Hexagon queue

2023-04-21 Thread Richard Henderson
On 4/20/23 05:26, Taylor Simpson wrote: The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12: Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +) are available in the Git repository at: https://github.com/q

Re: [PATCH 0/1] pcie: Allow atomic completion on PCIE root port

2023-04-21 Thread Michael S. Tsirkin
On Thu, Apr 20, 2023 at 05:38:39PM +0200, ro...@streamhpc.com wrote: > From: Robin Voetter > > The ROCm driver for Linux uses PCIe atomics to schedule work and > generally communicate between the host and the device. This does not > currently work in QEMU with regular vfio-pci passthrough, becau

Re: [PATCH v3 00/18] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()

2023-04-21 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 11:40:40PM +0100, Philippe Mathieu-Daudé wrote: > Since v2: rebased > > I'm posting this series as it to not block Bernhard's PIIX > cleanup work. I don't have code change planned, but eventually > reword / improve commit descriptions. > Tested commit after commit to be su

Re: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 21.04.23 06:02, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Thursday, April 20, 2023 6:53 AM To: qemu-devel@nongnu.org Cc: qemu-bl...@nongnu.org; michael.r...@amd.com; arm...@redhat.com; ebl...@redhat.com; jasow...@redhat.com; quint...@redhat.com;

[PATCH v3 0/2] tests: lcitool: Switch to OpenSUSE Leap 15.4

2023-04-21 Thread Paolo Bonzini
v3 of Peter's series, which uses a newer libvirt-ci commit. With this version, future updates of the libvirt-ci submodule will pick new Leap 15 releases without the need for changes to tests/lcitool/mappings.yml or tests/lcitool/targets. Paolo Supersedes: Peter Krempa (2): tests: libvirt-ci:

[PATCH v3 2/2] tests: lcitool: Switch to OpenSUSE Leap 15.4

2023-04-21 Thread Paolo Bonzini
From: Peter Krempa Since OpenSUSE Leap 15 counts as a single major release of an LTS distribution, lcitool has changed the target name to remove the minor version. Adjust the mappings and refresh script. This also updates the dockerfile to 15.4, since the 15.3 version is EOL now: https://get.o

[PATCH v3 1/2] tests: libvirt-ci: Update to commit '2fa24dce8bc'

2023-04-21 Thread Paolo Bonzini
From: Peter Krempa Update to commit which has fixes needed for OpenSUSE 15.4 and re-generate output files. Signed-off-by: Peter Krempa Message-Id: Signed-off-by: Paolo Bonzini --- tests/docker/dockerfiles/centos8.docker | 1 - tests/docker/dockerfiles/debian-amd64-cross.docker

Re: [PATCH 0/4] Qemu SEV reduced-phys-bits fixes

2023-04-21 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 4/4] configure: add --disable-colo-filters option

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 21.04.23 05:22, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Thursday, April 20, 2023 7:26 PM To: Zhang, Chen ; qemu-devel@nongnu.org Cc: qemu-bl...@nongnu.org; michael.r...@amd.com; arm...@redhat.com; ebl...@redhat.com; jasow...@redhat.com; quint.

Re: [PATCH 2/2] docs/interop: Delete qmp-intro.txt

2023-04-21 Thread Peter Maydell
On Thu, 20 Apr 2023 at 20:43, Eric Blake wrote: > > On Thu, Apr 20, 2023 at 04:03:52PM +0100, Peter Maydell wrote: > > qmp-intro.txt is quite small and provides very little information > > that isn't already in the documentation elsewhere. Fold the example > > command lines into qemu-options.hx,

Re: [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance.

2023-04-21 Thread Peter Maydell
On Fri, 21 Apr 2023 at 09:19, Michael S. Tsirkin wrote: > > On Thu, Apr 20, 2023 at 03:27:48PM +0100, Jonathan Cameron wrote: > > Peter Maydell highlighted an incorrect conversion to TYPE_PXB_DEVICE from > > a device that didn't have that a an ancestor type. PXB_DEV() used instead of > > PXB_CXL_D

Re: [PATCH 9/9] docs/style: call out the use of GUARD macros

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 20.04.23 18:57, Alex Bennée wrote: There use makes our code safer so we should mention them. Signed-off-by: Alex Bennée Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/devel/style.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/d

Re: [PATCH v3 0/2] tests: lcitool: Switch to OpenSUSE Leap 15.4

2023-04-21 Thread Philippe Mathieu-Daudé
On 21/4/23 10:40, Paolo Bonzini wrote: v3 of Peter's series, which uses a newer libvirt-ci commit. With this version, future updates of the libvirt-ci submodule will pick new Leap 15 releases without the need for changes to tests/lcitool/mappings.yml or tests/lcitool/targets. Paolo Supersedes:

[PATCH v2] block: add configure options for excluding vmdk, vhdx and vpc

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Let's add --enable / --disable configure options for these formats, so that those who don't need them may not build them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- v2: just a resend instead of ping, bonus: fix mistake in commit message. block/meson.build | 18 +---

[PULL 02/25] build-sys: prevent meson from downloading wrapped subprojects

2023-04-21 Thread Paolo Bonzini
From: Marc-André Lureau The following patches are going to introduce meson wrap dependencies, which is a solution to download and build missing dependencies. The QEMU build-system would do network access with no way to avoid the fallback. As a start, hardcode "--wrap-mode=nodownload" in configur

[PULL 05/25] vnc: avoid underflow when accessing user-provided address

2023-04-21 Thread Paolo Bonzini
If hostlen is zero, there is a possibility that addrstr[hostlen - 1] underflows and, if a closing bracked is there, hostlen - 2 is passed to g_strndup() on the next line. If websocket==false then addrstr[0] would be a colon, but if websocket==true this could in principle happen. Fix it by checkin

[PULL 23/25] configure: Honour cross-prefix when finding ObjC compiler

2023-04-21 Thread Paolo Bonzini
From: Peter Maydell Currently when configure picks an ObjectiveC compiler it doesn't pay attention to the cross-prefix. This isn't a big deal in practice, because we only use ObjC on macos and you can't cross-compile to macos. But it's a bit inconsistent. Rearrange the handling of objcc in con

[PULL 04/25] nvme: remove constant argument to tracepoint

2023-04-21 Thread Paolo Bonzini
The last argument to -pci_nvme_err_startfail_virt_state is always "OFFLINE" due to the enclosing "if" condition requiring !sctrl->scs. Reported by Coverity. Signed-off-by: Paolo Bonzini --- hw/nvme/ctrl.c | 4 +--- hw/nvme/trace-events | 2 +- 2 files changed, 2 insertions(+), 4 deletions

[PULL 21/25] nbd: a BlockExport always has a BlockBackend

2023-04-21 Thread Paolo Bonzini
exp->common.blk cannot be NULL, nbd_export_delete() is only called (through a bottom half) from blk_exp_unref() and in turn that can only happen after blk_exp_add() has asserted exp->blk != NULL. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- nbd/server.c | 14 ++ 1 file c

[PULL 07/25] configure: Avoid -Werror=maybe-uninitialized

2023-04-21 Thread Paolo Bonzini
From: Akihiko Odaki The configure script used to compile some code which dereferences memory with ubsan to verify the compiler can link with ubsan library which detects dereferencing of uninitialized memory. However, as the dereferenced memory was allocated in the same code, GCC can statically de

[PULL 10/25] coverity: update COMPONENTS.md

2023-04-21 Thread Paolo Bonzini
Hexagon is split into two components because it has hundreds of false positives in the generated files. capstone and slirp have been removed. hw/nvme is added to block. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/COMPONENTS.md | 11 --- 1 file changed, 4 insertions(+), 7 del

[PULL 11/25] target/mips: tcg: detect out-of-bounds accesses to cpu_gpr and cpu_gpr_hi

2023-04-21 Thread Paolo Bonzini
In some cases (for example gen_compute_branch_nm in nanomips_translate.c.inc) registers can be unused on some paths and a negative value is passed in that case: gen_compute_branch_nm(ctx, OPC_BPOSGE32, 4, -1, -2, imm << 1); To avoid an out of bounds access in

[PULL 01/25] mtest2make.py: teach suite name that are just "PROJECT"

2023-04-21 Thread Paolo Bonzini
From: Marc-André Lureau A subproject test may be simply in the "PROJECT" suite (such as "qemu-common" with the following patches) Signed-off-by: Marc-André Lureau Message-Id: <20230302131848.1527460-2-marcandre.lur...@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/mtest2make.py | 9

[PULL 08/25] target/i386: Avoid unreachable variable declaration in mmu_translate()

2023-04-21 Thread Paolo Bonzini
From: Peter Maydell Coverity complains (CID 1507880) that the declaration "int error_code;" in mmu_translate() is unreachable code. Since this is only a declaration, this isn't actually a bug, but: * it's a bear-trap for future changes, because if it was changed to include an initialization '

[PULL 19/25] qemu-coroutine: remove qatomic_mb_read()

2023-04-21 Thread Paolo Bonzini
Replace with an explicit barrier and a comment. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- util/qemu-coroutine.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index 849452369201..17a88f65053e 10064

[PULL 22/25] coverity: unify Fedora dockerfiles

2023-04-21 Thread Paolo Bonzini
The Fedora CI and coverity runs are using a slightly different set of packages. Copy most of the content over from tests/docker while keeping the commands at the end that unpack the tools. Signed-off-by: Paolo Bonzini Message-Id: <20230331174844.376300-1-pbonz...@redhat.com> Signed-off-by: Paolo

[PULL 13/25] io: mark mixed functions that can suspend

2023-04-21 Thread Paolo Bonzini
There should be no paths from a coroutine_fn to aio_poll, however in practice coroutine_mixed_fn will call aio_poll in the !qemu_in_coroutine() path. By marking mixed functions, we can track accurately the call paths that execute entirely in coroutine context, and find more missing coroutine_fn ma

[PULL 15/25] monitor: mark mixed functions that can suspend

2023-04-21 Thread Paolo Bonzini
There should be no paths from a coroutine_fn to aio_poll, however in practice coroutine_mixed_fn will call aio_poll in the !qemu_in_coroutine() path. By marking mixed functions, we can track accurately the call paths that execute entirely in coroutine context, and find more missing coroutine_fn ma

[PULL 25/25] tests: lcitool: Switch to OpenSUSE Leap 15.4

2023-04-21 Thread Paolo Bonzini
From: Peter Krempa Since OpenSUSE Leap 15 counts as a single major release of an LTS distribution, lcitool has changed the target name to remove the minor version. Adjust the mappings and refresh script. This also updates the dockerfile to 15.4, since the 15.3 version is EOL now: https://get.o

[PULL 12/25] qapi-gen: mark coroutine QMP command functions as coroutine_fn

2023-04-21 Thread Paolo Bonzini
Coroutine commands have to be declared as coroutine_fn, but the marker does not show up in the qapi-comands-* headers; likewise, the marshaling function calls the command and therefore must be coroutine_fn. Static analysis would want coroutine_fn to match between prototype and declaration, because

Re: [PATCH 2/3] block: do not check bdrv_file_open

2023-04-21 Thread Paolo Bonzini
On Thu, Jan 19, 2023 at 2:17 PM Kevin Wolf wrote: > > assert(!drv->bdrv_needs_filename || bs->filename[0]); > > -if (drv->bdrv_file_open) { > > +if (drv->bdrv_open) { > > ret = drv->bdrv_file_open(bs, options, open_flags, &local_err); > > } else if (drv->bdrv_open) { > >

[PULL 09/25] lasi: fix RTC migration

2023-04-21 Thread Paolo Bonzini
Migrate rtc_ref (which only needs to be 32-bit because it is summed to a 32-bit register), which requires bumping the migration version. The HPPA machine does not have versioned machine types so it is okay to block migration to old versions of QEMU. While at it, drop the write-only field rtc from

[PULL 06/25] tests: bios-tables-test: replace memset with initializer

2023-04-21 Thread Paolo Bonzini
Coverity complains that memset() writes over a const field. Use an initializer instead, so that the const field is left to zero. Tests that have to write the const field already use an initializer for the whole struct, here I am choosing the smallest possible patch (which is not that small already

[PULL 17/25] block-backend: remove qatomic_mb_read()

2023-04-21 Thread Paolo Bonzini
There is already a barrier in AIO_WAIT_WHILE_INTERNAL(), thus the qatomic_mb_read() is not adding anything. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/block-backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/block-backend.c b/block/b

[PULL 16/25] target/i386: Change wrong XFRM value in SGX CPUID leaf

2023-04-21 Thread Paolo Bonzini
From: Yang Zhong The previous patch wrongly replaced FEAT_XSAVE_XCR0_{LO|HI} with FEAT_XSAVE_XSS_{LO|HI} in CPUID(EAX=12,ECX=1):{ECX,EDX}. As a result, SGX enclaves only supported SSE and x87 feature (xfrm=0x3). Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features") Signe

[PULL 03/25] build-sys: add slirp.wrap

2023-04-21 Thread Paolo Bonzini
From: Marc-André Lureau This allows to build with --enable-slirp / -D slirp=enabled, even when libslirp is not installed on the system. "meson subprojects download" will pull it from git in that case. Signed-off-by: Marc-André Lureau Message-Id: <20230302131848.1527460-4-marcandre.lur...@redha

[PULL 14/25] migration: mark mixed functions that can suspend

2023-04-21 Thread Paolo Bonzini
There should be no paths from a coroutine_fn to aio_poll, however in practice coroutine_mixed_fn will call aio_poll in the !qemu_in_coroutine() path. By marking mixed functions, we can track accurately the call paths that execute entirely in coroutine context, and find more missing coroutine_fn ma

Re: [PATCH 0/4] block: clean up coroutine versions of bdrv_{is_allocated, block_status}*

2023-04-21 Thread Paolo Bonzini
Ping. Paolo On Wed, Apr 5, 2023 at 12:32 PM Paolo Bonzini wrote: > > Provide coroutine versions of bdrv_is_allocated* and bdrv_block_status*, > since the underlying BlockDriver API is coroutine-based, and use > automatically-generated wrappers for the "mixed" versions. > > Paolo > > Paolo Bonzin

[PULL 24/25] tests: libvirt-ci: Update to commit '2fa24dce8bc'

2023-04-21 Thread Paolo Bonzini
From: Peter Krempa Update to commit which has fixes needed for OpenSUSE 15.4 and re-generate output files. Signed-off-by: Peter Krempa Message-Id: Signed-off-by: Paolo Bonzini --- tests/docker/dockerfiles/centos8.docker | 1 - tests/docker/dockerfiles/debian-amd64-cross.docker

[PULL 18/25] postcopy-ram: do not use qatomic_mb_read

2023-04-21 Thread Paolo Bonzini
It does not even pair with a qatomic_mb_set(), so it is clearer to use load-acquire in this case; they are synonyms. Signed-off-by: Paolo Bonzini --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c i

[PULL 20/25] docs: explain effect of smp_read_barrier_depends() on modern architectures

2023-04-21 Thread Paolo Bonzini
The documentation for smp_read_barrier_depends() does not mention the architectures for which it is an optimization, for example ARM and PPC. As a result, it is not clear to the reader why one would use it. Relegate Alpha to a footnote together with other architectures where it is equivalent to

[PULL 00/25] First batch of misc patches for QEMU 8.1

2023-04-21 Thread Paolo Bonzini
The following changes since commit 2d82c32b2ceaca3dc3da5e36e10976f34bfcb598: Open 8.1 development tree (2023-04-20 10:05:25 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 5f9efbbcf6fc77e583254389124437d981a

Re: [RFC PATCH 05/13] gfxstream + rutabaga prep: virtio_gpu_gl -> virtio_gpu_virgl

2023-04-21 Thread Philippe Mathieu-Daudé
On 21/4/23 03:12, Gurchetan Singh wrote: The virtio-gpu GL device has a heavy dependence on virgl. Acknowledge this by naming functions accurately. Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-gl.c | 27 ++- hw/display/virtio-gpu-virgl.c | 2 +- inc

Re: [PATCH] vnc: avoid underflow when accessing user-provided address

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 30.03.23 15:44, Paolo Bonzini wrote: If hostlen is zero, there is a possibility that addrstr[hostlen - 1] underflows and, if a closing bracked is there, hostlen - 2 is passed to g_strndup() on the next line. If websocket==false then addrstr[0] would be a colon, but if websocket==true this cou

Re: [RFC PATCH 07/13] gfxstream + rutabaga prep: define callbacks in realize function

2023-04-21 Thread Philippe Mathieu-Daudé
On 21/4/23 03:12, Gurchetan Singh wrote: This reduces the amount of renderer backend specific needed to be exposed to the GL device. We only need one realize function per renderer backend. Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-gl.c | 17 +++-- hw/display/v

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-21 Thread Philippe Mathieu-Daudé
On 21/4/23 06:09, Cleber Rosa wrote: On 4/20/23 12:54, John Snow wrote: On Thu, Apr 20, 2023, 5:19 AM Philippe Mathieu-Daudé wrote:     On 17/4/23 19:44, Alex Bennée wrote:     >     > John Snow writes:     >     >> On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée     wrote:     >>> diff

Re: test-blockjob: intermittent CI failures in msys2-64bit job

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 17.03.23 15:35, Thomas Huth wrote: On 17/03/2023 11.17, Peter Maydell wrote: On Mon, 6 Mar 2023 at 11:16, Peter Maydell wrote: On Fri, 3 Mar 2023 at 18:36, Peter Maydell wrote: I've noticed that test-blockjob seems to fail intermittently on the msys2-64bit job: https://gitlab.com/qemu-

Re: [PATCH v19 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-21 Thread Pierre Morel
On 4/20/23 10:59, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: 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 an

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-21 Thread Philippe Mathieu-Daudé
On 21/4/23 12:07, Philippe Mathieu-Daudé wrote: On 21/4/23 06:09, Cleber Rosa wrote: Manually using "avocado run --test-runner=nrunner" helps running the tests but the console output is never displayed (see [*]) and once finished Avocado lets various QEMU processes running in detached mode, wa

[PATCH v7 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug, as there are time when the device in some intermediate state. Let's add an event that say that the device

[PATCH v7 4/4] pcie: implement DEVICE_ON event and query-hotplug

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step implement the prepared infrastructure in PCIe. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/pcie.c | 83 +++ hw/pci/pcie_port.c| 1

[PATCH v7 3/4] shpc: implement DEVICE_ON event and query-hotplug

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step, implement the prepared infrastructure in SHPC. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci-bridge/pci_bridge_dev.c | 14 ++ hw/pci-bridge/pcie_pci_bridge.c | 1 + hw/pci/shpc.

[PATCH v7 1/4] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR has equal data, let's refactor it to one structure. That also helps to add new events consistently. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 39 +++ 1 file changed, 27 insertions(+), 12 delet

[PATCH v7 0/4] pci hotplug tracking

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! Main thing this series does is DEVICE_ON event - a counter-part to DEVICE_DELETED. A guest-driven event that device is powered-on. Details are in patch 2. v7: improve commit message of 02, change version to 8.1 in QAPI. v6: - preparation part merged to master - drop HOTPLUG_STATE event f

Re: [PULL 00/21] target-arm queue

2023-04-21 Thread Richard Henderson
On 4/20/23 11:04, Peter Maydell wrote: Hi; here's the first target-arm pullreq for the 8.1 cycle. Nothing particularly huge in here, just the various things that had accumulated during the freeze. thanks -- PMM The following changes since commit 2d82c32b2ceaca3dc3da5e36e10976f34bfcb598: Ope

[PATCH 1/3] tests/avocado: Make ssh_command_output_contains() globally available

2023-04-21 Thread Thomas Huth
This function will be useful in other tests, too, so move it to the core LinuxSSHMixIn class. Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 8 tests/avocado/linux_ssh_mips_malta.py | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/te

[PATCH 0/3] tests/avocado/machine_aspeed: Fix the broken ast2[56]00_evb_sdk tests

2023-04-21 Thread Thomas Huth
Fix the broken ast2500_evb_sdk and ast2600_evb_sdk avocado tests. See the patch description of the second patch for details. Also add the test to the MAINTAINERS file (third patch). Thomas Huth (3): tests/avocado: Make ssh_command_output_contains() globally available tests/avocado/machine_aspe

[PATCH 2/3] tests/avocado/machine_aspeed: Fix the broken ast2[56]00_evb_sdk tests

2023-04-21 Thread Thomas Huth
test_arm_ast2500_evb_sdk and test_arm_ast2600_evb_sdk are currently failing. The problem is that they are trying to look for the login prompt that does not have a newline at the end - but the logic in _console_interaction() only handles full lines. It used to work by accident in the past since ther

[PATCH 3/3] MAINTAINERS: Cover tests/avocado/machine_aspeed.py

2023-04-21 Thread Thomas Huth
tests/avocado/machine_aspeed.py should belong to the ASPEED section in the maintainers file. Improve the wildcards here a little bit, so that it is covered, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINE

Re: [PATCH v7 6/6] lsi53c895a: disable reentrancy detection for script RAM

2023-04-21 Thread Michael Tokarev
13.03.2023 11:24, Alexander Bulekov пишет: As the code is designed to use the memory APIs to access the script ram, disable reentrancy checks for the pseudo-RAM ram_io MemoryRegion. In the future, ram_io may be converted from an IO to a proper RAM MemoryRegion. Ping? Maybe it's worth to re-se

Re: [PATCH v2 RESEND 1/7] gdbstub: only send stop-reply packets when allowed to

2023-04-21 Thread Matheus Tavares Bernardino
Alex Bennée wrote: > > > Matheus Tavares wrote: > > > > diff --git a/gdbstub/user.c b/gdbstub/user.c > > index 80488b6bb9..bb03622c83 100644 > > --- a/gdbstub/user.c > > +++ b/gdbstub/user.c > > @@ -174,12 +177,14 @@ void gdb_signalled(CPUArchState *env, int sig) > > { > > char buf[4]; > >

Re: [PATCH RESEND v7 11/12] target/riscv: rework write_misa()

2023-04-21 Thread Daniel Henrique Barboza
On 4/20/23 20:45, Alistair Francis wrote: On Thu, Apr 20, 2023 at 7:22 PM Daniel Henrique Barboza wrote: write_misa() must use as much common logic as possible. We want to open code just the bits that are exclusive to the CSR write operation and TCG internals. Our validation is done with r

Re: [PATCH v2 RESEND 3/7] gdbstub: add support for the qRegisterInfo query

2023-04-21 Thread Matheus Tavares Bernardino
Alex Bennée wrote: > > > Matheus Tavares wrote: > > > > diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c > > index be18568d0a..f19f8c58c3 100644 > > --- a/gdbstub/gdbstub.c > > +++ b/gdbstub/gdbstub.c > > @@ -1578,6 +1599,12 @@ static const GdbCmdParseEntry gdb_gen_query_table[] > > = { > >

Re: [PATCH RESEND v7 12/12] target/riscv: forbid write_misa() for static CPUs

2023-04-21 Thread Daniel Henrique Barboza
On 4/20/23 20:48, Alistair Francis wrote: On Thu, Apr 20, 2023 at 7:22 PM Daniel Henrique Barboza wrote: Static CPUs don't want their extensions changed by user interaction. We can prevent it during init by not exposing user facing properties, but write_misa() is also capable of disabling/e

Re: [PATCH v2 RESEND 4/7] Hexagon: support qRegisterInfo at gdbstub

2023-04-21 Thread Matheus Tavares Bernardino
Philippe Mathieu-Daudé wrote: > > > Matheus Tavares wrote: > > > > diff --git a/target/hexagon/gdb_qreginfo.h b/target/hexagon/gdb_qreginfo.h > > new file mode 100644 > > index 00..64631ddd58 > > --- /dev/null > > +++ b/target/hexagon/gdb_qreginfo.h > > This should be gdb_qreginfo.h.inc

[PATCH v7 3/7] block: make bdrv_find_child() function public

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
To be reused soon for blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 13 + blockdev.c | 14 -- include/block/block_int-io.h | 1 + 3 files changed, 14 insertions(+), 14 deletions(-) diff -

[PATCH v7 1/7] block-backend: blk_root(): drop const specifier on return type

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 2 +- include/sysemu/block-backend-global-state.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v7 0/7] blockdev-replace

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's a non-transactional part of "[PATCH v5 00/45] Transactional block-graph modifying API". The new command helps to insert filters everywhere you want: - replace qdev block-node by qdev-id - replace export block-node by export-id - replace any child of parent block-node by node-na

[PATCH v7 2/7] block/export: add blk_by_export_id()

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
We need it for further blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 18 ++ include/sysemu/block-backend-global-state.h | 1 + 2 files changed, 19 insertions(+) diff --git a/block/export/export.c b/

[PATCH v7 7/7] iotests: add filter-insertion

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Demonstrate new blockdev-replace API for filter insertion and removal. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/filter-insertion | 257 ++ tests/qemu-iotests/tests/filter-insertion.out | 5 + 2 files changed, 262 insertions(+) create mode 10

[PATCH v7 5/7] block: bdrv_get_xdbg_block_graph(): report export ids

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Currently for block exports we report empty blk names. That's not good. Let's try to find corresponding block export and report its id. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 block/export/export.c | 13 + include/block/export.h

[PATCH v7 6/7] iotests.py: introduce VM.assert_edges_list() method

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Add an alternative method to check block graph, to be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3

[PATCH v7 4/7] qapi: add x-blockdev-replace command

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child of BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 56 ++

[PATCH v8 5/5] blockdev: qmp_transaction: drop extra generic layer

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Let's simplify things: First, actions generally don't need access to common BlkActionState structure. The only exclusion are backup actions that need block_job_txn. Next, for transaction actions of Transaction API is more native to allocated state structure in the action itself. So, do the follo

[PATCH v8 3/5] blockdev: qmp_transaction: refactor loop to classic for

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 2174ab2694..89c573a094 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2375,7 +2375,7 @@ void qmp_transaction(TransactionActionList *a

Re: [PULL 00/21] target-arm queue

2023-04-21 Thread Peter Maydell
On Fri, 21 Apr 2023 at 11:49, Richard Henderson wrote: > Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as > appropriate. 8.1 :-) (I created the 8.1 page yesterday.) -- PMM

[PATCH v8 0/5] block: refactor blockdev transactions

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! v8: resend, fix my emails That's a portion of old good "[PATCH v5 00/45] Transactional block-graph modifying API". Let's refactor QMP transactions implementation into new (relatively) transaction API. Vladimir Sementsov-Ogievskiy (5): blockdev: refactor transaction to use Transaction

[PATCH v8 2/5] blockdev: transactions: rename some things

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Look at qmp_transaction(): dev_list is not obvious name for list of actions. Let's look at qapi spec, this argument is "actions". Let's follow the common practice of using same argument names in qapi scheme and code. To be honest, rename props to properties for same reason. Next, we have to renam

[PATCH v8 1/5] blockdev: refactor transaction to use Transaction API

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
We are going to add more block-graph modifying transaction actions, and block-graph modifying functions are already based on Transaction API. Next, we'll need to separately update permissions after several graph-modifying actions, and this would be simple with help of Transaction API. So, now let

[PATCH v8 4/5] blockdev: transaction: refactor handling transaction properties

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
Only backup supports GROUPED mode. Make this logic more clear. And avoid passing extra thing to each action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 92 +++--- 1 file changed, 19 insertions(+), 73 deletions(-) diff --git a/blo

Re: [PATCH v5 00/16] iotests: use vm.cmd()

2023-04-21 Thread Vladimir Sementsov-Ogievskiy
On 15.02.23 16:25, Vladimir Sementsov-Ogievskiy wrote: Hi all! Let's get rid of pattern result = self.vm.qmp(...) self.assert_qmp(result, 'return', {}) And switch to just self.vm.cmd(...) v5: - include fixups by John - fix 'make check-dev' - split first patch into several [Dan

Re: [RFC PATCH] hw/pci-bridge: Fix release ordering by embedding PCIBridgeWindows within PCIBridge

2023-04-21 Thread Jonathan Cameron via
On Fri, 21 Apr 2023 08:26:43 +0200 Philippe Mathieu-Daudé wrote: > Hi Jonathan, > > On 20/4/23 16:59, Jonathan Cameron via wrote: > > The lifetime of the PCIBridgeWindows instance accessed via the windows > > pointer > > in struct PCIBridge is managed separately from the PCIBridge itself. > >

Re: [PATCH 0/2] hw/pci-bridge: pci_expander_bridge: Fix wrong type and rework inheritance.

2023-04-21 Thread Jonathan Cameron via
On Fri, 21 Apr 2023 09:59:57 +0100 Peter Maydell wrote: > On Fri, 21 Apr 2023 at 09:19, Michael S. Tsirkin wrote: > > > > On Thu, Apr 20, 2023 at 03:27:48PM +0100, Jonathan Cameron wrote: > > > Peter Maydell highlighted an incorrect conversion to TYPE_PXB_DEVICE from > > > a device that didn't

  1   2   3   4   >