[PULL 11/63] hw/virtio: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the virtio memory device stubs are needed exactly when the Kconfig symbol is not enabled, they can be placed in hw/virtio/ and conditionalized on CONFIG_VIRTIO_MD. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-12-pbonz...@redhat.com>

[PULL 45/63] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects

2024-04-23 Thread Paolo Bonzini
-ID: <20240409230743.962513-2-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- qapi/qom.json | 11 ++- target/i386/sev.c | 18 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 85e6b4f84a2..38dde6d785a

[PULL 14/63] memory-device: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the memory-device stubs are needed exactly when the Kconfig symbols are not needed, move them to hw/mem/. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-15-pbonz...@redhat.com> Signed-off-by:

[PULL 58/63] target/i386/host-cpu: Consolidate the use of warn_report_once()

2024-04-23 Thread Paolo Bonzini
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "warned". Signed-off-by: Zhao Liu Message-ID: <20240327103951.3853425-2-zhao1@linux.intel.com> Signed-off-by: Paolo Bonzini --- target/i386/host-cpu.c | 11 --- 1 file changed, 4

[PULL 38/63] linux-headers: update to current kvm/next

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/standard-headers/asm-x86/bootparam.h | 17 +- include/standard-headers/asm-x86/kvm_para.h | 3 +- include/standard-headers/asm-x86/setup_data.h | 83 +++ include/standard-headers/linux/ethtool.h | 48 ++ include/standard-headers/linux/fuse.h

[PULL 53/63] RAMBlock: make guest_memfd require uncoordinated discard

2024-04-23 Thread Paolo Bonzini
inated discard, i.e. use ram_block_coordinated_discard_require(). [Commit message mostly by Michael Roth ] Signed-off-by: Paolo Bonzini --- system/physmem.c | 8 1 file changed, 8 insertions(+) diff --git a/system/physmem.c b/system/physmem.c index f5dfa20e57e..5ebcf5be116 100644 --- a/

[PULL 48/63] kvm: Introduce support for memory_attributes

2024-04-23 Thread Paolo Bonzini
or guest_memfd based private memory. Signed-off-by: Xiaoyao Li Message-ID: <20240320083945.991426-11-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 4 accel/kvm/kvm-all.c | 32 2 files changed, 36 insertions(+) diff --git a/i

[PULL 12/63] semihosting: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the semihosting stubs are needed exactly when the Kconfig symbols are not needed, move them to semihosting/ and conditionalize them on CONFIG_SEMIHOSTING and/or CONFIG_SYSTEM_ONLY. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-13-pbonz...@redhat.com> Signed-off-by:

[PULL 08/63] hw: Include minimal source set in user emulation build

2024-04-23 Thread Paolo Bonzini
. This removes about 10% from the time needed to run "../configure --disable-system --disable-tools --disable-guest-agent". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-8-phi...@linaro.org> Signed-off-by: Paolo Bon

[PULL 51/63] kvm/memory: Make memory type private by default if it has guest memfd backend

2024-04-23 Thread Paolo Bonzini
to private when memory region has valid guest memfd backend. Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-16-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a

[PULL 34/63] ppc/pef: switch to use confidential_guest_kvm_init/reset()

2024-04-23 Thread Paolo Bonzini
-by: Paolo Bonzini --- include/hw/ppc/pef.h | 17 - hw/ppc/pef.c | 9 ++--- hw/ppc/spapr.c | 10 +++--- 3 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 include/hw/ppc/pef.h diff --git a/include/hw/ppc/pef.h b/include/hw/ppc/pef.h deleted file

[PULL 57/63] kvm/tdx: Ignore memory conversion to shared of unassigned region

2024-04-23 Thread Paolo Bonzini
conversion request of non-assigned region to shared and return success. Otherwise OVMF is confused and panics there. Signed-off-by: Isaku Yamahata Signed-off-by: Xiaoyao Li Message-ID: <20240229063726.610065-35-xiaoyao...@intel.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.

[PULL 56/63] kvm/tdx: Don't complain when converting vMMIO region to shared

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9eef2c64003..0911154bf8e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2927,9 +2927,22

