Re: [PATCH v6 1/3] hw/intc: Move mtimer/mtimecmp to aclint

2022-07-25 Thread Atish Patra
On Sat, Jul 23, 2022 at 2:43 AM Andrew Jones wrote: > > On Thu, Jul 21, 2022 at 06:00:44PM -0700, Atish Patra wrote: > > Historically, The mtime/mtimecmp has been part of the CPU because > > they are per hart entities. However, they actually belong to aclint > > which is a MMIO device. > > > >

Re: [PATCH 09/16] vhost-user: enable/disable a single vring

2022-07-25 Thread Kangjie Xu
在 2022/7/26 12:07, Jason Wang 写道: 在 2022/7/18 19:17, Kangjie Xu 写道: Implement the vhost_set_single_vring_enable, which is to enable or disable a single vring. The parameter wait_for_reply is added to help for some cases such as vq reset. Meanwhile, vhost_user_set_vring_enable() is

[PATCH v2 1/3] target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features

2022-07-25 Thread Richard Henderson
Indication for support for SVE will not depend on whether we perform the query on the main kvm_state or the temp vcpu. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index

[PATCH v2 2/3] target/arm: Set KVM_ARM_VCPU_SVE while probing the host

2022-07-25 Thread Richard Henderson
Because we weren't setting this flag, our probe of ID_AA64ZFR0 was always returning zero. This also obviates the adjustment of ID_AA64PFR0, which had sanitized the SVE field. The effects of the bug are not visible, because the only thing that ID_AA64ZFR0 is used for within qemu at present is tcg

[PATCH v2 3/3] target/arm: Move sve probe inside kvm >= 4.15 branch

2022-07-25 Thread Richard Henderson
The test for the IF block indicates no ID registers are exposed, much less host support for SVE. Move the SVE probe into the ELSE block. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH v2 0/3] target/arm: Fix kvm probe of ID_AA64ZFR0

2022-07-25 Thread Richard Henderson
Our probing of this SVE register was done within an incorrect vCPU environment, so that the id register was always RAZ. Changes for v2: * Include the commit text I forgot. * Fix svm thinko. r~ Richard Henderson (3): target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features

Re: [PATCH 1/3] target/arm: Create kvm_arm_svm_supported

2022-07-25 Thread Richard Henderson
On 7/25/22 19:02, Zenghui Yu wrote: Hi Richard, On 2022/7/26 2:14, Richard Henderson wrote: Indication for support for SVE will not depend on whether we perform the query on the main kvm_state or the temp vcpu. Mirror kvm_arm_pauth_supported. Signed-off-by: Richard Henderson ---  

Re: [PATCH v2] vhost: Get vring base from vq, not svq

2022-07-25 Thread Jason Wang
On Mon, Jul 25, 2022 at 3:07 PM Jason Wang wrote: > > On Mon, Jul 18, 2022 at 8:05 PM Eugenio Pérez wrote: > > > > The SVQ vring used idx usually match with the guest visible one, as long > > as all the guest buffers (GPA) maps to exactly one buffer within qemu's > > VA. However, as we can see

Re: [PATCH] vdpa: Fix memory listener deletions of iova tree

2022-07-25 Thread Jason Wang
On Mon, Jul 25, 2022 at 3:05 PM Jason Wang wrote: > > On Fri, Jul 22, 2022 at 4:26 PM Eugenio Pérez wrote: > > > > vhost_vdpa_listener_region_del is always deleting the first iova entry > > of the tree, since it's using the needle iova instead of the result's > > one. > > > > This was detected

Re: [PATCH] e1000e: Fix possible interrupt loss when using MSI

2022-07-25 Thread Jason Wang
On Wed, Jul 20, 2022 at 7:14 PM Ake Koomsin wrote: > > Commit "e1000e: Prevent MSI/MSI-X storms" introduced msi_causes_pending > to prevent interrupt storms problem. It was tested with MSI-X. > > In case of MSI, the guest can rely solely on interrupts to clear ICR. > Upon clearing all pending

Re: [PATCH 16/16] vhost-net: vq reset feature bit support

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Add support for negotation of vq reset feature bit. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo I'd suggest to add support for vhost-net kernel as well. It looks much more easier than vhost-user (I guess a stop/start would do the trick). Thanks

Re: [PATCH 14/16] virtio-net: support queue_enable for vhost-user

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Support queue enable in vhost-user scenario. It will be called when a vq reset operation is performed and the vq will be restared. It should be noted that we can restart the vq when the vhost has already started. When launching a new vhost-user device, the

