[RFC PATCH] exec/cpu-defs: Check for SOFTMMU instead of !USER_ONLY

2023-06-05 Thread Philippe Mathieu-Daudé
We want to check the softmmu tlb availability, not if we are targetting system emulation. Besides, this code could be used by user emulation in the future. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20230605222420.14776-1-phi...@linaro.org> See also https://lore.kernel.org/qemu-devel/7

Re: [PATCH v2 5/8] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set

2023-06-05 Thread John Snow
On Thu, Jun 1, 2023 at 9:46 AM Niklas Cassel wrote: > > From: Niklas Cassel > > For NCQ, PxCI is cleared on command queued successfully. > For non-NCQ, PxCI is cleared on command completed successfully. > Successfully means ERR_STAT, BUSY and DRQ are all cleared. > > A command that has ERR_STAT s

Re: [PATCH v3] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Weiwei Li
On 2023/6/6 00:45, Himanshu Chauhan wrote: On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. v3 Changes: o Removed explicit return of boolean value from comparision of priv/allowed_priv v2 Changes: o Removed goto to re

[RFC v1 1/4] qemu: add GPU memory information as object

2023-06-05 Thread ankita
From: Ankit Agrawal The GPU memory is exposed as device BAR1 to the VM and is discovered by QEMU through the VFIO_DEVICE_GET_REGION_INFO ioctl. QEMU performs the mapping to it. The GPU memory can be added in the VM as (upto 8) separate NUMA nodes. To achieve this, QEMU inserts a series of the PX

[RFC v1 0/4] Expose GPU memory as coherently CPU accessible

2023-06-05 Thread ankita
From: Ankit Agrawal NVIDIA is building systems which allows the CPU to coherently access GPU memory. This GPU device memory can be added and managed by the kernel memory manager. The patch holds the required changes in QEMU to expose this memory to the device assigned VMs. The GPU device memory

[RFC v1 4/4] qemu: adjust queried bar size to power-of-2

2023-06-05 Thread ankita
From: Ankit Agrawal The GPU device memory is reported to the VM as a BAR. The device memory may not be aligned to the power-of-2, but the QEMU expects the PCI BAR to be. Align the reported device memory size to the next power-of-2 before QEMU does an mmap. Signed-off-by: Ankit Agrawal --- hw/v

[RFC v1 2/4] qemu: patch guest SRAT for GPU memory

2023-06-05 Thread ankita
From: Ankit Agrawal The guest VM adds the GPU memory as (upto 8) separate memory-less NUMA nodes. ACPI SRAT need to thus insert proximity domains and tag them as MEM_AFFINITY_HOTPLUGGABLE. The VM kernel can then parse the SRAT and create NUMA nodes. Signed-off-by: Ankit Agrawal --- hw/arm/virt

[RFC v1 3/4] qemu: patch guest DSDT for GPU memory

2023-06-05 Thread ankita
From: Ankit Agrawal To add the memory in the guest as NUMA nodes, it needs the PXM node index and the total count of nodes associated with the memory. The range of proximity domains are communicated to the VM as part of the guest ACPI using the nvidia,gpu-mem-pxm-start and nvidia,gpu-mem-pxm-coun

Re: [PATCH] vdpa: fix not using CVQ buffer in case of error

2023-06-05 Thread Jason Wang
On Sat, Jun 3, 2023 at 1:35 AM Eugenio Pérez wrote: > > Bug introducing when refactoring. Otherway, the guest never received > the used buffer. > > Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from > vhost_vdpa_net_handle_ctrl_avail") > Signed-off-by: Eugenio Pérez Acked-by: Jaso

Re: [PATCH] vdpa: mask _F_CTRL_GUEST_OFFLOADS for vhost vdpa devices

2023-06-05 Thread Jason Wang
On Sat, Jun 3, 2023 at 1:33 AM Eugenio Pérez wrote: > > QEMU does not emulate it so it must be disabled as long as the backend > does not support it. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a

Re: [PATCH] virtio-net: correctly report maximum tx_queue_size value

