[RFC PATCH] softmmu: Fix async_run_on_cpu() use in tcg_commit_cpu()

2023-09-07 Thread Philippe Mathieu-Daudé
CPUState::halt_cond is an accelerator specific pointer, used in particular by TCG (which tcg_commit() is about). The pointer is set by the AccelOpsClass::create_vcpu_thread() handler. AccelOpsClass::create_vcpu_thread() is called by the generic qemu_init_vcpu(), which expect the accelerator

[PATCH 09/14] target/arm: Implement the SET* instructions

2023-09-07 Thread Peter Maydell
Implement the SET* instructions which collectively implement a "memset" operation. These come in a set of three, eg SETP (prologue), SETM (main), SETE (epilogue), and each of those has different flavours to indicate whether memory accesses should be unpriv or non-temporal. This commit does not

[PATCH 11/14] target/arm: Implement the SETG* instructions

2023-09-07 Thread Peter Maydell
The FEAT_MOPS SETG* instructions are very similar to the SET* instructions, but as well as setting memory contents they also set the MTE tags. They are architecturally required to operate on tag-granule aligned regions only. Signed-off-by: Peter Maydell --- target/arm/internals.h | 10

[PATCH 06/14] target/arm: Define syndrome function for MOPS exceptions

2023-09-07 Thread Peter Maydell
The FEAT_MOPS memory operations can raise a Memory Copy or Memory Set exception if a copy or set instruction is executed when the CPU register state is not correct for that instruction. Define the usual syn_* function that constructs the syndrome register value for these exceptions.

[PATCH 01/14] target/arm: Remove unused allocation_tag_mem() argument

2023-09-07 Thread Peter Maydell
The allocation_tag_mem() function takes an argument tag_size, but it never uses it. Remove the argument. In mte_probe_int() in particular this also lets us delete the code computing the value we were passing in. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson ---

[PATCH 07/14] target/arm: New function allocation_tag_mem_probe()

2023-09-07 Thread Peter Maydell
For the FEAT_MOPS operations, the existing allocation_tag_mem() function almost does what we want, but it will take a watchpoint exception even for an ra == 0 probe request, and it requires that the caller guarantee that the memory is accessible. For FEAT_MOPS we want a function that will not

[PATCH 10/14] target/arm: Define new TB flag for ATA0

2023-09-07 Thread Peter Maydell
Currently the only tag-setting instructions always do so in the context of the current EL, and so we only need one ATA bit in the TB flags. The FEAT_MOPS SETG instructions include ones which set tags for a non-privileged access, so we now also need the equivalent "are tags enabled?" information

[PATCH 08/14] target/arm: Implement MTE tag-checking functions for FEAT_MOPS

2023-09-07 Thread Peter Maydell
The FEAT_MOPS instructions need a couple of helper routines that check for MTE tag failures: * mte_mops_probe() checks whether there is going to be a tag error in the next up-to-a-page worth of data * mte_check_fail() is an existing function to record the fact of a tag failure, which we

[PATCH 14/14] target/arm: Enable FEAT_MOPS for CPU 'max'

2023-09-07 Thread Peter Maydell
Enable FEAT_MOPS on the AArch64 'max' CPU, and add it to the list of features we implement. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 4 2 files changed, 5 insertions(+) diff --git a/docs/system/arm/emulation.rst

[PATCH 13/14] target/arm: Implement the CPY* instructions

2023-09-07 Thread Peter Maydell
The FEAT_MOPS CPY* instructions implement memory copies. These come in both "always forwards" (memcpy-style) and "overlap OK" (memmove-style) flavours. Signed-off-by: Peter Maydell --- target/arm/tcg/helper-a64.h| 4 + target/arm/tcg/a64.decode | 12 + target/arm/tcg/helper-a64.c

[PATCH 04/14] target/arm: Implement FEAT_MOPS enable bits

