Re: [PATCH v10 4/5] riscv: Introduce satp mode hw capabilities

2023-02-03 Thread Frank Chang
Reviewed-by: Frank Chang On Fri, Feb 3, 2023 at 2:02 PM Alexandre Ghiti wrote: > Currently, the max satp mode is set with the only constraint that it must > be > implemented in QEMU, i.e. set in valid_vm_1_10_[32|64]. > > But we actually need to add another level of constraint: what the hw is >

Re: [PATCH v10 3/5] riscv: Allow user to set the satp mode

2023-02-03 Thread Frank Chang
On Fri, Feb 3, 2023 at 2:01 PM Alexandre Ghiti wrote: > RISC-V specifies multiple sizes for addressable memory and Linux probes for > the machine's support at startup via the satp CSR register (done in > csr.c:validate_vm). > > As per the specification, sv64 must support sv57, which in turn must

Re: [PATCH] hostmem-file: add offset option

2023-02-03 Thread David Hildenbrand
On 02.02.23 23:56, Alexander Graf wrote: Add an option for hostmem-file to start the memory object at an offset into the target file. This is useful if multiple memory objects reside inside the same target file, such as a device node. In particular, it's useful to map guest memory directly into

[PULL 11/35] trace: Move HMP commands from monitor/ to trace/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Tracing". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-9-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi --- include/monitor/hmp.h | 3 + monit

[PULL 18/35] net: Move HMP commands from monitor to net/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Network device backends". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-16-arm...@redhat.com> --- monitor/hmp-cmds.c | 61 --- monitor/misc.c | 56

Re: [RFC PATCH] gitlab: call ninja directly and reduce build noise

2023-02-03 Thread Philippe Mathieu-Daudé
On 3/2/23 08:58, Thomas Huth wrote: On 02/02/2023 19.59, Alex Bennée wrote: Alex Bennée writes: A significant portion of our CI logs are just enumerating each successfully built object file. The current widespread versions of ninja don't have a quiet option so we use NINJA_STATUS to add a fi

[PULL 15/35] block: Factor out hmp_change_medium(), and move to block/monitor/

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-13-arm...@redhat.com> Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefan Berger --- include/monitor/hmp.h | 3 +++ block/monitor/block-hmp-cmds.c | 21 + monitor/hmp-cmds.c | 17 +---

[PULL 14/35] qom: Move HMP commands from monitor/ to qom/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "QOM". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-12-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- monitor/hmp-cmds.c | 19 - monitor/misc.c | 49 ---

[PULL 19/35] net: Move hmp_info_network() to net-hmp-cmds.c

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-17-arm...@redhat.com> --- include/monitor/hmp.h | 1 + include/net/net.h | 4 +++- monitor/hmp-cmds.c| 1 - monitor/misc.c| 1 - net/net-hmp-cmds.c| 28 net/net.c

[PULL 34/35] monitor: Loosen coupling between misc.c and monitor.c slightly

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-32-arm...@redhat.com> --- monitor/misc.c | 8 +--- monitor/monitor.c| 2 +- storage-daemon/qemu-storage-daemon.c | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --g

[PULL 04/35] monitor: Drop unnecessary includes

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-2-arm...@redhat.com> Reviewed-by: Stefan Berger --- monitor/hmp-cmds.c | 4 monitor/hmp.c | 3 --- monitor/misc.c | 14 ++ monitor/monitor.c | 1 - monitor/qmp-cmds-

[PULL 25/35] stats: Move QMP commands from monitor/ to stats/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "QMP" to new section "Stats". Status is Orphan. Volunteers welcome! Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-23-arm...@redhat.com> --- MAINTAINERS | 5 + meson.build

[PULL 00/35] Monitor patches for 2023-02-03

2023-02-03 Thread Markus Armbruster
The following changes since commit deabea6e88f7c4c3c12a36ee30051c6209561165: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-02-02 10:10:07 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-monitor-2

[PULL 01/35] MAINTAINERS: Cover userfaultfd