2023-06-05 Thread Jason Wang
On Mon, Jun 5, 2023 at 10:22 PM Laurent Vivier wrote: > > Maximum value for tx_queue_size depends on the backend type. > 1024 for vDPA/vhost-user, 256 for all the others. > > The value is returned by virtio_net_max_tx_queue_size() to set the > parameter: > > n->net_conf.tx_queue_size = MIN(vir

RE: [PATCH v2 2/4] intel_iommu: Fix a potential issue in VFIO dirty page sync

2023-06-05 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Tuesday, June 6, 2023 2:39 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com; alex.william...@redhat.com;

RE: [PATCH v2 3/4] memory: Document update on replay()

2023-06-05 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Tuesday, June 6, 2023 2:42 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com; alex.william...@redhat.com;

Re: [RFC v1 2/4] qemu: patch guest SRAT for GPU memory

2023-06-05 Thread Philippe Mathieu-Daudé
On 6/6/23 01:50, ank...@nvidia.com wrote: From: Ankit Agrawal The guest VM adds the GPU memory as (upto 8) separate memory-less NUMA nodes. ACPI SRAT need to thus insert proximity domains and tag them as MEM_AFFINITY_HOTPLUGGABLE. The VM kernel can then parse the SRAT and create NUMA nodes. Si

Re: [RFC v1 4/4] qemu: adjust queried bar size to power-of-2

2023-06-05 Thread Philippe Mathieu-Daudé
On 6/6/23 01:50, ank...@nvidia.com wrote: From: Ankit Agrawal The GPU device memory is reported to the VM as a BAR. The device memory may not be aligned to the power-of-2, but the QEMU expects the PCI BAR to be. Align the reported device memory size to the next power-of-2 before QEMU does an mm

Re: [PATCH 01/10] sysemu/kvm: Remove unused headers

2023-06-05 Thread Philippe Mathieu-Daudé
On 5/4/23 18:04, Philippe Mathieu-Daudé wrote: All types used are forward-declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index cc6c678ed8..7902acdf

[PULL 00/18] s390x and misc patches

2023-06-05 Thread Thomas Huth
Hi Richard! The following changes since commit 848a6caa88b9f082c89c9b41afa975761262981d: Merge tag 'migration-20230602-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-06-02 17:33:29 -0700) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

[PULL 04/18] tests/tcg/s390x: Test LOCFHR

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich Message-Id: <20230526181240.1425579-5-...@linux.ibm.com> Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth --- tests/tcg/s390x/lo

[PULL 13/18] scripts: Add qom-cast-macro-clean-cocci-gen.py

2023-06-05 Thread Thomas Huth
From: Philippe Mathieu-Daudé Add a script to generate Coccinelle semantic patch removing all pointless QOM cast macro uses. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230601093452.38972-2-phi...@linaro.org> Reviewed-by: Richard Henderson Signed-off-by

[PULL 02/18] tests/tcg/s390x: Test LCBB

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Add a test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich Message-Id: <20230526181240.1425579-3-...@linux.ibm.com> Reviewed-by: David Hildenbrand Acked-by: Richard Henderson Signed-off-by: Thomas Huth --- tests/tcg/s390x/lcbb.c

[PULL 07/18] Add conditional dependency for libkeyutils

2023-06-05 Thread Thomas Huth
From: Max Fritz This modification enables better control over the inclusion of libkeyutils based on the configuration, enhancing the flexibility of the build system. Signed-off-by: Max Fritz Message-Id: <168471463402.18155.357535902742993996...@git.sr.ht> Reviewed-by: Daniel P. Berrangé [thuth

[PULL 17/18] linux-user/elfload: Introduce elf_hwcap_str() on s390x

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich It is required for implementing /proc/cpuinfo emulation. Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich Message-Id: <20230605113950.1169228-4-...@linux.ibm.com> Signed-off-by: Thomas Huth --- linux-user/loader.h | 1 + linux-user/elfload.c | 27 ++

[PULL 16/18] linux-user/elfload: Expose get_elf_hwcap() on s390x

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich It is required for implementing /proc/cpuinfo emulation. Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich Message-Id: <20230605113950.1169228-3-...@linux.ibm.com> Signed-off-by: Thomas Huth --- linux-user/loader.h | 4 linux-user/elfload.c | 2 +- 2

[PULL 09/18] tests/tcg/s390x: Test MXDB and MXDBR

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich Message-Id: <20230601223027.795501-3-...@linux.ibm.com> Acked-by: David Hildenbrand Signed-off-by: Thomas Huth --- tests/tcg/s390x/mxdb.c | 30 +

[PULL 01/18] target/s390x: Fix LCBB overwriting the top 32 bits

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich LCBB is supposed to overwrite only the bottom 32 bits, but QEMU erroneously overwrites the entire register. Fixes: 6d9303322ed9 ("s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY") Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich Message-Id: <20230526181240.142

[PULL 05/18] linux-user/s390x: Fix single-stepping SVC

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Currently single-stepping SVC executes two instructions. The reason is that EXCP_DEBUG for the SVC instruction itself is masked by EXCP_SVC. Fix by re-raising EXCP_DEBUG. Signed-off-by: Ilya Leoshkevich Message-Id: <20230510230213.330134-2-...@linux.ibm.com> Signed-off-by

[PULL 15/18] s390x/tcg: Fix CPU address returned by STIDP

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich In qemu-user-s390x, /proc/cpuinfo contains: processor 0: version = 00, identification = 00, machine = 8561 processor 1: version = 00, identification = 40, machine = 8561 The highest nibble is supposed to contain the CPU address, but it's off by

[PULL 12/18] hw/mips/malta: Fix the malta machine on big endian hosts

2023-06-05 Thread Thomas Huth
Booting a Linux kernel with the malta machine is currently broken on big endian hosts. The cpu_to_gt32 macro wants to byteswap a value for little endian targets only, but uses the wrong way to do this: cpu_to_[lb]e32 works the other way round on big endian hosts! Fix it by using the same ways on bo

[PULL 06/18] tests/tcg/s390x: Test single-stepping SVC

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Alex Bennée Message-Id: <20230510230213.330134-3-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.target | 11 - tests/tcg/s390x/gdbstub/test-svc.py | 6

[PULL 10/18] tests/qtest: Run ipmi-bt-test only if CONFIG_IPMI_EXTERN is set

2023-06-05 Thread Thomas Huth
The ipmi-bt-test uses "-device ipmi-bmc-extern", thus it should only be run if this device has been enabled in the configuration. Message-Id: <20230524081024.1619273-1-th...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PULL 14/18] bulk: Remove pointless QOM casts

2023-06-05 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical change running Coccinelle spatch with content generated from the qom-cast-macro-clean-cocci-gen.py added in the previous commit. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230601093452.38972-3-phi...@linaro.org>

[PULL 03/18] target/s390x: Fix LOCFHR taking the wrong half of R2

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich LOCFHR should write top-to-top, but QEMU erroneously writes bottom-to-top. Fixes: 45aa9aa3b773 ("target/s390x: Implement load-on-condition-2 insns") Cc: qemu-sta...@nongnu.org Reported-by: Mikhail Mitskevich Closes: https://gitlab.com/qemu-project/qemu/-/issues/1668 Signe

[PULL 18/18] linux-user: Emulate /proc/cpuinfo on s390x

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich Some s390x userspace programs are confused when seeing a foreign /proc/cpuinfo [1]. Add the emulation for s390x; follow the respective kernel code structure where possible. Output example: vendor_id : IBM/S390 # processors: 12 bogomips pe

[PULL 08/18] target/s390x: Fix MXDB and MXDBR

2023-06-05 Thread Thomas Huth
From: Ilya Leoshkevich These instructions multiply 64 bits by 64 bits, not 128 bits by 64 bits. Reported-by: Tulio Magno Quites Machado Filho Fixes: 2b91240f95fd ("target/s390x: Use Int128 for passing float128") Cc: qemu-sta...@nongnu.org Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=221

[PULL 11/18] gitlab-ci: Remove unused Python package

2023-06-05 Thread Thomas Huth
From: Camilla Conte Python should have been removed in this commit: https://gitlab.com/qemu-project/qemu/-/commit/94b8b146df84ba472f461398d93fb9cdf0db8f94 Signed-off-by: Camilla Conte Message-Id: <20230531150824.32349-2-cco...@redhat.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas H

Re: [PATCH v3 10/23] q800: reimplement mac-io region aliasing using IO memory region

2023-06-05 Thread Mark Cave-Ayland
On 05/06/2023 13:43, Philippe Mathieu-Daudé wrote: On 4/6/23 15:14, Mark Cave-Ayland wrote: The current use of aliased memory regions causes us 2 problems: firstly the output of "info qom-tree" is absolutely huge and difficult to read, and secondly we have already reached the internal limit for

Re: [PATCH v3 0/3] Trivial cleanups

2023-06-05 Thread Mark Cave-Ayland
On 05/06/2023 07:58, Bernhard Beschow wrote: Am 1. Juni 2023 12:45:47 UTC schrieb Mark Cave-Ayland : On 01/06/2023 13:07, Michael S. Tsirkin wrote: On Thu, May 25, 2023 at 05:03:15PM +0100, Mark Cave-Ayland wrote: On 23/05/2023 20:56, Bernhard Beschow wrote: This series: * Removes dead co

<    1   2   3   4