[PULL 30/63] q35: Introduce smm_ranges property for q35-pci-host

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Sean Christopherson Signed-off-by: Xiaoyao Li Signed-off-by: Michael Roth Message-ID: <20240320083945.991426-19-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 1 + include/hw/pci-host/q35.h | 1 + hw/i386/pc_q35.c | 2 ++

[PULL 50/63] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot

2024-04-23 Thread Paolo Bonzini
-by: Xiaoyao Li Message-ID: <20240320083945.991426-10-michael.r...@amd.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm_int.h | 2 ++ accel/kvm/kvm-all.c | 46 +--- accel/kvm/trace-events | 2 +- 3 files changed, 41 insertions(+), 9 del

[PULL 21/63] kvm: use configs/ definition to conditionalize debug support

2024-04-23 Thread Paolo Bonzini
If an architecture adds support for KVM_CAP_SET_GUEST_DEBUG but QEMU does not have the necessary code, QEMU will fail to build after updating kernel headers. Avoid this by using a #define in config-target.h instead of KVM_CAP_SET_GUEST_DEBUG. Signed-off-by: Paolo Bonzini --- configs/targets

[PULL 04/63] tests/unit: match some unit tests to corresponding feature switches

2024-04-23 Thread Paolo Bonzini
-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-5-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- tests/unit/meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build

[PULL 17/63] stubs: include stubs only if needed

2024-04-23 Thread Paolo Bonzini
Currently it is not documented anywhere why some functions need to be stubbed. Group the files in stubs/meson.build according to who needs them, both to reduce the size of the compilation and to clarify the use of stubs. Signed-off-by: Paolo Bonzini Message-ID: <20240408155330.522792-18-pb

[PULL 10/63] hw/usb: move stubs out of stubs/

2024-04-23 Thread Paolo Bonzini
Since the USB stubs are needed exactly when the Kconfig symbols are not enabled, they can be placed in hw/usb/ and conditionalized on CONFIG_USB. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-11-pb

[PULL 01/63] meson: do not link pixman automatically into all targets

2024-04-23 Thread Paolo Bonzini
The dependency on pixman is listed manually in all sourcesets that need it. There is no need to bring into libqemuutil, since there is nothing in util/ that needs pixman either. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-ID

[PULL 02/63] tests: only build plugins if TCG is enabled

2024-04-23 Thread Paolo Bonzini
There is no way to use them for testing, if all the available accelerators use hardware virtualization. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240408155330.522792-3-pbonz...@redhat.com> Signed-off-by: Paolo B

[PULL 00/63] First batch of i386 and build system patch for QEMU 9.1

2024-04-23 Thread Paolo Bonzini
to file imports i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects hw/i386/sev: Use legacy SEV VM types for older machine types Paolo Bonzini (28): meson: do not link pixman automatically into all targets tests: only build plugins if TCG is enabled tests/unit

[PATCH 14/22] openrisc: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with OpenRISC. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/or1k-softmmu/d

[PATCH 19/22] sh4: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with SH. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/sh4-softmmu/defau

[PATCH 05/22] cris: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with CRIS. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/cris-softmmu/defau

[PATCH 11/22] meson: make target endianneess available to Kconfig

2024-04-23 Thread Paolo Bonzini
a "depends on" clause. Signed-off-by: Paolo Bonzini --- meson.build| 12 +++- target/Kconfig | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 9af60550753..9c4fb027853 100644 --- a/meson.build +++ b/meson.build @@ -3037,7 +3037

[PATCH 04/22] avr: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with AVR. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/avr-softmmu/defau

[PATCH 09/22] m68k: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with m68k. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/m68k-softmmu/defaul

[PATCH 10/22] microblaze: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Microblaze. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/microbla

[PATCH 18/22] s390x: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with s390. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/s390x-softmmu/defau

[PATCH 07/22] i386: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with i386. No changes to generated config-devices.mak files, other than adding CONFIG_I386 to the x86_64-softmmu target. Signed-off

[PATCH 15/22] ppc: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configs/devices/ppc-softmmu/default.mak | 26 --- configs/devices/ppc64-softmmu/default.mak | 8 +++ hw/ppc/Kconfig| 26 +++ target/ppc/Kconfig| 1 + 4 files c

[PATCH 21/22] tricore: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with TriCore. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/tricore-softmmu/d