2023-09-07 Thread Peter Maydell
FEAT_MOPS defines a handful of new enable bits: * HCRX_EL2.MSCEn, SCTLR_EL1.MSCEn, SCTLR_EL2.MSCen: define whether the new insns should UNDEF or not * HCRX_EL2.MCE2: defines whether memops exceptions from EL1 should be taken to EL1 or EL2 Since we don't sanitise what bits can be written

[PATCH 00/14] target/arm: Implement FEAT_MOPS

2023-09-07 Thread Peter Maydell
This patchset implements the Arm FEAT_MOPS architectural feature, which is a set of instructions to implement memory copy and set operations. The new instructions come in sets of three: * SETP, SETM, SETE -- memory set * SETGP, SETGM, SETME -- memory set with MTE tag setting * CPYP, CPYM, CPYE

[PATCH 05/14] target/arm: Pass unpriv bool to get_a64_user_mem_index()

2023-09-07 Thread Peter Maydell
In every place that we call the get_a64_user_mem_index() function we do it like this: memidx = a->unpriv ? get_a64_user_mem_index(s) : get_mem_index(s); Refactor so the caller passes in the bool that says whether they want the 'unpriv' or 'normal' mem_index rather than having to do the ?:

[PATCH 02/14] target/arm: Don't skip MTE checks for LDRT/STRT at EL0

2023-09-07 Thread Peter Maydell
The LDRT/STRT "unprivileged load/store" instructions behave like normal ones if executed at EL0. We handle this correctly for the load/store semantics, but get the MTE checking wrong. We always look at s->mte_active[is_unpriv] to see whether we should be doing MTE checks, but in hflags.c when we

[PATCH 12/14] target/arm: Implement MTE tag-checking functions for FEAT_MOPS copies

2023-09-07 Thread Peter Maydell
The FEAT_MOPS memory copy operations need an extra helper routine for checking for MTE tag checking failures beyond the ones we already added for memory set operations: * mte_mops_probe_rev() does the same job as mte_mops_probe(), but it checks tags starting at the provided address and working

[PATCH 03/14] target/arm: Add ID_AA64ISAR2_EL1

2023-09-07 Thread Peter Maydell
From: Aaron Lindsay Signed-off-by: Aaron Lindsay [PMM: drop the HVF part of the patch and just comment that we need to do something when the register appears in that API] Signed-off-by: Peter Maydell --- target/arm/cpu.h | 1 + target/arm/helper.c | 4 ++-- target/arm/hvf/hvf.c | 1 +

Re: [PATCH v2 0/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-09-07 Thread Eugenio Perez Martin
On Wed, Aug 30, 2023 at 3:41 PM Laszlo Ersek wrote: > > v1: > > - http://mid.mail-archive.com/20230827182937.146450-1-lersek@redhat.com > - > https://patchwork.ozlabs.org/project/qemu-devel/cover/20230827182937.146450-1-ler...@redhat.com/ > > v2 picks up tags from Phil and Stefano, and addresses

Re: [PATCH v2 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-09-07 Thread Eugenio Perez Martin
On Wed, Aug 30, 2023 at 3:41 PM Laszlo Ersek wrote: > > (1) The virtio-1.2 specification > writes: > > > 3 General Initialization And Device Operation > > 3.1 Device Initialization > > 3.1.1 Driver Requirements: Device

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Anup Patel
On Thu, Sep 7, 2023 at 8:48 AM Alistair Francis wrote: > > On Thu, Aug 3, 2023 at 10:47 AM Wu, Fei wrote: > > > > On 8/1/2023 6:46 AM, Daniel Henrique Barboza wrote: > > > > > > > > > On 7/30/23 22:53, Fei Wu wrote: > > >> riscv virt platform's memory started at 0x8000 and > > >> straddled

Re: [PATCH V4 06/11] migration: preserve cpu ticks if suspended

2023-09-07 Thread Steven Sistare
On 8/30/2023 12:47 PM, Peter Xu wrote: > On Tue, Aug 29, 2023 at 11:18:01AM -0700, Steve Sistare wrote: >> During RUN_STATE_SUSPENDED, the cpu clock remains enabled, so the >> timers_state saved to the migration stream is stale, causing time errors >> in the guest when it wakes from suspend. > >

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Anup Patel
On Tue, Aug 1, 2023 at 4:16 AM Daniel Henrique Barboza wrote: > > > > On 7/30/23 22:53, Fei Wu wrote: > > riscv virt platform's memory started at 0x8000 and > > straddled the 4GiB boundary. Curiously enough, this choice > > of a memory layout will prevent from launching a VM with > > a bit

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/51] Build system, i386 changes for 2023-09-07

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v2 00/35] ppc queue

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/18] Parallels format driver

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command()