Re: [PATCH 13/16] virtio: introduce queue_enable in virtio

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Introduce the interface queue_enable() in VirtioDeviceClass and the fucntion virtio_queue_enable() in virtio, it can be called when VIRTIO_PCI_COMMON_Q_ENABLE is written. I'd suggest to split this series into two. 1) queue_enable 2) queue_reset The patch

Re: [PATCH 12/16] vhost-net: introduce restart and stop for vhost_net's vqs

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Introduce vhost_virtqueue_restart(), which can restart the virtqueue when the vhost net started running before. Introduce vhost_virtqueue_stop(), which can disable the vq and unmap vrings and the desc of the vq. When disabling the vq, the function is blocked

Re: [PATCH 11/16] vhost: introduce restart and release for vhost_dev's vqs

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Introduce vhost_dev_virtqueue_restart(), which can restart the virtqueue when the vhost has already started running. Meanwhile, vhost_dev_virtqueue_release(), which can ummap the vrings and the desc of a specific vq of a device. Combining the two functions,

Re: [PATCH 10/16] vhost: extract the logic of unmapping the vrings and desc

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Introduce vhost_virtqueue_unmap() to ummap the vrings and desc of a virtqueue. The function will be used later. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/vhost.c | 20 ++-- 1 file

Re: [PATCH 09/16] vhost-user: enable/disable a single vring

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: Implement the vhost_set_single_vring_enable, which is to enable or disable a single vring. The parameter wait_for_reply is added to help for some cases such as vq reset. Meanwhile, vhost_user_set_vring_enable() is refactored. Signed-off-by: Kangjie Xu

Re: [PATCH 08/16] vhost: add op to enable or disable a single vring

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: The interface to set enable status for a single vring is lacked in VhostOps, since the vhost_set_vring_enable_op will manipulate all virtqueues in a device. Resetting a single vq will rely on this interface. It requires a reply to indicate that the reset

Re: [PATCH 07/16] virtio-net: support queue reset

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: From: Xuan Zhuo virtio-net implements queue reset. Queued packets in the corresponding queue pair are flushed or purged. Queue reset is currently only implemented for non-vhosts. Signed-off-by: Xuan Zhuo --- hw/net/virtio-net.c | 15 +++ 1

Re: [PATCH 06/16] virtio-pci: support queue reset

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: From: Xuan Zhuo PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. Signed-off-by: Xuan Zhuo --- hw/virtio/virtio-pci.c | 16

Re: [PATCH 05/16] virtio: introduce virtio_queue_reset()

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: From: Xuan Zhuo Introduce a new interface function virtio_queue_reset() to implement reset for vq. Add a new callback to VirtioDeviceClass for queue reset operation for each child device. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang ---

Re: [PATCH 04/16] virtio: introduce __virtio_queue_reset()

2022-07-25 Thread Jason Wang
在 2022/7/18 19:17, Kangjie Xu 写道: From: Xuan Zhuo Separate the logic of vq reset. This logic will be called directly later. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/virtio.c | 37 + 1 file changed, 21 insertions(+), 16

Re: [PATCH 01/16] virtio-pci: virtio_pci_common_cfg add queue_notify_data

2022-07-25 Thread Jason Wang
在 2022/7/18 19:16, Kangjie Xu 写道: From: Xuan Zhuo Add queue_notify_data in struct virtio_pci_common_cfg, which comes from here https://github.com/oasis-tcs/virtio-spec/issues/89 Since I want to add queue_reset after queue_notify_data, I submitted this patch first. Signed-off-by: Xuan Zhuo

Re: [PATCH v2 7/7] vdpa: Always start CVQ in SVQ mode

2022-07-25 Thread Jason Wang
在 2022/7/22 21:43, Eugenio Pérez 写道: Isolate control virtqueue in its own group, allowing to intercept control commands but letting dataplane run totally passthrough to the guest. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 3 +- net/vhost-vdpa.c | 158

Re: [PATCH v4 4/7] vdpa: add NetClientState->start() callback

2022-07-25 Thread Jason Wang
在 2022/7/22 19:12, Eugenio Pérez 写道: It allows per-net client operations right after device's successful start. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 7 +++ 2

Re: [PATCH v4 2/7] vdpa: Extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