2023-02-03 Thread Markus Armbruster
Commit 0e9b5cd6b2 "migration: introduce UFFD-WP low-level interface helpers" added util/userfaultfd.c without covering it in MAINTAINERS. Add it to section "Migration". Signed-off-by: Markus Armbruster Message-Id: <20230119091545.3116376-2-arm...@redhat.com> Reviewed-by: Dr. David Alan Gilbert R

[PULL 06/35] char: Move HMP commands from monitor/ to chardev/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Character device backends". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-4-arm...@redhat.com> --- chardev/char-hmp-cmds.c | 220 monitor/hmp-cm

[PULL 16/35] rocker: Move HMP commands from monitor to hw/net/rocker/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Rocker" and "Network devices". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-14-arm...@redhat.com> --- hw/net/rocker/rocker-hmp-cmds.c | 316 monitor/hmp-cmds.c

[PULL 30/35] monitor: Move monitor_putc() next to monitor_puts & external linkage

2023-02-03 Thread Markus Armbruster
monitor_putc() will soon be used from more than one .c file. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-28-arm...@redhat.com> --- include/monitor/monitor.h | 1 + monitor/misc.c| 27 --- monitor/monitor.c | 27 +++

[PULL 35/35] monitor: Rename misc.c to hmp-target.c

2023-02-03 Thread Markus Armbruster
What's left in misc.c is exactly the target-dependent part of the HMP core. Rename accordingly. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-33-arm...@redhat.com> --- monitor/{misc.c => hmp-target.c} | 2 +- monitor/meson.build | 2 +- 2 files changed, 2 ins

[PULL 13/35] machine: Move HMP commands from monitor/ to hw/core/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Machine core". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-11-arm...@redhat.com> --- hw/core/machine-hmp-cmds.c | 208 monitor/hmp-cmds.c | 209 -

[PULL 23/35] tpm: Move HMP commands from monitor/ to softmmu/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "TPM". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-21-arm...@redhat.com> Reviewed-by: Stefan Berger --- MAINTAINERS| 2 +- monitor/hmp-cmds.c | 54 --

[PULL 32/35] monitor: Move remaining HMP commands from misc.c to hmp-cmds.c

2023-02-03 Thread Markus Armbruster
This requires giving them external linkage. Rename do_help_cmd() to hmp_help(), and do_print() to hmp_print(). Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-30-arm...@redhat.com> --- include/monitor/hmp.h | 13 +++ monitor/hmp-cmds.c| 219

[PULL 21/35] migration: Move the QMP command from monitor/ to migration/

2023-02-03 Thread Markus Armbruster
This moves the command from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Migration". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-19-arm...@redhat.com> Reviewed-by: Juan Quintela --- migration/migration.c | 30 ++ monitor/misc.c

[PULL 31/35] monitor: Move target-dependent HMP commands to hmp-cmds-target.c

2023-02-03 Thread Markus Armbruster
Target-independent hmp_gpa2hva(), hmp_gpa2hpa() move along to stay next to hmp_gva2gpa(). Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-29-arm...@redhat.com> --- include/monitor/hmp-target.h | 6 + monitor/hmp-cmds-target.c| 380 +++ m

[PULL 02/35] MAINTAINERS: Cover include/sysemu/accel-blocker.h

2023-02-03 Thread Markus Armbruster
Commit bd688fc931 "accel: introduce accelerator blocker API" aded include/sysemu/accel-blocker.h and accel/accel-blocker.c. MAINTAINERS covers the latter in section "Guest CPU Cores (other accelerators) / Overall", but not the former. Fix that. Signed-off-by: Markus Armbruster Message-Id: <2023

[PULL 17/35] hmp: Rewrite strlist_from_comma_list() as hmp_split_at_comma()

2023-02-03 Thread Markus Armbruster
Use g_strsplit() for the actual splitting. Give external linkage, so the next commit can move one of its users to another source file. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-15-arm...@redhat.com> --- include/monitor/hmp.h | 1 + monitor/hmp-cmds.c| 27