2023-09-07 Thread Stefan Hajnoczi
On Thu, 7 Sept 2023 at 10:07, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Thu, Sep 07, 2023 at 01:06:39AM +, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > Coroutine HMP commands currently run to

Re: [RFC 0/3] qmp: make qmp_device_add() a coroutine

2023-09-07 Thread Stefan Hajnoczi
On Thu, 7 Sept 2023 at 10:26, Paolo Bonzini wrote: > > On Thu, Sep 7, 2023 at 4:00 PM Stefan Hajnoczi wrote: > > While I agree that the issue would not happen if monitor commands only > > ran in the iohandler AioContext, I don't think we can change that. > > When Kevin implemented coroutine

Re: [PATCH v4 00/15] vfio: VFIO migration support with vIOMMU

2023-09-07 Thread Joao Martins
On 07/09/2023 13:40, Cédric Le Goater wrote: > Hello Joao, > >> Cedric, you mentioned that you take a look at this after you come back, not >> sure >> if that's still the plan. But it's been a while since the last version, so >> would >> you have me repost/rebase on the latest (post your PR)? >

Re: [PATCH] tests/qtest/usb-hcd: Remove the empty "init" tests

2023-09-07 Thread Philippe Mathieu-Daudé
On 7/9/23 16:39, Thomas Huth wrote: These tests do nothing additional compared to the other test, so let's remove the empty functions to avoid wasting some few precious test cycles here. Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-uhci-test.c | 5 -

[PATCH] tests/qtest/usb-hcd: Remove the empty "init" tests

2023-09-07 Thread Thomas Huth
These tests do nothing additional compared to the other test, so let's remove the empty functions to avoid wasting some few precious test cycles here. Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-uhci-test.c | 5 - tests/qtest/usb-hcd-xhci-test.c | 6 -- 2 files changed, 11

Re: [RFC 0/3] qmp: make qmp_device_add() a coroutine

2023-09-07 Thread Paolo Bonzini
On Thu, Sep 7, 2023 at 4:00 PM Stefan Hajnoczi wrote: > While I agree that the issue would not happen if monitor commands only > ran in the iohandler AioContext, I don't think we can change that. > When Kevin implemented coroutine commands in commit 9ce44e2ce267 ("qmp: > Move dispatcher to a

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-07 Thread Markus Armbruster
Kevin Wolf writes: > Am 07.09.2023 um 11:33 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> > Am 04.09.2023 um 18:25 hat Daniel P. Berrangé geschrieben: >> >> I still think for user creatable devices we'd be better off just >> >> mandating the use of JSON syntax for -device and thus

Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command()

2023-09-07 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Thu, Sep 07, 2023 at 01:06:39AM +, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > Coroutine HMP commands currently run to completion in a nested event > > > loop with the Big QEMU Lock (BQL) held. The

Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command()

2023-09-07 Thread Stefan Hajnoczi
On Thu, Sep 07, 2023 at 01:06:39AM +, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > Coroutine HMP commands currently run to completion in a nested event > > loop with the Big QEMU Lock (BQL) held. The call_rcu thread also uses > > the BQL and cannot process