[PATCH 22/22] xtensa: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Xtensa. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/xtensa-softmmu/d

[PATCH 16/22] riscv: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RISC-V. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/riscv32-softmmu/d

[PATCH 13/22] nios2: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Nios2. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/nios2-softmmu/defau

[PATCH 20/22] sparc: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with SPARC and SPARC64. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/spa

[PATCH 08/22] loongarch: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Loongarch. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/loongarch

[PATCH 12/22] mips: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with MIPS. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/mips-softmmu/

[PATCH 17/22] rx: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RX. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/rx-softmmu/defau

[PATCH 01/22] configs: list "implied" device groups in the default configs

2024-04-23 Thread Paolo Bonzini
Match the optional device groups to what is actually included in the config-devices.mak files. Signed-off-by: Paolo Bonzini --- configs/devices/arm-softmmu/default.mak | 2 ++ configs/devices/loongarch64-softmmu/default.mak | 3 +++ configs/devices/or1k-softmmu/default.mak| 4

[PATCH 02/22] alpha: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Start with Alpha. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/alpha-softmmu/defau

[PATCH 06/22] hppa: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with PARISC. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/hppa-softmmu/defau

[PATCH 00/22] configs: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
oards have to be enabled in a --without-default-devices build, similar to devices. Paolo Paolo Bonzini (22): configs: list "implied" device groups in the default configs alpha: switch boards to "default y" arm: switch boards to "default y" avr: switch boa

[PATCH 03/22] arm: switch boards to "default y"

2024-04-23 Thread Paolo Bonzini
For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism. No changes to generated config-devices.mak file. Signed-off-by: Paolo Bonzini --- configs/devices/arm-softmmu/default.mak | 3 ++- hw/a

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-23 Thread Paolo Bonzini
On Mon, Apr 22, 2024 at 9:10 PM Volker Rümelin wrote: > > Am 20.04.24 um 07:40 schrieb Mark Cave-Ayland: > >> Current documentation agrees that all 32 bits are written, so I don't > >> think you need this comment: > > > > Ah that's good to know the docs are now correct. I added the comment > > as

Re: [PATCH v5 0/3] Add support for the RAPL MSRs series

2024-04-19 Thread Paolo Bonzini
On Wed, Apr 17, 2024 at 7:58 PM Daniel P. Berrangé wrote: > > > However, one question remains unanswered pointing the issue with the > > > location of "/var/local/run/qemu-vmsr-helper.sock", created by > > > compute_default_paths(). QEMU is not allowed to reach the socket here. > > > > If I

Re: [PATCH] accel/tcg/icount-common: Consolidate the use of warn_report_once()

2024-04-18 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH] pythondeps.toml: warn about updates needed to docs/requirements.txt

2024-04-18 Thread Paolo Bonzini
docs/requirements.txt is expected by readthedocs and should be in sync with pythondeps.toml. Add a comment to both. Signed-off-by: Paolo Bonzini --- docs/requirements.txt | 3 +++ pythondeps.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/requirements.txt b/docs

Re: [PATCH 0/3] target/i386/cpu: Misc cleanup for warning message

2024-04-17 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled

2024-04-15 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2] target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

2024-04-15 Thread Paolo Bonzini
On Mon, Apr 15, 2024 at 8:50 AM Ruihan Li wrote: > > When emulated with QEMU, interrupts will never come in the following > loop. However, if the NOP instruction is uncommented, interrupts will > fire as normal. > > loop: > cli > call do_sti >

Re: [PATCH for-9.1 4/9] Bump minimum glib version to v2.66

2024-04-12 Thread Paolo Bonzini
On 4/12/24 12:58, Thomas Huth wrote: On 12/04/2024 12.16, Paolo Bonzini wrote: On Thu, Mar 28, 2024 at 3:06 PM Thomas Huth wrote: Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According

Re: [PATCH] Makefile: preserve --jobserver-auth argument when calling ninja

2024-04-12 Thread Paolo Bonzini
On Fri, Apr 12, 2024 at 1:52 PM Fiona Ebner wrote: > > Am 02.04.24 um 10:17 schrieb Martin Hundebøll: > > Qemu wraps its call to ninja in a Makefile. Since ninja, as opposed to > > make, utilizes all CPU cores by default, the qemu Makefile translates > > the absense of a `-jN` argument into