[PULL 03/35] MAINTAINERS: Cover tpm.c again

2023-02-03 Thread Markus Armbruster
Commit 800d4deda0 "softmmu: move more files to softmmu/" (v5.2.0) updated MAINTAINERS for all moved files but one. Fix that. Fixes: 800d4deda04be016a95fbbf397c830a2d14ff9f6 Signed-off-by: Markus Armbruster Message-Id: <20230120170104.359690-1-arm...@redhat.com> --- MAINTAINERS | 2 +- 1 file ch

[PULL 33/35] monitor: Move remaining QMP stuff from misc.c to qmp-cmds.c

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-31-arm...@redhat.com> --- monitor/misc.c | 51 monitor/qmp-cmds.c | 53 +- 2 files changed, 52 insertions(+), 52 deletions(-) diff --g

[PULL 05/35] audio: Move HMP commands from monitor/ to audio/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Overall Audio backends". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-3-arm...@redhat.com> --- include/monitor/hmp.h | 3 ++ audio/audio-hmp-cmds.c | 83 +

[PULL 12/35] machine: Move QMP commands from monitor/ to hw/core/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "QMP" to "Machine core". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-10-arm...@redhat.com> --- hw/core/machine-qmp-cmds.c | 144 + monitor/qmp-cmds.c | 140

[PULL 27/35] acpi: Move the QMP command from monitor/ to hw/acpi/

2023-02-03 Thread Markus Armbruster
This moves the command from MAINTAINERS section "QMP" to section "ACPI/SMBIOS)". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-25-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- hw/acpi/acpi-qmp-cmds.c | 30 ++ monitor/qmp-cmds.c

[PULL 10/35] hmp: Rename help_cmd() to hmp_help_cmd(), move declaration to hmp.h

2023-02-03 Thread Markus Armbruster
The next commit will move a caller of help_cmd() to a new file. Including monitor/monitor-internal.h there just for help_cmd() feels silly. Better to provide it in monitor/hmp.h suitably renamed. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-8-arm...@redhat.com> --- inclu

[PULL 08/35] hmp: Drop redundant argument check from add_completion_option()

2023-02-03 Thread Markus Armbruster
No need to check for null arguments, no caller passes them. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-6-arm...@redhat.com> --- monitor/misc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c index c18a713d9c..d58a81c452 100644 --- a

[PULL 07/35] char: Factor out qmp_add_client() parts and move to chardev/

2023-02-03 Thread Markus Armbruster
Code moves from MAINTAINERS section "QMP" to "Character device backends". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-5-arm...@redhat.com> --- include/monitor/qmp-helpers.h | 3 +++ chardev/char.c| 20 monitor/qmp-cmds.c|