2022-07-25 Thread Jason Wang
在 2022/7/22 19:12, Eugenio Pérez 写道: So we can reuse to inject state messages. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 74 ++-- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index

Re: [PATCH 1/3] target/arm: Create kvm_arm_svm_supported

2022-07-25 Thread Zenghui Yu via
Hi Richard, On 2022/7/26 2:14, Richard Henderson wrote: Indication for support for SVE will not depend on whether we perform the query on the main kvm_state or the temp vcpu. Mirror kvm_arm_pauth_supported. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 7 ++- 1 file changed,

Re: [PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Bin Meng
On Mon, Jul 25, 2022 at 9:48 PM Alex Bennée wrote: > > > Bin Meng writes: > > > From: Bin Meng > > > > The following error message was seen during the configure: > > > > "ln: failed to create symbolic link > > 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" > > > > By

Re: How to read RISC-V mcycle CSR from Linux userspace app?

2022-07-25 Thread Bin Meng
On Tue, Jul 26, 2022 at 12:58 AM Maxim Blinov wrote: > > Hi all, stupid question but I can't for the life of me figure this out > even with all the docs open. > > I need to get an estimate figure for the cyclecount of a busy loop in > one of my small Linux userspace apps. The app in question is

[PATCH v1 1/1] migration: add remaining params->has_* = true in migration_instance_init()

2022-07-25 Thread Leonardo Bras
Some of params->has_* = true are missing in migration_instance_init, this causes migrate_params_check() to skip some tests, allowing some unsupported scenarios. Fix this by adding all missing params->has_* = true in migration_instance_init(). Signed-off-by: Leonardo Bras ---

PING: [PATCH] monitor: Support specified vCPU registers

2022-07-25 Thread zhenwei pi
PING! On 7/19/22 15:55, zhenwei pi wrote: Originally we have to get all the vCPU registers and parse the specified one. To improve the performance of this usage, allow user specified vCPU id to query registers. Run a VM with 16 vCPU, use bcc tool to track the latency of 'hmp_info_registers':

[PATCH v3 2/2] tests/tcg/s390x: Test unaligned accesses to lowcore

2022-07-25 Thread Ilya Leoshkevich
Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Acked-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 9 + tests/tcg/s390x/unaligned-lowcore.S | 19 +++ 2 files changed, 28 insertions(+) create mode

[PATCH v3 0/2] accel/tcg: Test unaligned stores to s390x low-address-protected lowcore

2022-07-25 Thread Ilya Leoshkevich
Hi, This is a follow-up series for [1]. The fix has been committed. I asked Christian what might be a good alternative for the mmio-debug-exit device for testing, and he suggested to look into shutdown/panic actions. Patch 1 adds a new panic action. Patch 2 tests unaligned stores to s390x

[PATCH v3 1/2] qapi: Add exit-failure PanicAction

2022-07-25 Thread Ilya Leoshkevich
Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=exit-failure option to activate this behavior.

Re: [PATCH] hw/intc: sifive_plic: Fix multi-socket plic configuraiton

2022-07-25 Thread Atish Kumar Patra
On Sun, Jul 24, 2022 at 6:14 PM Alistair Francis wrote: > On Sat, Jul 23, 2022 at 7:22 PM Atish Patra wrote: > > > > Since commit 40244040a7ac, multi-socket configuration with plic is > > broken as the hartid for second socket is calculated incorrectly. > > The hartid stored in addr_config

Re: Attaching qcow2 images to containers

2022-07-25 Thread Kirill Tkhai
Hi, Stefan, sorry for the late reply. I missed your message since I don't use that email address anymore. Sent a patch to fix the stale address in .mailmap. On 18.05.2022 09:30, Stefan Hajnoczi wrote: > Hi Kirill, > I saw your "[PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 > files

[RFC PATCH 1/1] block: add vhost-blk backend

2022-07-25 Thread Andrey Zhadchenko via
Although QEMU virtio is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel istead of passing them to QEMU. The patch adds vhost-blk backend which sets up vhost-blk kernel module to process requests. test setup and

[RFC patch 0/1] block: vhost-blk backend

2022-07-25 Thread Andrey Zhadchenko via
Although QEMU virtio-blk is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel so we avoid a lot of syscalls and context switches. The biggest disadvantage of this vhost-blk flavor is raw format. Luckily Kirill Thai

Re: [PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-25 Thread Klaus Jensen
On Jul 5 22:24, Jinhao Fan wrote: > Add property "ioeventfd" which is enabled by default. When this is > enabled, updates on the doorbell registers will cause KVM to signal > an event to the QEMU main loop to handle the doorbell updates. > Therefore, instead of letting the vcpu thread run both

[python-qemu-qmp MR #12] Post-release trivial fix roundup

2022-07-25 Thread GitLab Bot
Author: John Snow - https://gitlab.com/jsnow Merge Request: https://gitlab.com/qemu-project/python-qemu-qmp/-/merge_requests/12 ... from: jsnow/python-qemu-qmp:fixes-roundup ... into: qemu-project/python-qemu-qmp:main This MR collects a number of small, trivial fixes that follow the first

[PATCH v2 1/1] target/ppc: fix unreachable code in do_ldst_quad()

2022-07-25 Thread Daniel Henrique Barboza
Coverity reports that commit fc34e81acd51 ("target/ppc: add macros to check privilege level") turned the following code unreachable: if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) { /* lq and stq were privileged prior to V. 2.07 */ REQUIRE_SV(ctx); >>> CID 1490757: Control

[PATCH v2 0/1] target/ppc: fix unreachable code in do_ldst_quad()

2022-07-25 Thread Daniel Henrique Barboza
changes from v1: - do not use ifdefs - returned to the code that was in placed before the macro - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg03697.html Daniel Henrique Barboza (1): target/ppc: fix unreachable code in do_ldst_quad()

Re: [PATCH v1 01/13] tests: refresh to latest libvirt-ci module

2022-07-25 Thread Richard Henderson
On 7/25/22 07:05, Alex Bennée wrote: From: Daniel P. Berrangé Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir It would have been nice to keep the submodule update plus the bin/ sub-dir change in one patch, and the

Re: [PATCH] linux-user: Use memfd for open syscall emulation

2022-07-25 Thread Richard Henderson
On 7/25/22 09:28, Rainer Müller wrote: For certain paths in /proc, the open syscall is intercepted and the returned file descriptor points to a temporary file with emulated contents. If TMPDIR is not accessible or writable for the current user (for example in a read-only mounted chroot or

Re: [PATCH 2/3] target/arm: Set KVM_ARM_VCPU_SVE while probing the host

2022-07-25 Thread Richard Henderson
On 7/25/22 11:14, Richard Henderson wrote: Because we weren't setting this flag, our probe of ID_AA64ZFR0 was always returning zero. This also obviates the adjustment of ID_AA64PFR0, which had sanitized the SVE field. Oh, I meant to say here that this the effects of the bug are not visible,

[PATCH 2/3] target/arm: Set KVM_ARM_VCPU_SVE while probing the host

2022-07-25 Thread Richard Henderson
Because we weren't setting this flag, our probe of ID_AA64ZFR0 was always returning zero. This also obviates the adjustment of ID_AA64PFR0, which had sanitized the SVE field. Reported-by: Zenghui Yu Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 27 +-- 1

[PATCH 3/3] target/arm: Move sve probe inside kvm >= 4.15 branch

2022-07-25 Thread Richard Henderson
The test for the IF block indicates no ID registers are exposed, much less host support for SVE. Move the SVE probe into the ELSE block. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH 1/3] target/arm: Create kvm_arm_svm_supported

2022-07-25 Thread Richard Henderson
Indication for support for SVE will not depend on whether we perform the query on the main kvm_state or the temp vcpu. Mirror kvm_arm_pauth_supported. Signed-off-by: Richard Henderson --- target/arm/kvm64.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH 0/3] target/arm: Fix kvm probe of ID_AA64ZFR0

2022-07-25 Thread Richard Henderson
Our probing of this SVE register was done within an incorrect vCPU environment, so that the id register was always RAZ. r~ Richard Henderson (3): target/arm: Create kvm_arm_svm_supported target/arm: Set KVM_ARM_VCPU_SVE while probing the host target/arm: Move sve probe inside kvm >= 4.15

Re: [PATCH] contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement

2022-07-25 Thread Markus Armbruster
Could this go via qemu-trivial now? Markus Armbruster writes: > We allocate VuVirtqElement with g_malloc() in > virtqueue_alloc_element(), but free it with free() in > vhost-user-blk.c. Harmless, but use g_free() anyway. > > One of the calls is guarded by a "not null" condition. Useless, >

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-07-25 Thread Ani Sinha
On Sat, 16 Jul 2022, Michael S. Tsirkin wrote: > On Sat, Jul 16, 2022 at 12:06:00PM +0530, Ani Sinha wrote: > > > > > > On Fri, Jul 15, 2022 at 11:20 Michael S. Tsirkin wrote: > > > > On Fri, Jul 15, 2022 at 09:47:27AM +0530, Ani Sinha wrote: > > > > Instead of all this mess, can't we

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2022-07-25 Thread Ani Sinha
On Thu, 21 Jul 2022, Dr. David Alan Gilbert wrote: > * Ani Sinha (a...@anisinha.ca) wrote: > > > > > > On Wed, 20 Jul 2022, Peter Maydell wrote: > > > > > On Wed, 20 Jul 2022 at 19:37, Ani Sinha wrote: > > > > > > > > > > > > > > > > On Tue, 19 Jul 2022, Peter Maydell wrote: > > > > > > > > >

Re: [PATCH v2 1/2] qapi: Add exit-failure PanicAction

2022-07-25 Thread Eric Blake
On Sat, Jul 23, 2022 at 01:36:13AM +0200, Ilya Leoshkevich wrote: > Currently QEMU exits with code 0 on both panic an shutdown. For tests > it is useful to return 1 on panic, so that it counts as a test > failure. > > Introduce a new exit-failure PanicAction that makes main() return >

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Liviu Ionescu
> On 25 Jul 2022, at 20:33, Peter Maydell wrote: > > ... I'll try a setup with code in flash and > data in RAM, that sounds like it might be a way to cause the > problem if there's not much code and a lot of data (because > then the remaining space in the flash is larger than the > remaining

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Peter Maydell
On Mon, 25 Jul 2022 at 18:02, Liviu Ionescu wrote: > > On 25 Jul 2022, at 19:02, Peter Maydell wrote: > > The one where SYS_HEAPINFO produces the bogus result putting the > > heap at 0x0400, that you mentioned in the original report with > > the command line > > > > .../qemu-system-arm

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Liviu Ionescu
> On 25 Jul 2022, at 19:02, Peter Maydell wrote: > > > We document what the guest can assume about the virt board > memory layout here: > > https://www.qemu.org/docs/master/system/arm/virt.html#hardware-configuration-information-for-bare-metal-programming > > Flash at 0, RAM at

How to read RISC-V mcycle CSR from Linux userspace app?

2022-07-25 Thread Maxim Blinov
Hi all, stupid question but I can't for the life of me figure this out even with all the docs open. I need to get an estimate figure for the cyclecount of a busy loop in one of my small Linux userspace apps. The app in question is running in qemu-system-riscv64. I've compiled QEMU myself, and the

Re: [PATCH] ui/console: fix qemu_console_resize() regression

2022-07-25 Thread Mark Cave-Ayland
On 25/07/2022 12:58, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Is it worth being more specific here? Whilst MacOS with its NDRV driver exhibits the issue, it's really only

[PATCH] linux-user: Use memfd for open syscall emulation

2022-07-25 Thread Rainer Müller
For certain paths in /proc, the open syscall is intercepted and the returned file descriptor points to a temporary file with emulated contents. If TMPDIR is not accessible or writable for the current user (for example in a read-only mounted chroot or container) tools such as ps from procps may

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Peter Maydell
On Mon, 25 Jul 2022 at 16:56, Liviu Ionescu wrote: > > > > > On 25 Jul 2022, at 18:43, Peter Maydell wrote: > > > > ... the memory map for the 'virt' board doesn't change for the a72 > > versus the a15. In both cases, the memory from 0x0 to 0x0800 > > is the flash memory. So QEMU is

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Liviu Ionescu
> On 25 Jul 2022, at 18:43, Peter Maydell wrote: > > ... the memory map for the 'virt' board doesn't change for the a72 > versus the a15. In both cases, the memory from 0x0 to 0x0800 > is the flash memory. So QEMU is incorrect to have reported that as > the place to put the heap in

Re: TARGET_SYS_HEAPINFO and Cortex-A15 memory map

2022-07-25 Thread Peter Maydell
On Fri, 3 Jun 2022 at 07:17, Liviu Ionescu wrote: > > On 2 Jun 2022, at 21:36, Liviu Ionescu wrote: > > > > ... SYS_HEAPINFO... > > > > 0x0400 - heap base > > 0x0800 - heap limit > > 0x0800 - stack base > > 0x0 - stack limit > > For Cortex-A72 I see similar values: > > 0x4400 >

Re: driver type raw-xz supports discard=unmap?

2022-07-25 Thread Chris Murphy
On Mon, Jul 25, 2022, at 9:53 AM, Daniel P. Berrangé wrote: > On Mon, Jul 25, 2022 at 08:51:42AM -0400, Chris Murphy wrote: >> Huh, interesting. I have no idea then. I just happened to notice it in the >> (libvirt) XML config that's used by oz. >>

Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking

2022-07-25 Thread Peter Maydell
On Wed, 20 Jul 2022 at 17:32, Daniel P. Berrangé wrote: > I would certainly like to see us eventually remove > checkpatch.pl because of the various downsides it has. > > The caveat is that I've not actually looked in any detail > at what things checkpatch.pl actually checks for. Without > looking

Re: [PATCH] target/riscv: Support SW update of PTE A/D bits and Ssptwad extension

2022-07-25 Thread Jim Shu
Hi Alistair, Why do we want to support that? We can do either and we are > implementing the much more usual scheme. I don't see a reason to > bother implementing the other one. Is anyone ever going to use it? > Thanks for your response. I got it. Regards, Jim Shu

Re: [PATCH v1 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore

2022-07-25 Thread Thomas Huth
On 25/07/2022 16.05, Alex Bennée wrote: From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20220722233614.7254-3-...@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/tcg/s390x/Makefile.softmmu-target |

Re: [PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Thomas Huth
On 25/07/2022 15.47, Alex Bennée wrote: Bin Meng writes: From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not

Re: [PULL v2 0/8] More fixes + random seed patches for QEMU 7.1

2022-07-25 Thread Peter Maydell
On Fri, 22 Jul 2022 at 18:08, Paolo Bonzini wrote: > > The following changes since commit 5288bee45fbd33203b61f8c76e41b15bb5913e6e: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2022-07-21 11:13:01 +0100) > > are available in the Git repository at: > >

[PATCH v2] hw/display/bcm2835_fb: Fix framebuffer allocation address

2022-07-25 Thread Alan Jian
This patch fixes the dedicated framebuffer mailbox interface(marked as deprecated in official docs, but can still be fixed for emulation purposes) by removing unneeded offset to make it works like buffer allocate tag in bcm2835_property interface[1], some baremetal applications like the

Re: [PULL 06/18] vfio-user: build library

2022-07-25 Thread Jag Raman
> On Jul 25, 2022, at 10:50 AM, Daniel P. Berrangé wrote: > > On Mon, Jul 25, 2022 at 02:45:09PM +, Jag Raman wrote: >> Hi Daniel, >> >> We’ve created the following issue to update QEMU’s libvfio-user mirror >> to the latest: >> https://gitlab.com/qemu-project/libvfio-user/-/issues/1 >>

Re: [PULL 06/18] vfio-user: build library

2022-07-25 Thread Daniel P . Berrangé
On Mon, Jul 25, 2022 at 02:45:09PM +, Jag Raman wrote: > Hi Daniel, > > We’ve created the following issue to update QEMU’s libvfio-user mirror > to the latest: > https://gitlab.com/qemu-project/libvfio-user/-/issues/1 > > Will update QEMU’s submodule once this mirror is updated. That sounds

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-07-25 Thread Gupta, Pankaj
Normally, a write to unallocated space of a file or the hole of a sparse file automatically causes space allocation, for memfd, this equals to memory allocation. This new seal prevents such automatically allocating, either this is from a direct write() or a write on the previously mmap-ed

Re: [PATCH v7 01/92] target/arm: Add ID_AA64ZFR0 fields and isar_feature_aa64_sve2

2022-07-25 Thread Richard Henderson
On 7/25/22 00:05, Zenghui Yu wrote: diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index dff85f6db9..37ceadd9a9 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -647,17 +647,26 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) sve_supported =

Re: [PULL 06/18] vfio-user: build library

2022-07-25 Thread Jag Raman
Hi Daniel, We’ve created the following issue to update QEMU’s libvfio-user mirror to the latest: https://gitlab.com/qemu-project/libvfio-user/-/issues/1 Will update QEMU’s submodule once this mirror is updated. Thank you! -- Jag On Jul 21, 2022, at 6:25 AM, Daniel P. Berrangé

Re: [PATCH] target/sh4: Honor QEMU_LOG_FILENAME with QEMU_LOG=cpu

2022-07-25 Thread Peter Maydell
On Mon, 25 Jul 2022 at 15:32, Ilya Leoshkevich wrote: > > When using QEMU_LOG=cpu on sh4, QEMU_LOG_FILENAME is partially ignored. > Fix by using qemu_fprintf() instead of qemu_printf() in the respective > places. > > Fixes: 90c84c560067 ("qom/cpu: Simplify how CPUClass:cpu_dump_state() prints") >

[PATCH RESEND] tests/tcg/linux-test: Fix random hangs in test_socket

2022-07-25 Thread Ilya Leoshkevich
test_socket hangs randomly in connect(), especially when run without qemu. Apparently the reason is that linux started treating backlog value of 0 literally instead of rounding it up since v4.4 (commit ef547f2ac16b). So set it to 1 instead. Signed-off-by: Ilya Leoshkevich --- This is a rebase

[PATCH] target/sh4: Honor QEMU_LOG_FILENAME with QEMU_LOG=cpu

2022-07-25 Thread Ilya Leoshkevich
When using QEMU_LOG=cpu on sh4, QEMU_LOG_FILENAME is partially ignored. Fix by using qemu_fprintf() instead of qemu_printf() in the respective places. Fixes: 90c84c560067 ("qom/cpu: Simplify how CPUClass:cpu_dump_state() prints") Signed-off-by: Ilya Leoshkevich --- target/sh4/translate.c | 14

Re: [PATCH for-7.2 00/10] add hmp 'save-fdt' and 'info fdt' commands

2022-07-25 Thread Daniel P . Berrangé
On Mon, Jul 25, 2022 at 10:16:11AM -0300, Daniel Henrique Barboza wrote: > > > On 7/25/22 06:11, Daniel P. Berrangé wrote: > > On Fri, Jul 22, 2022 at 04:59:57PM -0300, Daniel Henrique Barboza wrote: > > > Hi, > > > > > > After dealing with a FDT element that isn't being shown in the userspace

[PATCH v1 09/13] semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM

2022-07-25 Thread Alex Bennée
From: Peter Maydell The TARGET_SYS_TMPNAM implementation has two bugs spotted by Coverity: * confusion about whether 'len' has the length of the string including or excluding the terminating NUL means we lock_user() len bytes of memory but memcpy() len + 1 bytes * In the error-exit cases

[PATCH v1 12/13] docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE

2022-07-25 Thread Alex Bennée
Since 30b5707c26 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) we don't need the additional two parameters. Fix the documentation. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v1 13/13] qemu-options: bring the kernel and image options together

2022-07-25 Thread Alex Bennée
How to control the booting of QEMU is often a source of confusion for users. Bring the options that control this together in the manual pages and add some verbiage to describe when each option is appropriate. This attempts to codify some of the knowledge expressed in:

[PATCH v1 10/13] qapi: Add exit-failure PanicAction

2022-07-25 Thread Alex Bennée
From: Ilya Leoshkevich Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=exit-failure option to

[PATCH v1 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore

2022-07-25 Thread Alex Bennée
From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20220722233614.7254-3-...@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/tcg/s390x/Makefile.softmmu-target | 9 +

[PATCH v1 05/13] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Alex Bennée
From: Bin Meng The following error message was seen during the configure: "ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if does not

[PATCH v1 07/13] semihosting: Don't copy buffer after console_write()

2022-07-25 Thread Alex Bennée
From: Peter Maydell The console_write() semihosting function outputs guest data from a buffer; it doesn't update that buffer. It therefore doesn't need to pass a length value to unlock_user(), but can pass 0, meaning "do not copy any data back to the guest memory". Signed-off-by: Peter Maydell

[PATCH v1 02/13] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail

2022-07-25 Thread Alex Bennée
From: Daniel P. Berrangé When tests fail meson just displays a summary and tells you to look at the testlog.txt file for details. The native jobs on shared runners publish testlog.txt as an artifact. For the Cirrus jobs and custom runner jobs this is not currently possible. The best we can do is

[PATCH v1 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure

2022-07-25 Thread Alex Bennée
From: Peter Maydell The documentation comment for qemu_semihosting_console_write() says * Returns: number of bytes written -- this should only ever be short * on some sort of i/o error. and the callsites rely on this. However, the implementation code path which sends console output to a

[PATCH v1 04/13] .cirrus.yml: Change winsymlinks to 'native'

2022-07-25 Thread Alex Bennée
From: Bin Meng At present winsymlinks is set to 'nativestrict', and its behavior is: a) if native symlinks are enabled and exists, creates as a native Windows symlink; b) else if native symlinks are not enabled or if does not exist, 'ln -s' fails. This causes the following

[PATCH v1 03/13] gitlab: drop 'containers-layer2' stage

2022-07-25 Thread Alex Bennée
From: Daniel P. Berrangé Since we express dependancies via a 'needs' clause, we don't need to split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when possible. Acked-by: Thomas Huth Signed-off-by: Daniel P. Berrangé

[PATCH v1 01/13] tests: refresh to latest libvirt-ci module

2022-07-25 Thread Alex Bennée
From: Daniel P. Berrangé Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the libslirp-version.h is broken

[PATCH v1 08/13] semihosting: Check for errors on SET_ARG()

2022-07-25 Thread Alex Bennée
From: Peter Maydell The SET_ARG() macro returns an error indication; we check this in the TARGET_SYS_GET_CMDLINE case but not when we use it in implementing TARGET_SYS_ELAPSED. Check for and handle the errors via the do_fault codepath, and update the comment documenting the SET_ARG() and

[PATCH v1 00/13] fixes for 7.1 (testing, docs, semihosting)

2022-07-25 Thread Alex Bennée
As per usual I've opened up a tree for fixes for the 7.1 release. It started as testing/next but I've included some fixes for semihosting and a few minor doc updates as well. I'll roll a PR from this at the end of the week (unless it doesn't meet the bar for missing rc0 tomorrow). Alex Bennée

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-07-25 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > This is a follow-up on "util: NUMA aware memory preallocation" [1] by > Michal. I've skimmed through patches and haven't spotted anything obviously wrong. I'll test these more once I write libvirt support for them (which I plan to do soon). Michal

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-07-25 Thread Chao Peng
On Thu, Jul 21, 2022 at 12:27:03PM +0200, Gupta, Pankaj wrote: > > > > Normally, a write to unallocated space of a file or the hole of a sparse > > > file automatically causes space allocation, for memfd, this equals to > > > memory allocation. This new seal prevents such automatically

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-25 Thread Vladimir Sementsov-Ogievskiy
On 7/20/22 14:04, Daniel P. Berrangé wrote: On Wed, Jul 20, 2022 at 02:00:16PM +0300, Roman Kagan wrote: On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: It's possible to create non-working configurations by

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-07-25 Thread Chao Peng
On Thu, Jul 21, 2022 at 03:05:09PM +, Sean Christopherson wrote: > On Thu, Jul 21, 2022, David Hildenbrand wrote: > > On 21.07.22 11:44, David Hildenbrand wrote: > > > On 06.07.22 10:20, Chao Peng wrote: > > >> Normally, a write to unallocated space of a file or the hole of a sparse > > >>

Re: driver type raw-xz supports discard=unmap?

2022-07-25 Thread Daniel P . Berrangé
On Mon, Jul 25, 2022 at 08:51:42AM -0400, Chris Murphy wrote: > > > On Mon, Jul 25, 2022, at 5:13 AM, Daniel P. Berrangé wrote: > > On Fri, Jul 22, 2022 at 04:03:52PM -0400, Chris Murphy wrote: > >> Is this valid? > >> > >> ` > >> > >> > >> ` > >> `/> > >> ` > >> > >> I know type="raw" works

Re: [PATCH] .gitlab-ci.d/windows.yml: Enable native Windows symlink

2022-07-25 Thread Alex Bennée
Bin Meng writes: > From: Bin Meng > > The following error message was seen during the configure: > > "ln: failed to create symbolic link > 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory" > > By default the MSYS environment variable is not defined, so the runtime >

Re: [PATCH v7 01/14] mm: Add F_SEAL_AUTO_ALLOCATE seal to memfd

2022-07-25 Thread Chao Peng
On Thu, Jul 21, 2022 at 11:44:11AM +0200, David Hildenbrand wrote: > On 06.07.22 10:20, Chao Peng wrote: > > Normally, a write to unallocated space of a file or the hole of a sparse > > file automatically causes space allocation, for memfd, this equals to > > memory allocation. This new seal

[PATCH] linux-user: Implement stracing madvise()

2022-07-25 Thread Ilya Leoshkevich
The default implementation has several problems: the first argument is not displayed as a pointer, making it harder to grep; the third argument is not symbolized; and there are several extra unused arguments. Signed-off-by: Ilya Leoshkevich --- linux-user/strace.c| 29

  1   2   >