Re: [PATCH v3 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-07 Thread William Roche
On 9/7/23 13:12, Gupta, Pankaj wrote: diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 5fce74aac5..4d42d3ed4c 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -604,6 +604,10 @@ static void kvm_mce_inject(X86CPU *cpu, hwaddr paddr, int code)  

Re: [RFC 0/3] qmp: make qmp_device_add() a coroutine

2023-09-07 Thread Stefan Hajnoczi
On Thu, Sep 07, 2023 at 01:28:55PM +0200, Paolo Bonzini wrote: > On 9/6/23 21:01, Stefan Hajnoczi wrote: > > It is not safe to call drain_call_rcu() from qmp_device_add() because > > some call stacks are not prepared for drain_call_rcu() to drop the Big > > QEMU Lock (BQL). > > > > For example,

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Eric Auger
Hi, On 9/7/23 12:04, Wu, Fei wrote: > On 9/7/2023 5:10 PM, Eric Auger wrote: >> Hi, >> >> On 9/7/23 09:16, Philippe Mathieu-Daudé wrote: >>> Widening Cc to ARM/VFIO. >>> >>> On 4/8/23 11:15, Wu, Fei wrote: On 8/3/2023 11:07 PM, Andrew Jones wrote: > On Mon, Jul 31, 2023 at 09:53:17AM

[PULL 51/51] docs/system/replay: do not show removed command line option

2023-09-07 Thread Paolo Bonzini
Cc: qemu-triv...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- docs/system/replay.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/replay.rst b/docs/system/replay.rst index 3105327423c..ca7c17c63da

[PATCH v2 0/5] virtio-gpu: add blob migration support

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau Hi, This is a follow-up of the previous patch "[PATCH] virtio-gpu: block migration of VMs with blob=true". Now that migration support is implemented, we can decide to drop the migration blocker patch, or apply and revert it, so that backporting of a quick fix is made

[PULL 00/51] Build system, i386 changes for 2023-09-07

2023-09-07 Thread Paolo Bonzini
The following changes since commit 17780edd81d27fcfdb7a802efc870a99788bd2fc: Merge tag 'quick-fix-pull-request' of https://gitlab.com/bsdimp/qemu into staging (2023-08-31 10:06:29 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you

[PULL 42/51] target/i386: Remove unused KVM stubs

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé All these functions: - kvm_arch_get_supported_cpuid() - kvm_has_smm(() - kvm_hyperv_expand_features() - kvm_set_max_apic_id() are called after checking for kvm_enabled(), which is false when KVM is not built. Since the compiler elides these functions, their

[PATCH v3 4/5] vfio-user: Message-based DMA support

2023-09-07 Thread Mattias Nissler
Wire up support for DMA for the case where the vfio-user client does not provide mmap()-able file descriptors, but DMA requests must be performed via the VFIO-user protocol. This installs an indirect memory region, which already works for pci_dma_{read,write}, and pci_dma_map works thanks to the

[PULL 29/51] configure, meson: move --enable-plugins to meson

2023-09-07 Thread Paolo Bonzini
While the option still needs to be parsed in the configure script (it's needed by tests/tcg, and also to decide about recursing into contrib/plugins), passing it to Meson can be done with -D instead of using config-host.mak. Signed-off-by: Paolo Bonzini --- accel/tcg/meson.build | 4

[PULL 41/51] target/i386/cpu-sysemu: Inline kvm_apic_in_kernel()

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé In order to have cpu-sysemu.c become accelerator-agnostic, inline kvm_apic_in_kernel() -- which is a simple wrapper to kvm_irqchip_in_kernel() -- and use the generic "sysemu/kvm.h" header. Signed-off-by: Philippe Mathieu-Daudé Message-ID:

[PULL 43/51] target/i386: Allow elision of kvm_enable_x2apic()

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Call kvm_enabled() before kvm_enable_x2apic() to let the compiler elide its call. Cleanup the code by simplifying "!xen_enabled() && kvm_enabled()" to just "kvm_enabled()". Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID:

[PULL 39/51] hw/i386/fw_cfg: Include missing 'cpu.h' header

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé fw_cfg_build_feature_control() uses CPUID_EXT_VMX which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-4-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/fw_cfg.c | 1 + 1 file changed, 1

[PULL 20/51] meson: do not unnecessarily use cmake for dependencies

2023-09-07 Thread Paolo Bonzini
Both gvnc and sysprof-capture come with pkg-config files, so specify the method to find them. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- tests/migration/meson.build | 2 +- tests/qtest/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 47/51] sysemu/kvm: Restrict kvm_get_apic_state() to x86 targets

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé kvm_get_apic_state() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Since we include "linux-headers/asm-x86/kvm.h", no need to forward-declare 'struct kvm_lapic_state'. Signed-off-by: Philippe

[PULL 22/51] configure: remove HOST_CC

2023-09-07 Thread Paolo Bonzini
$(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be used instead now that there is a Tricore C compiler. Remove the variable from config-host.mak. Reviewed-by: Richard Henderson Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure

[PATCH v3 3/5] Update subprojects/libvfio-user

2023-09-07 Thread Mattias Nissler
Brings in assorted bug fixes. In particular, "Fix address calculation for message-based DMA" corrects a bug in DMA address calculation which is necessary to get DMA across VFIO-user messages working. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file changed, 1

[PULL 44/51] target/i386: Allow elision of kvm_hv_vpindex_settable()

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Call kvm_enabled() before kvm_hv_vpindex_settable() to let the compiler elide its call. kvm-stub.c is now empty, remove it. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-9-phi...@linaro.org>

[PULL 03/51] target/i386: generalize operand size "ph" for use in CVTPS2PD

2023-09-07 Thread Paolo Bonzini
CVTPS2PD only loads a half-register for memory, like CVTPH2PS. It can reuse the "ph" packed half-precision size to load a half-register, but rename it to "xh" because it is now a variation of "x" (it is not used only for half-precision values). Signed-off-by: Paolo Bonzini ---

[PULL 31/51] configure, meson: remove target OS symbols from config-host.mak

2023-09-07 Thread Paolo Bonzini
Stop applying config-host.mak to the sourcesets, since it does not have any more CONFIG_* symbols coming from the command line. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- chardev/meson.build| 2 +- configure | 18

[PATCH v2 2/5] virtio-gpu: factor out restore mapping

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau The same function is going to be used next to restore "blob" resources. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 60 ++--- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/hw/display/virtio-gpu.c

[PATCH v2 5/5] Revert "virtio-gpu: block migration of VMs with blob=true"

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau If we decide to apply this patch (for easier backporting reasons), we can now revert it. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c

[PATCH v2 4/5] virtio-gpu: add virtio-gpu/blob vmstate subsection

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 101 1 file changed, 101 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 6ebf98ca0e..63e60745f8 100644 ---

[PULL 38/51] hw/i386/pc: Include missing 'cpu.h' header

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Both pc_piix.c and pc_q35.c files use CPU_VERSION_LEGACY which is defined in "target/i386/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-3-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- hw/i386/pc_piix.c | 1 +

[PATCH v2 3/5] virtio-gpu: move scanout restoration to post_load

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau As we are going to introduce an extra subsection for "blob" resources, scanout have to be restored after. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[PULL 28/51] configure: unify recursion into sub-Makefiles

2023-09-07 Thread Paolo Bonzini
Treat contrib/plugins the same as the firmware. Signed-off-by: Paolo Bonzini --- Makefile | 27 --- configure | 13 - 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 5d48dfac18a..118c28e80d9 100644 --- a/Makefile

[PULL 37/51] hw/i386/pc: Include missing 'sysemu/tcg.h' header

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since commit 6f529b7534 ("target/i386: move FERR handling to target/i386") pc_q35_init() calls tcg_enabled() which is declared in "sysemu/tcg.h". Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-2-phi...@linaro.org> Signed-off-by: Paolo

[PULL 24/51] meson: compile bundled device trees

2023-09-07 Thread Paolo Bonzini
If dtc is available, compile the .dts files in the pc-bios directory instead of using the precompiled binaries. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- pc-bios/Makefile| 19 --- pc-bios/meson.build | 25 + 2 files changed, 21

[PULL 50/51] subprojects: add wrap file for libblkio

2023-09-07 Thread Paolo Bonzini
This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download. Signed-off-by: Paolo Bonzini --- subprojects/libblkio.wrap | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 subprojects/libblkio.wrap diff --git

[PULL 08/51] os-posix.c: create and export os_set_chroot()

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-4-...@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 1 + os-posix.c| 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff

[PULL 13/51] util/async-teardown.c: move to softmmu/, only build it when system build is requested

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-9-...@tls.msk.ru> Signed-off-by: Paolo Bonzini --- {util => softmmu}/async-teardown.c | 0 softmmu/meson.build| 1 + util/meson.build | 1 - 3

[PULL 30/51] configure, meson: remove CONFIG_SOLARIS from config-host.mak

2023-09-07 Thread Paolo Bonzini
CONFIG_SOLARIS is only used to pick tap implementations. But the target OS is invariant and does not depend on the configuration, so move away from config_host and just use unconditional rules in softmmu_ss. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure

[PULL 23/51] configure: create native file with contents of $host_cc

2023-09-07 Thread Paolo Bonzini
The argument of --host-cc is not obeyed when cross compiling. To avoid this issue, place it in a configuration file and pass it to meson with --native-file. While at it, clarify that --host-cc is not obeyed anyway when _not_ cross compiling, because cc="$host_cc" is placed before --host-cc is

[PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-07 Thread Mattias Nissler
When DMA memory can't be directly accessed, as is the case when running the device model in a separate process without shareable DMA file descriptors, bounce buffering is used. It is not uncommon for device models to request mapping of several DMA regions at the same time. Examples include: *

[PULL 32/51] meson: list leftover CONFIG_* symbols

2023-09-07 Thread Paolo Bonzini
There are no config-host.mak symbols anymore that are needed in config-host.h; the only symbols that are included in config_host_data via the foreach loop are: - CONFIG_DEFAULT_TARGETS, which is not used by C code. - CONFIG_TCG and CONFIG_TCG_INTERPRETER, which are not part of config-host.mak

[PULL 17/51] contrib/plugins/howvec: Fix string format

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/howvec.c:186:40: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] class->count);

[PULL 48/51] sysemu/kvm: Restrict kvm_has_pit_state2() to x86 targets

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé kvm_has_pit_state2() is only defined for x86 targets (in target/i386/kvm/kvm.c). Its declaration is pointless on all other targets. Have it return a boolean. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-13-phi...@linaro.org>

[PULL 18/51] contrib/plugins/lockstep: Fix string format

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log),

[PULL 21/51] meson: update unsupported host/CPU messages

2023-09-07 Thread Paolo Bonzini
Unsupported CPU and OSes are not really going away, but the project simply does not guarantee that they work. Rephrase the messages accordingly. While at it, move the warning for TCI performance at the end where it is more visible. Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini ---

[PULL 16/51] contrib/plugins/drcov: Fix string format

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/drcov.c:52:13: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~

[PATCH v2 1/5] virtio-gpu: block migration of VMs with blob=true

2023-09-07 Thread marcandre . lureau
From: Marc-André Lureau "blob" resources don't have an associated pixman image: #0 pixman_image_get_stride (image=0x0) at ../pixman/pixman-image.c:921 #1 0x562327c25236 in virtio_gpu_save (f=0x56232bb13b00, opaque=0x56232b555a60, size=0, field=0x5623289ab6c8 <__compound_literal.3+104>,

[PULL 06/51] include/sysemu/os-posix.h: move *daemonize* declarations together

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-2-...@tls.msk.ru> Signed-off-by: Paolo Bonzini --- include/sysemu/os-posix.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sysemu/os-posix.h

[PATCH v3 0/5] Support message-based DMA in vfio-user server

2023-09-07 Thread Mattias Nissler
This series adds basic support for message-based DMA in qemu's vfio-user server. This is useful for cases where the client does not provide file descriptors for accessing system memory via memory mappings. My motivating use case is to hook up device models as PCIe endpoints to a hardware design.

[PATCH v3 5/5] vfio-user: Fix config space access byte order

2023-09-07 Thread Mattias Nissler
PCI config space is little-endian, so on a big-endian host we need to perform byte swaps for values as they are passed to and received from the generic PCI config space access machinery. Signed-off-by: Mattias Nissler --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PULL 45/51] target/i386: Restrict declarations specific to CONFIG_KVM

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Keep the function accessed by target/i386/ and hw/i386/ exposed, restrict the ones accessed by target/i386/kvm/. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-10-phi...@linaro.org> Signed-off-by: Paolo Bonzini ---