[PULL 29/35] monitor: Split file descriptor passing stuff off misc.c

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-27-arm...@redhat.com> --- monitor/fds.c | 468 monitor/misc.c | 434 monitor/meson.build | 1 + 3 files changed, 469 insertions(+

[PULL 09/35] readline: Extract readline_add_completion_of() from monitor

2023-02-03 Thread Markus Armbruster
monitor/misc.h has static add_completion_option(). It's useful elsewhere in the monitor. Since it's not monitor-specific, move it to util/readline.c renamed to readline_add_completion_of(), and put it to use. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-7-arm...@redhat.c

[PULL 20/35] migration: Move HMP commands from monitor/ to migration/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Migration". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-18-arm...@redhat.com> Reviewed-by: Juan Quintela --- migration/migration-hmp-cmds.c | 807 + m

[PULL 26/35] stats: Move HMP commands from monitor/ to stats/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to section "Stats". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-24-arm...@redhat.com> --- monitor/hmp-cmds.c | 234 -- stats/stats-hmp-cmds.c | 247 ++

[PULL 22/35] virtio: Move HMP commands from monitor/ to hw/virtio/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "virtio". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-20-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/virtio-hmp-cmds.c | 321 monito

[PULL 24/35] runstate: Move HMP commands from monitor/ to softmmu/

2023-02-03 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" and "QMP" to "Main loop". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-22-arm...@redhat.com> --- MAINTAINERS | 3 +- include/monitor/hmp.h | 2 + monitor/hmp-cmds.c |

[PULL 28/35] qdev: Move HMP command completion from monitor to softmmu/

2023-02-03 Thread Markus Armbruster
This moves the completion code from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to section "QOM". Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-26-arm...@redhat.com> --- monitor/misc.c | 82 -- softmmu/qdev-monitor.c

Re: [PATCH 2/3] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2023-02-03 Thread Laurent Vivier
On 11/29/22 09:10, Jason Wang wrote: Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 8 1 file changed,

[PATCH v10 02/12] parallels: Fix high_off calculation in parallels_co_check()

2023-02-03 Thread Alexander Ivanov
Don't let high_off be more than the file size even if we don't fix the image. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 4af68adc61..436b36b

[PATCH v10 00/12] parallels: Refactor the code of images checks and fix a bug

2023-02-03 Thread Alexander Ivanov
Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. Fix incorrect condition in out-of-image check. v10: 8: Add a co

[PATCH v10 01/12] parallels: Out of image offset in BAT leads to image inflation

2023-02-03 Thread Alexander Ivanov
data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definitely not correct. Raise an error in parallels

[PATCH v10 07/12] parallels: Move check of cluster outside image to a separate function

2023-02-03 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 81 ++- 1 f

[PATCH v10 12/12] parallels: Incorrect condition in out-of-image check

2023-02-03 Thread Alexander Ivanov
All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c ind

[PATCH v10 09/12] parallels: Move check of leaks to a separate function

2023-02-03 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 80 --- 1 file changed, 48 insertions(+)

[PATCH v10 08/12] parallels: Fix statistics calculation

2023-02-03 Thread Alexander Ivanov
Exclude out-of-image clusters from allocated and fragmented clusters calculation. Signed-off-by: Alexander Ivanov --- block/parallels.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index f9acee1fa8..994528d93c 100644 --- a/block/p

[PATCH v10 05/12] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2023-02-03 Thread Alexander Ivanov
BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() further on. After that there is no need to ma

[PATCH v10 11/12] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2023-02-03 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block/parallels.

[PATCH v10 03/12] parallels: Fix image_end_offset and data_end after out-of-image check

2023-02-03 Thread Alexander Ivanov
Set data_end to the end of the last cluster inside the image. In such a way we can be sure that corrupted offsets in the BAT can't affect on the image size. If there are no allocated clusters set image_end_offset by data_end. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block

[PATCH v10 04/12] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2023-02-03 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v10 10/12] parallels: Move statistic collection to a separate function

2023-02-03 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 52 +

[PATCH v10 06/12] parallels: Move check of unclean image to a separate function

2023-02-03 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 31 +