Re: [PULL 0/2] Final build system fixes for 9.0

2024-04-12 Thread Paolo Bonzini
> Since these 2 patches don't modify what we can build with v9.0.0-rc3, > would it be acceptable to merge them without having to produce a > v9.0.0-rc4 tag before the final release? I didn't want to ask you about that, but I agree it would not be an issue. Paolo

Re: [PATCH v5 1/3] qio: add support for SO_PEERCRED for socket channel

2024-04-12 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 2:14 PM Anthony Harivel wrote: > > The function qio_channel_get_peercred() returns a pointer to the > credentials of the peer process connected to this socket. > > This credentials structure is defined in as follows: > > struct ucred { > pid_t pid;/* Process

Re: [PATCH v5 0/3] Add support for the RAPL MSRs series

2024-04-12 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 2:14 PM Anthony Harivel wrote: > > Dear maintainers, > > First of all, thank you very much for your review of my patch > [1]. > > In this version (v5), I have attempted to address all the problems > addressed by Daniel during the last review. I've been more careful with >

[PATCH] ci: move external build environment setups to CentOS Stream 9

2024-04-12 Thread Paolo Bonzini
RHEL 9 (and thus also the derivatives) are available since two years now, so according to QEMU's support policy, we can drop the active support for the previous major version 8 now. Thus upgrade our CentOS Stream build environment playbooks to major version 9 now. Signed-off-by: Paolo Bonzini

Re: [PATCH for-9.1 4/9] Bump minimum glib version to v2.66

2024-04-12 Thread Paolo Bonzini
On Thu, Mar 28, 2024 at 3:06 PM Thomas Huth wrote: > > Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can > look into bumping the glib version to a new minimum for further > clean-ups. According to repology.org, available versions are: > > CentOS Stream 9: 2.66.7 > Debian

[PULL 2/2] meson.build: Disable -fzero-call-used-regs on OpenBSD

2024-04-12 Thread Paolo Bonzini
available. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2278 Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240411120819.56417-1-th...@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletio

[PULL 0/2] Final build system fixes for 9.0

2024-04-12 Thread Paolo Bonzini
The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[PULL 1/2] Makefile: fix use of -j without an argument

2024-04-12 Thread Paolo Bonzini
akefile:161: run-ninja] Error Let's fix that and indent the touched code for better readability. Signed-off-by: Matheus Tavares Bernardino Fixes: d1ce2cc95b ("Makefile: preserve --jobserver-auth argument when calling ninja", 2024-04-02) Signed-off-by: Paolo Bonzini --- Makefile | 9 +

Re: [PATCH for-9.0] meson.build: Disable -fzero-call-used-regs on OpenBSD

2024-04-12 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] Makefile: fix use of -j without an argument

2024-04-12 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 5:46 PM Matheus Tavares Bernardino wrote: > +$(if $(filter -j, $(MAKEFLAGS)) \ > +,, \ > +$(or \ > + $(filter -l% -j%, $(MAKEFLAGS)), \ > + $(if $(filter --jobserver-auth=%, $(MAKEFLAGS)),, -j1)) \ > +

[PATCH v2] Makefile: fix use of -j without an argument

2024-04-12 Thread Paolo Bonzini
akefile:161: run-ninja] Error Let's fix that and indent the touched code for better readability. Signed-off-by: Matheus Tavares Bernardino Fixes: d1ce2cc95b ("Makefile: preserve --jobserver-auth argument when calling ninja", 2024-04-02) Signed-off-by: Paolo Bonzini --- Makefile | 9 +

Re: [PATCH for-9.1 v1 0/3] Add SEV/SEV-ES machine compat options for KVM_SEV_INIT2

2024-04-11 Thread Paolo Bonzini
On Wed, Apr 10, 2024 at 1:08 AM Michael Roth wrote: > > These patches are also available at: > > https://github.com/amdese/qemu/commits/sev-init-legacy-v1 > > and are based on top Paolo's qemu-coco-queue branch containing the > following patches: A more complete version of patch 2 was already

Re: [PATCH for-9.1 09/19] target/i386: move 60-BF opcodes to new decoder

2024-04-11 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 5:05 PM Zhao Liu wrote: > > On Tue, Apr 09, 2024 at 06:43:13PM +0200, Paolo Bonzini wrote: > > Date: Tue, 9 Apr 2024 18:43:13 +0200 > > From: Paolo Bonzini > > Subject: [PATCH for-9.1 09/19] target/i386: move 60-BF opcodes to new > > decode

Re: [PATCH for-9.1 09/19] target/i386: move 60-BF opcodes to new decoder

2024-04-11 Thread Paolo Bonzini
On Thu, Apr 11, 2024 at 9:47 AM Richard Henderson wrote: > > +case MO_32: > > +#ifdef TARGET_X86_64 > > +/* > > + * This could also use the same algorithm as MO_16. It produces > > fewer > > + * TCG ops and better code if flags are needed, but it requires a > >

Re: [PATCH for-9.1 04/19] target/i386: do not use s->tmp0 and s->tmp4 to compute flags

2024-04-10 Thread Paolo Bonzini
Il mer 10 apr 2024, 08:35 Richard Henderson ha scritto: > On 4/9/24 06:43, Paolo Bonzini wrote: > > Create a new temporary whenever flags have to use one, instead of using > > s->tmp0 or s->tmp4. NULL can now be passed as the scratch register > > to gen_prepare_*. &

[PATCH for-9.1 19/19] target/i386: remove duplicate prefix decoding

2024-04-09 Thread Paolo Bonzini
into i386_tr_translate_insn. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 259 +++ target/i386/tcg/decode-new.c.inc | 60 +-- 2 files changed, 100 insertions(+), 219 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c

[PATCH for-9.1 10/19] target/i386: generalize gen_movl_seg_T0

2024-04-09 Thread Paolo Bonzini
In the new decoder it is sometimes easier to put the segment in T1 instead of T0, usually because another operand was loaded by common code in T0. Genrealize gen_movl_seg_T0 to allow using any source. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 16 1 file

[PATCH for-9.1 09/19] target/i386: move 60-BF opcodes to new decoder

2024-04-09 Thread Paolo Bonzini
Compared to the old decoder, the main differences in translation are for the little-used ARPL instruction. IMUL is adjusted a bit to share more code to produce flags, but is otherwise very similar. Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 2 + target/i386/tcg

[PATCH for-9.1 18/19] target/i386: split legacy decoder into a separate function

2024-04-09 Thread Paolo Bonzini
Split the bits that have some duplication with disas_insn_new, from those that should be the main topic of the conversion. This is the first step towards removing duplicate decoding of prefixes between disas_insn and disas_insn_new. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c

[PATCH for-9.1 05/19] target/i386: reintroduce debugging mechanism

2024-04-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 27 +++ target/i386/tcg/decode-new.c.inc | 3 +++ 2 files changed, 30 insertions(+) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index debc1b27283..2a372842db4 100644

[PATCH for-9.1 02/19] target/i386: use TSTEQ/TSTNE to check flags

2024-04-09 Thread Paolo Bonzini
The new conditions obviously come in handy when testing individual bits of EFLAGS, and they make it possible to remove the .mask field of CCPrepare. Lowering to shift+and is done by the optimizer if necessary. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg

[PATCH for-9.1 08/19] target/i386: allow instructions with more than one immediate

2024-04-09 Thread Paolo Bonzini
While keeping decode->immediate for convenience and for 4-operand instructions, store the immediate in X86DecodedOp as well. This enables instructions with more than one immediate such as ENTER. It can also be used for far calls and jumps. Signed-off-by: Paolo Bonzini --- target/i386/

[PATCH for-9.1 13/19] target/i386: move remaining conditional operations to new decoder

2024-04-09 Thread Paolo Bonzini
Move long-displacement Jcc, SETcc and CMOVcc to the new decoder. While filling in the tables makes the code seem longer, the new emitters are all just one line of code. Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/translate.c | 2 +- target

[PATCH for-9.1 06/19] target/i386: move 00-5F opcodes to new decoder

2024-04-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 2 +- target/i386/tcg/decode-new.c.inc | 120 ++ target/i386/tcg/emit.c.inc | 202 +++ 3 files changed, 323 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg

[PATCH for-9.1 11/19] target/i386: move C0-FF opcodes to new decoder (except for x87)

2024-04-09 Thread Paolo Bonzini
carry shr cc_dst, cc_src2, length - 1 and cc_dst, cc_dst, 1 // compute overflow xor cc_src2, cc_src2, T0 extract cc_src2, cc_src2, length - 1, 1 32-bit MUL and IMUL are also slightly more efficient on 64-bit hosts. Signed-off-by: Paolo Bonzini --- include/tcg/tcg.h

[PATCH for-9.1 16/19] target/i386: remove now-converted opcodes from old decoder

2024-04-09 Thread Paolo Bonzini
Send all converted opcodes to disas_insn_new() directly from the big decoding switch statement; once more, the debugging/bisecting logic disappears. Signed-off-by: Paolo Bonzini --- target/i386/helper.h| 11 - target/i386/tcg/shift_helper_template.h.inc | 108

[PATCH for-9.1 14/19] target/i386: move BSWAP to new decoder

2024-04-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 4 +++- target/i386/tcg/decode-new.c.inc | 9 + target/i386/tcg/emit.c.inc | 11 +++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg

[PATCH for-9.1 15/19] target/i386: port extensions of one-byte opcodes to new decoder

2024-04-09 Thread Paolo Bonzini
A few two-byte opcodes are simple extensions of existing one-byte opcodes; they are easy to decode and need no change to emit.c.inc. Port them to the new decoder. Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/translate.c | 4 target/i386

[PATCH for-9.1 12/19] target/i386: merge and enlarge a few ranges for call to disas_insn_new

2024-04-09 Thread Paolo Bonzini
Since new opcodes are not going to be added in translate.c, round the case labels that call to disas_insn_new(), including whole sets of eight opcodes when possible. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH for-9.1 17/19] target/i386: decode x87 instructions in a separate function

2024-04-09 Thread Paolo Bonzini
These are unlikely to be converted to the table-based decoding soon (perhaps there could be generic ESC decoding in decode-new.c.inc for the Mod/RM byte, but not operand decoding), so keep them separate from the remaining legacy-decoded instructions. Signed-off-by: Paolo Bonzini --- target/i386

[PATCH for-9.1 01/19] target/i386: use TSTEQ/TSTNE to test low bits

2024-04-09 Thread Paolo Bonzini
a comparison against zero anyway, and it avoids shifts by 64 which are undefined behavior. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 28 target/i386/tcg/emit.c.inc | 5 ++--- 2 files changed, 22 insertions(+), 11

[PATCH for-9.1 04/19] target/i386: do not use s->tmp0 and s->tmp4 to compute flags

2024-04-09 Thread Paolo Bonzini
Create a new temporary whenever flags have to use one, instead of using s->tmp0 or s->tmp4. NULL can now be passed as the scratch register to gen_prepare_*. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 54 + 1 file changed, 31 inse

[PATCH for-9.1 03/19] target/i386: remove mask from CCPrepare

2024-04-09 Thread Paolo Bonzini
With the introduction of TSTEQ and TSTNE the .mask field is always -1, so remove all the now-unnecessary code. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 81 + 1 file changed, 27 insertions(+), 54 deletions

[PATCH for-9.1 07/19] target/i386: extract gen_far_call/jmp, reordering temporaries

2024-04-09 Thread Paolo Bonzini
Extract the code into new functions, and swap T0/T1 so that T0 corresponds to the first immediate in the instruction stream. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 93 + 1 file changed, 53 insertions(+), 40 deletions(-) diff --git

[PATCH for-9.1 00/19] target/i386: convert 1-byte opcodes to new decoder

2024-04-09 Thread Paolo Bonzini
. Paolo Based-on: <20240406223248.502699-1-richard.hender...@linaro.org> Paolo Bonzini (19): target/i386: use TSTEQ/TSTNE to test low bits target/i386: use TSTEQ/TSTNE to check flags target/i386: remove mask from CCPrepare target/i386: do not use s->tmp0 and s->tmp4 to c

Re: [PATCH] target/i386: fix direction of "32-bit MMU" test

2024-04-09 Thread Paolo Bonzini
On Tue, Apr 9, 2024 at 12:59 PM Zhao Liu wrote: > > Hi Michael & Paolo, > > On Fri, Apr 05, 2024 at 08:30:43PM +0300, Michael Tokarev wrote: > > Date: Fri, 5 Apr 2024 20:30:43 +0300 > > From: Michael Tokarev > > Subject: Re: [PATCH] target/i386: fix direction of "32-bit MMU" test > > > >

Re: [PATCH for-9.1 v2 00/28] linux-user/i386: Properly align signal frame

2024-04-09 Thread Paolo Bonzini
get_sigframe. Alter all of the target fpu routines to access memory that has already been translated and sized. With the exception of patch 22, and with small nits in patches 1/19/23: Reviewed-by: Paolo Bonzini r~ Richard Henderson (28): target/i386: Add tcg/access.[ch] target/i386

Re: [PATCH v2 02/28] target/i386: Convert do_fldt, do_fstt to X86Access

2024-04-09 Thread Paolo Bonzini
On 4/9/24 07:02, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/i386/tcg/fpu_helper.c | 44 +--- 1 file changed, 31 insertions(+), 13 deletions(-) Three incorrect GETPC()s that get fixed later in the series: do_fsave: @@ -2459,15

Re: [PATCH v2 23/28] target/i386: Honor xfeatures in xrstor_sigcontext

2024-04-09 Thread Paolo Bonzini
On 4/9/24 07:02, Richard Henderson wrote: Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index d015fe520a..fd09c973d4 100644 ---

Re: [PATCH v2 19/28] linux-user/i386: Fix -mregparm=3 for signal delivery

2024-04-09 Thread Paolo Bonzini
On 4/9/24 07:02, Richard Henderson wrote: Since v2.6.19, the kernel has supported -mregparm=3. Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/linux-user/i386/signal.c

Re: [PATCH v2 01/28] target/i386: Add tcg/access.[ch]

2024-04-09 Thread Paolo Bonzini
On 4/9/24 07:02, Richard Henderson wrote: Provide a method to amortize page lookup across large blocks. Signed-off-by: Richard Henderson --- target/i386/tcg/access.h| 40 + target/i386/tcg/access.c| 160 target/i386/tcg/meson.build |

Re: [PATCH] target/i386: fix direction of "32-bit MMU" test

2024-04-08 Thread Paolo Bonzini
Il ven 5 apr 2024, 19:30 Michael Tokarev ha scritto: > 01.04.2024 09:02, Michael Tokarev: > > > Anyone can guess why this rather trivial and obviously correct patch > causes segfaults > > in a few tests in staging-7.2 - when run in tcg mode, namely: > > > >pxe-test > >migration-test > >

Re: [PATCH] Revert "hw/virtio: Add support for VDPA network simulation devices"

2024-04-08 Thread Paolo Bonzini
Il lun 8 apr 2024, 12:18 Michael S. Tsirkin ha scritto: > On Mon, Apr 08, 2024 at 10:51:57AM +0100, Peter Maydell wrote: > > On Mon, 8 Apr 2024 at 10:48, Michael S. Tsirkin wrote: > > > > > > This reverts commit cd341fd1ffded978b2aa0b5309b00be7c42e347c. > > > > > > The patch adds non-upstream

[PULL 0/3] 9.0 bugfixes for 2024-04-08

2024-04-08 Thread Paolo Bonzini
: preserve --jobserver-auth argument when calling ninja Paolo Bonzini (1): nanomips: fix warnings with GCC 14 Makefile| 2 +- accel/kvm/kvm-all.c | 15 ++-- disas/nanomips.c| 194 ++-- 3 files changed, 108 insertions(+), 103

[PULL 2/3] nanomips: fix warnings with GCC 14

2024-04-08 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- disas/nanomips.c | 194 +++ 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/disas/nanomips.c b/disas/nanomips.c index a0253598dd6..db0c297b8dc 100644 --- a/disas/nanomips.c +++ b/disas/nanomips.c @@ -3

[PULL 3/3] kvm: error out of kvm_irqchip_add_msi_route() in case of full route table

2024-04-08 Thread Paolo Bonzini
), ensure -accel kvm is set. virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). Signed-off-by: Igor Mammedov Message-ID: <20240408110956.451558-1-imamm...@redhat.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 15 ++- 1 file changed, 10 insertion

<    2   3   4   5   6   7   8   9   10   11   >