[PULL 34/51] Python: Drop support for Python 3.7

2023-09-07 Thread Paolo Bonzini
Debian 10 is not anymore a supported distro, since Debian 12 was released on June 10, 2023. Our supported build platforms as of today all support at least 3.8 (and all of them except for Ubuntu 20.04 support 3.9): openSUSE Leap 15.5: 3.6.15 (3.11.2) CentOS Stream 8:3.6.8 (3.8.13, 3.9.16,

[PULL 04/51] target/i386: fix memory operand size for CVTPS2PD

2023-09-07 Thread Paolo Bonzini
CVTPS2PD only loads a half-register for memory, unlike the other operations under 0x0F 0x5A. "Unpack" the group into separate emission functions instead of using gen_unary_fp_sse. Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 14 -- target/i386/tcg/emit.c.inc

[PULL 35/51] mkvenv: assume presence of importlib.metadata

2023-09-07 Thread Paolo Bonzini
importlib.metadata is included in Python 3.8, so there is no need to fallback to either importlib-metadata or pkgresources when generating console script shims. Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 197 ++- python/setup.cfg |

[PULL 12/51] softmmu/vl.c: inline include/qemu/qemu-options.h into vl.c

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev qemu-options.h just includes qemu-options.def with some #defines. We already do this in vl.c in other place. Since no other file includes qemu-options.h anymore, just inline it in vl.c. This effectively reverts second half of commit 59a5264b99434. Signed-off-by: Michael

[PULL 27/51] contrib/plugins: use an independent makefile

2023-09-07 Thread Paolo Bonzini
The initial reason to write this patch was to remove the last use of CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG plugins are unrelated to --enable-debug-tcg, and instead they should be the same as those used to build emulators (the plugins are not build via meson for

[PULL 05/51] target/i386: Add support for AMX-COMPLEX in CPUID enumeration

2023-09-07 Thread Paolo Bonzini
From: Tao Su Latest Intel platform GraniteRapids-D introduces AMX-COMPLEX, which adds two instructions to perform matrix multiplication of two tiles containing complex elements and accumulate the results into a packed single precision tile. AMX-COMPLEX is enumerated via

[PATCH v3 1/5] softmmu: Per-AddressSpace bounce buffering

2023-09-07 Thread Mattias Nissler
Instead of using a single global bounce buffer, give each AddressSpace its own bounce buffer. The MapClient callback mechanism moves to AddressSpace accordingly. This is in preparation for generalizing bounce buffer handling further to allow multiple bounce buffers, with a total allocation limit

[PULL 33/51] configure: remove dead code

2023-09-07 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 8 1 file changed, 8 deletions(-) diff --git a/configure b/configure index ef085376922..48ae0fc05ab 100755 --- a/configure +++ b/configure @@ -1126,14 +1126,6 @@ else done fi -# see if system emulation was really requested -case "

[PULL 49/51] sysemu/kvm: Restrict kvm_pc_setup_irq_routing() to x86 targets

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé kvm_pc_setup_irq_routing() is only defined for x86 targets (in hw/i386/kvm/apic.c). Its declaration is pointless on all other targets. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-14-phi...@linaro.org> Signed-off-by: Paolo Bonzini ---

[PULL 36/51] Revert "mkvenv: work around broken pip installations on Debian 10"

2023-09-07 Thread Paolo Bonzini
Debian 10 has Python 3.7, so it is not possible to use it anymore now that Python 3.8 is required. Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 74 +--- 1 file changed, 16 insertions(+), 58 deletions(-) diff --git a/python/scripts/mkvenv.py

[PULL 46/51] sysemu/kvm: Restrict kvm_arch_get_supported_cpuid/msr() to x86 targets

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé kvm_arch_get_supported_cpuid() / kvm_arch_get_supported_msr_feature() are only defined for x86 targets (in target/i386/kvm/kvm.c). Their declarations are pointless on other targets. Signed-off-by: Philippe Mathieu-Daudé Message-ID:

[PULL 10/51] os-posix.c: move code around

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev this moves code blocks so that functions and variables which belongs to the same concept are now close to each other. There's no actual code changes in there. Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-6-...@tls.msk.ru>

[PULL 25/51] configure: remove boolean variables for targets

2023-09-07 Thread Paolo Bonzini
Just use $targetos always. Signed-off-by: Paolo Bonzini --- configure | 55 +-- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/configure b/configure index 378a0de9fb6..f96f7359a83 100755 --- a/configure +++ b/configure @@

[PULL 15/51] contrib/plugins/cache: Fix string format

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This fixes on Darwin: plugins/cache.c:550:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_daccess, ^~

[PULL 26/51] configure: move --enable-debug-tcg to meson

2023-09-07 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- configure | 11 +-- meson.build | 3 ++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 8 insertions(+), 11

Re: [PATCH 0/1] qom: fix setting of qdev array properties

2023-09-07 Thread Kevin Wolf
Am 07.09.2023 um 11:33 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > Am 04.09.2023 um 18:25 hat Daniel P. Berrangé geschrieben: > >> I still think for user creatable devices we'd be better off just > >> mandating the use of JSON syntax for -device and thus leveraging > >> the native

[PULL 01/51] linux-user, bsd-user: disable on unsupported host architectures

2023-09-07 Thread Paolo Bonzini
Safe signal handling around system calls is mandatory for user-mode emulation, and requires a small piece of handwritten assembly code. So refuse to compile unless the common-user/host subdirectory exists for the host architecture that was detected or selected with --cpu. Reviewed-by: Richard

[PULL 40/51] target/i386/helper: Restrict KVM declarations to system emulation

2023-09-07 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé User emulation doesn't need any KVM declarations. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904124325.79040-5-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PULL 14/51] contrib/plugins: remove -soname argument

2023-09-07 Thread Paolo Bonzini
-soname is not needed for runtime-loaded modules. For example, Meson says: if not isinstance(target, build.SharedModule) or target.force_soname: # Add -Wl,-soname arguments on Linux, -install_name on OS X commands += linker.get_soname_args(

[PULL 19/51] contrib/plugins: add Darwin support

2023-09-07 Thread Paolo Bonzini
Under Darwin, using -shared makes it impossible to have undefined symbols and -bundle has to be used instead; so detect the OS and use different options. Based-on: <20230907101811.469236-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- contrib/plugins/Makefile | 4 1 file changed, 4

[PULL 11/51] os-posix.c: remove unneeded #includes

2023-09-07 Thread Paolo Bonzini
From: Michael Tokarev Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake Message-ID: <20230901101302.3618955-7-...@tls.msk.ru> Signed-off-by: Paolo Bonzini --- os-posix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/os-posix.c b/os-posix.c index a8e38c02988..f90dfda9b0d 100644

[PULL 02/51] target/i386: raise FERR interrupt with iothread locked

2023-09-07 Thread Paolo Bonzini
Otherwise tcg_handle_interrupt() triggers an assertion failure: #5 0x55c97369 in tcg_handle_interrupt (cpu=0x57434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:83 #6 tcg_handle_interrupt (cpu=0x57434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:81 #7 0x55b4d58b in

<    1   2   3   4   >