Re: [PATCH v15 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-02-03 Thread Pierre Morel
On 2/2/23 17:42, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books an

[PATCH v3 1/5] parallels: Incorrect data end calculation in parallels_open()

2023-02-03 Thread Alexander Ivanov
The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in sectors, from the start of the

[PATCH v3 0/5] parallels: Add duplication check, repair at open, fix bugs

2023-02-03 Thread Alexander Ivanov
This patchset should be applied on the top of [PATCH v10 00/12] parallels: Refactor the code of images checks and fix a bug. Fix incorrect data end calculation in parallels_open(). Split image leak handling to separate check and fix helpers. Add checking and repairing duplicate offsets in BAT R

[PATCH v3 5/5] parallels: Image repairing in parallels_open()

2023-02-03 Thread Alexander Ivanov
Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov --- block/parallels.c | 64 ++- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/block/parallels.c b/block/parall

[PATCH v3 4/5] parallels: Replace fprintf by qemu_log in check

2023-02-03 Thread Alexander Ivanov
If the check is called during normal work, tracking of the check must be present in VM logs to have some clues if something going wrong with user's data. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 18 +- 1 file changed, 9 insertions(+), 9

[PATCH v3 2/5] parallels: Split image leak handling to separate check and fix helpers

2023-02-03 Thread Alexander Ivanov
We need to fix leak after deduplication in the next patch. Move leak fixing to a separate helper parallels_fix_leak() and add parallels_get_leak_size() helper wich used in parallels_fix_leak() and parallels_check_leak(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 86

[PATCH v3 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-02-03 Thread Alexander Ivanov
Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to deduplicate the code. Move

Re: [PULL v2 00/36] Testing, docs, semihosting and plugin updates

2023-02-03 Thread Peter Maydell
On Thu, 2 Feb 2023 at 16:01, Alex Bennée wrote: > > The following changes since commit 026817fb69414c9d3909d8b1a209f90180d777d6: > > Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into > staging (2023-02-01 16:15:56 +) > > are available in the Git repository at: > > http

Re: [PATCH v15 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-02-03 Thread Pierre Morel
@Thomas, these changes look good to me. What do you think, do I make the change and keep your RB ? On 2/2/23 17:05, Nina Schoetterl-Glausch wrote: Nit patch title: s390x/cpu topology: add s390 specifics to CPU topology ? OK On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: S390 adds

Re: [PATCH] block/mirror: add 'write-blocking-after-ready' copy mode

2023-02-03 Thread Fiona Ebner
Am 02.02.23 um 12:09 schrieb Denis V. Lunev: > On 2/2/23 11:19, Fiona Ebner wrote: >> Am 31.01.23 um 19:18 schrieb Denis V. Lunev: >>> Frankly speaking I do not like this. I'd better would not >>> rely on the enable/disable of the whole bitmap but encode >>> mode into MirrorOp and mark blocks dirty

[RFC PATCH] target/arm: disable FEAT_SME if we turn off SVE

2023-02-03 Thread Alex Bennée
Before this change booting a -cpu max,sve=off would trigger and assert: qemu-system-aarch64: ../../target/arm/helper.c:6647: sve_vqm1_for_el_sm: Assertion `sm' failed. when the guest attempts to write to SMCR which shouldn't even exist if SVE has been turned off. Signed-off-by: Alex Bennée C

[PATCH 0/4] hw/qdev-properties: Constify Property* in DeviceClass

2023-02-03 Thread Philippe Mathieu-Daudé
Qualify some Property pointers as 'const' when the structure is accessed read-only. Philippe Mathieu-Daudé (4): hw/qdev-properties: Constify Property* in object_field_prop_ptr() hw/qdev-properties: Constify Property* in PropertyInfo::print() handler hw/qdev-properties: Constify Property*

[PATCH 1/4] hw/qdev-properties: Constify Property* in object_field_prop_ptr()

2023-02-03 Thread Philippe Mathieu-Daudé
The pointed Property structure is accessed read-only. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c| 2 +- include/hw/qdev-properties.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 357

[PATCH 2/4] hw/qdev-properties: Constify Property* in PropertyInfo::print() handler

2023-02-03 Thread Philippe Mathieu-Daudé
The pointed Property structure is accessed read-only. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties-system.c | 2 +- include/hw/qdev-properties.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-propert

[PATCH 4/4] hw/qdev-properties: Constify DeviceClass::props_ field

2023-02-03 Thread Philippe Mathieu-Daudé
The pointed Property structure is accessed read-only. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c | 10 +- include/hw/qdev-core.h| 2 +- softmmu/qdev-monitor.c| 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/core/qdev-propertie

[PATCH 3/4] hw/qdev-properties: Constify Property* in PropertyInfo::create() handler

2023-02-03 Thread Philippe Mathieu-Daudé
The pointed Property structure is accessed read-only. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c| 2 +- include/hw/qdev-properties.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 858

Re: Display update issue on M1 Macs

2023-02-03 Thread Akihiko Odaki
On 2023/02/02 19:51, BALATON Zoltan wrote: On Tue, 31 Jan 2023, BALATON Zoltan wrote: On Tue, 31 Jan 2023, Akihiko Odaki wrote: [...] To summarise previous discussion: - There's a problem on Apple M1 Macs with sm501 and ati-vga 2d accel functions drawing from device model into the video memor

Re: [PATCH v7 9/9] docs/system/devices/igb: Add igb documentation

2023-02-03 Thread Cédric Le Goater
On 2/1/23 05:26, Akihiko Odaki wrote: Signed-off-by: Akihiko Odaki Reviewed-by: Cédric Le Goater Thanks, C. --- MAINTAINERS | 1 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 71 3 files changed,

Re: [PATCH v6 0/8] igb: merge changes from <20221229190817.25500-1-sriram.yagnara...@est.tech>

2023-02-03 Thread Akihiko Odaki
On 2023/02/02 16:52, Sriram Yagnaraman wrote: Based-on: <20230201042615.34706-1-akihiko.od...@daynix.com> ([PATCH v7 0/9] Introduce igb) Rebased on latest changes from Akihiko, and merged changes from my original patchset: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04670.html Chan

Re: [PATCH v3 0/2] hw/arm/virt: Handle HVF in finalize_gic_version()

2023-02-03 Thread Peter Maydell
On Fri, 3 Feb 2023 at 07:07, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 2/2/23 18:57, Peter Maydell wrote: > > On Fri, 23 Dec 2022 at 09:01, Alexander Graf wrote: > >> > >> The finalize_gic_version() function tries to determine which GIC version > >> the current accelerator / host combina

Re: [PATCH] accel/tcg: Complete cpu initialization before registration

2023-02-03 Thread Eric Auger
Hi Peter, On 2/2/23 11:53, Peter Maydell wrote: > On Wed, 1 Feb 2023 at 20:37, Richard Henderson > wrote: >> >> On 2/1/23 04:20, Eric Auger wrote: >>> What I fail to understand is why this code is called with a kvm >>> accelerated qemu (the test runs by default with kvm). >> ... >>> #2 0x02aa

Re: [PATCH v7 1/9] hw/net/net_tx_pkt: Introduce net_tx_pkt_get_eth_hdr

2023-02-03 Thread Cédric Le Goater
On 2/1/23 05:26, Akihiko Odaki wrote: Expose the ethernet header so that igb can utilize it to perform the internal routing among its SR-IOV functions. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki I don't see where it is used ? Am I missing somethin

Re: [PATCH v10 1/3] hw/riscv: handle 32 bit CPUs kernel_addr in riscv_load_kernel()

2023-02-03 Thread Daniel Henrique Barboza
On 2/3/23 02:39, Bin Meng wrote: On Thu, Feb 2, 2023 at 9:58 PM Daniel Henrique Barboza wrote: load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit QEMU guest happens to be running in a hypervisor that are using 64 bits to encode its address, kernel_entry can be padded with '1'

Re: [PATCH] accel/tcg: Complete cpu initialization before registration

2023-02-03 Thread Peter Maydell
On Fri, 3 Feb 2023 at 10:29, Eric Auger wrote: > > Hi Peter, > On 2/2/23 11:53, Peter Maydell wrote: > > On Wed, 1 Feb 2023 at 20:37, Richard Henderson > > wrote: > >> > >> On 2/1/23 04:20, Eric Auger wrote: > >>> What I fail to understand is why this code is called with a kvm > >>> accelerated q

Re: [PATCH v10 1/3] hw/riscv: handle 32 bit CPUs kernel_addr in riscv_load_kernel()

2023-02-03 Thread Bin Meng
Hi Daniel, On Fri, Feb 3, 2023 at 6:31 PM Daniel Henrique Barboza wrote: > > > > On 2/3/23 02:39, Bin Meng wrote: > > On Thu, Feb 2, 2023 at 9:58 PM Daniel Henrique Barboza > > wrote: > >> > >> load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit QEMU > >> guest happens to be runnin

Re: [PATCH v2] hvf: arm: Add support for GICv3

2023-02-03 Thread Peter Maydell
On Thu, 2 Feb 2023 at 17:56, Peter Maydell wrote: > > On Sat, 28 Jan 2023 at 22:45, Alexander Graf wrote: > > > > We currently only support GICv2 emulation. To also support GICv3, we will > > need to pass a few system registers into their respective handler functions. > > > > This patch adds supp

Re: [PATCH] hbitmap: fix hbitmap_status() return value for first dirty bit case

2023-02-03 Thread Andrey Zhadchenko
On 2/2/23 22:39, Eric Blake wrote: On Thu, Feb 02, 2023 at 09:15:23PM +0300, Andrey Zhadchenko via wrote: The last return statement should return true, as we already evaluated that start == next_dirty Also, fix hbitmap_status() description in header Cc: qemu-sta...@nongnu.org Fixes: a6426475

Re: [PATCH v15 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-02-03 Thread Thomas Huth
On 03/02/2023 10.39, Pierre Morel wrote: @Thomas, these changes look good to me. What do you think, do I make the change and keep your RB ? Yes, splitting that enum sounds cleaner, indeed. Thomas On 2/2/23 17:05, Nina Schoetterl-Glausch wrote: Nit patch title: s390x/cpu topology: add s39

Re: [PATCH] hbitmap: fix hbitmap_status() return value for first dirty bit case

2023-02-03 Thread Andrey Zhadchenko
On 2/3/23 13:55, Andrey Zhadchenko wrote: On 2/2/23 22:39, Eric Blake wrote: On Thu, Feb 02, 2023 at 09:15:23PM +0300, Andrey Zhadchenko via wrote: The last return statement should return true, as we already evaluated that start == next_dirty Also, fix hbitmap_status() description in head

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Thomas Huth
On 30/01/2023 11.58, Daniel P. Berrangé wrote: On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: We can get rid of the build-coroutine-sigaltstack job by moving the configure flags that should be tested here to other jobs: Move --with-coroutine=sigaltstack to the build-without-default

Re: ASan reports use-after-free when running munmap-pthread

2023-02-03 Thread Alex Bennée
Anton Johansson writes: > Hi, > > I was running check-tcg with ASan enabled on master, and ran into > the following use-after-free. There appears to be a race between > jump cache invalidation and thread destruction (?) > > I thought I'd post here since I noticed some previous discussion on the

[PATCH 0/9] hw: Use QOM alias properties and few QOM/QDev cleanups

2023-02-03 Thread Philippe Mathieu-Daudé
These patches are extracted from a QOM/QDev refactor series, so they are preliminary cleanups noticed while working on it: - Use correct type when calling qdev_prop_set_xxx() - Unify some qdev properties in MIPS models - Replace intermediate properties by link properties - Remove DEFINE_PROP_DMAAD

[RFC PATCH 9/9] hw/mips/itu: Pass SAAR using QOM link property

2023-02-03 Thread Philippe Mathieu-Daudé
QOM objects shouldn't access each other internals fields except using the QOM API. mips_cps_realize() instantiates a TYPE_MIPS_ITU object, and directly sets the 'saar' pointer: if (saar_present) { s->itu.saar = &env->CP0_SAAR; } In order to avoid that, pass the MIPS_CPU object via a

[PATCH 7/9] hw/qdev: Remove DEFINE_PROP_DMAADDR() and 'hw/qdev-dma.h'

2023-02-03 Thread Philippe Mathieu-Daudé
DEFINE_PROP_DMAADDR() is only used once. Since it doesn't add much value, simply remove it, along with the header defining it. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci-pci.c | 1 - hw/usb/hcd-ohci.c | 3 +-- include/hw/qdev-dma.h | 16 3 files changed, 1 i

[PATCH 3/9] hw/arm/nrf51: QOM-alias 'flash-size' property in SoC object

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use an intermediate 'flash-size' property in the SoC object. Alias the property, so when the machine (here microbit) sets the value on the SoC, it is propagated to the flash object. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/microbit.c | 5 - hw/arm/nrf51_soc.c

[PATCH 6/9] hw/display/sm501: QOM-alias 'dma-offset' property in chipset object

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use an intermediate 'dma-offset' property in the chipset object. Alias the property, so when the machine (here r2d-plus) sets the value on the chipset, it is propagated to the OHCI object. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/sm501.c | 22 +++--- hw/sh4

[PATCH 2/9] hw/ppc/sam460ex: Correctly set MAL properties

2023-02-03 Thread Philippe Mathieu-Daudé
MAL properties are declared as uint8_t: static Property ppc4xx_mal_properties[] = { DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0), DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0), DEFINE_PROP_END_OF_LIST(), }; Set the property using qdev_prop_set_uint8().

[PATCH 1/9] hw/i386/sgx: Do not open-code qdev_realize_and_unref()

2023-02-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/sgx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index db004d17a6..5ddc5d7ea2 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -299,7 +299,7 @@ void pc_machine_init_sgx_epc(PCMachineStat

[PATCH 5/9] hw/usb/hcd-ohci: Include missing 'sysbus.h' header

2023-02-03 Thread Philippe Mathieu-Daudé
Avoid when including "hw/usb/hcd-ohci.h": hw/usb/hcd-ohci.h:100:5: error: unknown type name 'SysBusDevice' SysBusDevice parent_obj; ^ Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci

Re: [PATCH qemu v2 0/3] ARM: Add support for V8M special registers in GDB stub

2023-02-03 Thread Peter Maydell
On Tue, 17 Jan 2023 at 19:44, ~dreiss-meta wrote: > > Patch 1/3 was already accepted, but it seems is not in master yet. > > Comments addressed in patches 2 and 3. > Let me know if you'd like me to split out a separate commit > for renaming arm_v7m_get_sp_ptr. Hi; these patches look good to me. I

[PATCH 8/9] hw/mips: Declare all length properties as unsigned

2023-02-03 Thread Philippe Mathieu-Daudé
Some length properties are signed, other unsigned: hw/mips/cps.c:183:DEFINE_PROP_UINT32("num-vp", MIPSCPSState, num_vp, 1), hw/mips/cps.c:184:DEFINE_PROP_UINT32("num-irq", MIPSCPSState, num_irq, 256), hw/misc/mips_cmgcr.c:215:DEFINE_PROP_INT32("num-vp", MIPSGCRState, num_vps, 1

[PATCH 4/9] hw/arm/fsl-imx: QOM-alias 'phy-num' property in SoC object

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use intermediate 'fec-phy-num' properties in the SoC object. Alias the properties, so when the machines set the value on the SoC, it is propagated to the network device object. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/fsl-imx25.c | 3 +-- hw/arm/fsl-imx6.c

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Kevin Wolf
Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: > On 30/01/2023 11.58, Daniel P. Berrangé wrote: > > On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: > > > We can get rid of the build-coroutine-sigaltstack job by moving > > > the configure flags that should be tested here to other j

Re: [PATCH v4 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-02-03 Thread Christian Schoenebeck
On Monday, January 30, 2023 10:51:50 AM CET Bin Meng wrote: > From: Guohuai Shi > > This commit implements Windows specific xxxdir() APIs for safety > directory access. > This issue deserves a link to either the previous discussion Link: https://lore.kernel.org/qemu-devel/2830993.GtbaR8S6b6@si

Re: [PATCH 1/9] hw/i386/sgx: Do not open-code qdev_realize_and_unref()

2023-02-03 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/sgx.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c > index db004d17a6..5ddc5d7ea2 100644 > --- a/hw/i386/sgx.c > +++ b/hw/i386/sgx.c > @@ -299,7

Re: [PATCH 5/9] hw/usb/hcd-ohci: Include missing 'sysbus.h' header

2023-02-03 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Avoid when including "hw/usb/hcd-ohci.h": > > hw/usb/hcd-ohci.h:100:5: error: unknown type name 'SysBusDevice' > SysBusDevice parent_obj; > ^ > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/hcd-ohci.h | 1 + > 1 file changed, 1 insertion(+

  1   2   3   4   >