[PATCH 1/3] migration: Make threshold_size an uint64_t

2024-01-17 Thread peterx
From: Peter Xu It's always used to compare against another uint64_t. Make it always clear that it's never a negative. Signed-off-by: Peter Xu --- migration/migration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.h b/migration/migration.h index 17972

[PATCH 2/3] migration: Drop unnecessary check in ram's pending_exact()

2024-01-17 Thread peterx
From: Peter Xu When the migration frameworks fetches the exact pending sizes, it means this check: remaining_size < s->threshold_size Must have been done already, actually at migration_iteration_run(): if (must_precopy <= s->threshold_size) { qemu_savevm_state_pending_exact(&must

[RFC 5/7] virtio-iommu: Remove the implementation of iommu_set_iova_ranges

2024-01-17 Thread Eric Auger
Now that we use PCIIOMMUOps to convey information about usable IOVA ranges we do not to implement the iommu_set_iova_ranges IOMMU MR callback. Signed-off-by: Eric Auger --- hw/virtio/virtio-iommu.c | 67 1 file changed, 67 deletions(-) diff --git a/hw/vi

[RFC 2/7] hw/pci: Introduce pci_device_iommu_bus

2024-01-17 Thread Eric Auger
This helper will allow subsequent patches to retrieve the IOMMU bus and call its associated PCIIOMMUOps callbacks. Signed-off-by: Eric Auger --- include/hw/pci/pci.h | 1 + hw/pci/pci.c | 16 2 files changed, 17 insertions(+) diff --git a/include/hw/pci/pci.h b/include

[RFC 3/7] vfio/pci: Pass the usable IOVA ranges through PCIIOMMUOps

2024-01-17 Thread Eric Auger
Pass the collected usable IOVA regions using the PCIIOMMUOps set_host_iova_ranges() callback, if implemented. Signed-off-by: Eric Auger --- hw/vfio/pci.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d7fe06715c..63937952bb 10

[RFC 6/7] hw/vfio: Remove memory_region_iommu_set_iova_ranges() call

2024-01-17 Thread Eric Auger
As we have just removed the only implementation of iommu_set_iova_ranges IOMMU MR callback in the virtio-iommu, let's remove the call to the memory wrapper. Usable IOVA ranges are now conveyed through the PCIIOMMUOps in VFIO-PCI. Signed-off-by: Eric Auger --- hw/vfio/common.c | 10 -- 1

[RFC 7/7] memory: Remove IOMMU MR iommu_set_iova_range API

2024-01-17 Thread Eric Auger
Since the host IOVA ranges are now passed through the PCIIOMMUOps set_host_resv_regions and we have removed the only implementation of iommu_set_iova_range() in the virtio-iommu and the only call site in vfio/common, let's retire the IOMMU MR API and its memory wrapper. Signed-off-by: Eric Auger

[RFC 1/7] hw/pci: Introduce PCIIOMMUOps::set_host_iova_regions

2024-01-17 Thread Eric Auger
This new callback will be used to convey usable IOVA regions from VFIO-PCI devices to vIOMMUS (esp. virtio-iommu). The advantage is that this callback can be called very early, once the device has is known to be protected by a vIOMMU, after the get_address_space() has been called by the parent devi

[RFC 0/7] VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling for hotplugged devices

2024-01-17 Thread Eric Auger
In [1] we attempted to fix a case where a VFIO-PCI device protected with a virtio-iommu was assigned to an x86 guest. On x86 the physical IOMMU may have an address width (gaw) of 39 or 48 bits whereas the virtio-iommu used to expose a 64b address space by default. Hence the guest was trying to use

[RFC 4/7] virtio-iommu: Implement PCIIOMMUOps set_host_resv_regions

2024-01-17 Thread Eric Auger
Reuse the implementation of virtio_iommu_set_iova_ranges() which will be removed in subsequent patches. Signed-off-by: Eric Auger --- hw/virtio/virtio-iommu.c | 134 +-- 1 file changed, 101 insertions(+), 33 deletions(-) diff --git a/hw/virtio/virtio-iommu.c

Re: [PATCH 1/3] migration: Make threshold_size an uint64_t

2024-01-17 Thread Philippe Mathieu-Daudé
On 17/1/24 08:58, pet...@redhat.com wrote: From: Peter Xu It's always used to compare against another uint64_t. Make it always clear that it's never a negative. Signed-off-by: Peter Xu --- migration/migration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe

Re: [PATCH] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-01-17 Thread Philippe Mathieu-Daudé
On 17/1/24 08:44, Andrea Bolognani wrote: On Wed, Jan 17, 2024 at 08:18:27AM +0100, Thomas Huth wrote: On 17/01/2024 00.09, Fabiano Rosas wrote: Avocado needs sqlite3: Failed to load plugin from module "avocado.plugins.journal": ImportError("Module 'sqlite3' is not installed. Use:

Re: [PATCH] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-01-17 Thread Philippe Mathieu-Daudé
On 17/1/24 08:09, Philippe Mathieu-Daudé wrote: Hi Fabiano, On 17/1/24 00:09, Fabiano Rosas wrote: Avocado needs sqlite3:    Failed to load plugin from module "avocado.plugins.journal":    ImportError("Module 'sqlite3' is not installed.    Use: sudo zypper install python311 to install it") In

Re: [PATCH] hw/elf_ops: Ignore loadable segments with zero size

2024-01-17 Thread Philippe Mathieu-Daudé
On 16/1/24 16:50, Bin Meng wrote: Some ELF files really do have segments of zero size, e.g.: Program Headers: Type Offset VirtAddr PhysAddr FileSizMemSiz Flags Align RISCV_ATTRIBUT 0x25b8 0x

Re: [PATCH] MAINTAINERS: Update Raphael Norwitz email

2024-01-17 Thread Philippe Mathieu-Daudé
On 11/1/24 20:28, Raphael Norwitz wrote: I will be leaving Nutanix so updating my email in MAINTAINERS to my personal email for now. Signed-off-by: Raphael Norwitz --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, patch queued.

Re: [PATCH 13/19] qapi/schema: fix typing for QAPISchemaVariants.tag_member

2024-01-17 Thread Markus Armbruster
John Snow writes: > On Wed, Jan 10, 2024 at 2:53 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > On Wed, Nov 22, 2023 at 11:02 AM John Snow wrote: >> >> >> >> On Wed, Nov 22, 2023 at 9:05 AM Markus Armbruster >> >> wrote: >> >> > >> >> > John Snow writes: >> >> > >> >> > > There

Re: [PATCH] system/watchpoint: Move TCG specific code to accel/tcg/

2024-01-17 Thread Philippe Mathieu-Daudé
On 11/1/24 22:49, Richard Henderson wrote: On 1/12/24 03:20, Philippe Mathieu-Daudé wrote: Keep system/watchpoint.c accelerator-agnostic by moving TCG specific code to accel/tcg/watchpoint.c. Update meson. Signed-off-by: Philippe Mathieu-Daudé ---   accel/tcg/watchpoint.c | 143

Re: [PATCH] cpus: Restrict 'start-powered-off' property to system emulation

2024-01-17 Thread Philippe Mathieu-Daudé
On 11/1/24 22:48, Richard Henderson wrote: On 1/12/24 03:18, Philippe Mathieu-Daudé wrote: Since the CPUState::start-powered-off property is irrelevant to user emulation, restrict it to system emulation. Signed-off-by: Philippe Mathieu-Daudé ---   cpu-target.c | 7 ++-   1 file changed, 6 i

Re: [PATCH 0/5] misc: Trivial code rename cleanup

2024-01-17 Thread Philippe Mathieu-Daudé
On 11/1/24 13:02, Philippe Mathieu-Daudé wrote: Rename some code names to ease navigating / grepping the code. Philippe Mathieu-Daudé (5): accel: Rename accel_init_ops_interfaces() to include 'system' hw/core/cpu: Rename cpu_class_init() to include 'common' hw/s390x: Rename cpu_class_

Re: [PATCH v3 0/6] sysemu/replay: Restrict icount to TCG system emulation

2024-01-17 Thread Philippe Mathieu-Daudé
On 8/12/23 12:35, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (6): sysemu/cpu-timers: Have icount_configure() return a boolean system/vl: Evaluate icount after accelerator options are parsed sysemu/cpu-timers: Introduce ICountMode enumerator target/arm: Ensure icount is enab

Re: [PATCH 0/2] target/alpha: Only build sys_helper.c on system emulation

2024-01-17 Thread Philippe Mathieu-Daudé
On 26/12/23 12:17, Philippe Mathieu-Daudé wrote: On 7/12/23 11:54, Philippe Mathieu-Daudé wrote: Extract helper_load_pcc() to clk_helper.c so we can restrict sys_helper.c to system emulation. Philippe Mathieu-Daudé (2):    target/alpha: Extract clk_helper.c from sys_helper.c    target/alpha: On

Re: [PATCH v2 14/19] qapi/schema: fix typing for QAPISchemaVariants.tag_member

2024-01-17 Thread Markus Armbruster
John Snow writes: > There are two related changes here: > > (1) We need to perform type narrowing for resolving the type of > tag_member during check(), and > > (2) tag_member is a delayed initialization field, but we can hide it > behind a property that raises an Exception if it's called

Re: [PATCH] hw/timer/hpet: Convert DPRINTF to trace events

2024-01-17 Thread Philippe Mathieu-Daudé
Hi Daniel, On 19/11/23 00:11, Daniel Hoffman wrote: This conversion is pretty straight-forward. Standardized some formatting so the +0 and +4 offset cases can recycle the same message. Signed-off-by: Daniel Hoffman --- hw/timer/hpet.c | 55 +--

Re: [PATCH v2 1/1] dump: Fix HMP dump-guest-memory -z without -R

2024-01-17 Thread Michael Tokarev
22.12.2023 12:38, Markus Armbruster : -z without -R has no effect: the dump format remains @elf. Fix the logic error so it becomes @kdump-zlib. Fixes: e6549197f7ed (dump: Add command interface for kdump-raw formats) Fixes: CID 1523841 Signed-off-by: Markus Armbruster Reviewed-by: Stephen Brenn

Re: [RFC PATCH v3 13/30] migration/multifd: Add outgoing QIOChannelFile support

2024-01-17 Thread Peter Xu
On Tue, Jan 16, 2024 at 10:37:48AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Nov 27, 2023 at 05:25:55PM -0300, Fabiano Rosas wrote: > >> Allow multifd to open file-backed channels. This will be used when > >> enabling the fixed-ram migration stream format which expects a > >> s

Re: [PATCH v4 0/4] accel/tcg: Move perf and debuginfo support to tcg

2024-01-17 Thread Philippe Mathieu-Daudé
Hi Ilya, On 12/12/23 01:34, Ilya Leoshkevich wrote: Based-on: 20231211212003.21686-1-phi...@linaro.org Ilya Leoshkevich (4): accel/tcg: Make use of qemu_target_page_mask() in perf.c tcg: Make tb_cflags() usable from target-agnostic code accel/tcg: Remove #ifdef TARGET_I386 from perf.

Re: [PATCH 1/1] SMBIOS type 8 should use T8_BASE.

2024-01-17 Thread Igor Mammedov
On Thu, 11 Jan 2024 19:25:22 + Felix Wu wrote: it is missing Signed-off tag a minimum, and also commit message should describe in more detail what's wrong and what's breaks and how it's being fixed with references to spec preferably. please see https://www.qemu.org/docs/master/devel/submi

Re: [PATCH 1/1] SMBIOS type 8 should use T8_BASE.

2024-01-17 Thread Igor Mammedov
On Wed, 17 Jan 2024 09:38:47 +0100 Igor Mammedov wrote: > On Thu, 11 Jan 2024 19:25:22 + > Felix Wu wrote: > > it is missing Signed-off tag a minimum, and also commit message should > describe in more detail > what's wrong and what's breaks and how it's being fixed with references to > sp

Re: [PATCH v2 0/3] hw/pflash: implement update buffer for block writes

2024-01-17 Thread Philippe Mathieu-Daudé
On 8/1/24 17:08, Gerd Hoffmann wrote: Gerd Hoffmann (3): hw/pflash: refactor pflash_data_write() hw/pflash: use ldn_{be,le}_p and stn_{be,le}_p hw/pflash: implement update buffer for block writes Series: Reviewed-by: Philippe Mathieu-Daudé and queued, thanks!

Re: [PULL 17/22] plugins: add an API to read registers

2024-01-17 Thread Akihiko Odaki
On 2024/01/16 19:48, Alex Bennée wrote: We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don't expose the reg number to the plugin instead hiding it behind a

[PATCH 4/4] intel_iommu: Reset vIOMMU at the last stage of system reset

2024-01-17 Thread peterx
From: Peter Xu We got report from Yanghang Liu on an unexpected host DMA error when system resets with VFIO attached to vIOMMU in the VM context. Alex Williamson quickly spot that there can be ordering issues on resets. A further test verified that the issue is indeed caused by such wrong order

[PATCH 1/4] reset: qemu_register_reset_one()

2024-01-17 Thread peterx
From: Peter Xu Cleanup the code to use a single entrance on register reset hooks. Signed-off-by: Peter Xu --- hw/core/reset.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/core/reset.c b/hw/core/reset.c index d3263b613e..8cf60b2b09 100644 --- a/hw/co

[PATCH 3/4] intel_iommu: Tear down address spaces before IOMMU reset

2024-01-17 Thread peterx
From: Peter Xu No bug report for this, but logically tearing down of existing address space should happen before reset of IOMMU state / registers, because the current address spaces may still rely on those information. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1

[PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-17 Thread peterx
From: Peter Xu QEMU resets do not have a way to order reset hooks. Add one coarse grained reset stage so that some devices can be reset later than some others. Signed-off-by: Peter Xu --- include/sysemu/reset.h | 5 hw/core/reset.c| 60 +++---

[PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices

2024-01-17 Thread peterx
From: Peter Xu There're issue reported that when syetem_reset the VM with an intel iommu device and MT2892 PF(mlx5_core driver), the host kernel throws DMAR error. https://issues.redhat.com/browse/RHEL-7188 Alex quickly spot a possible issue on ordering of device resets. It's verified by our

Re: [PATCH] accel: Do not set CPUState::can_do_io in non-TCG accels

2024-01-17 Thread Philippe Mathieu-Daudé
On 29/11/23 21:50, Philippe Mathieu-Daudé wrote: 'can_do_io' is specific to TCG. Having it set in non-TCG code is confusing, so remove it from QTest / HVF / KVM. Signed-off-by: Philippe Mathieu-Daudé --- accel/dummy-cpus.c| 1 - accel/hvf/hvf-accel-ops.c | 1 - accel/kvm/kvm-accel-o

Re: [PATCH v2] acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM

2024-01-17 Thread Daniel P . Berrangé
On Wed, Jan 17, 2024 at 09:55:56AM +0530, Ani Sinha wrote: > By default, the timeout to receive any specified event from the QEMU VM is 60 > seconds set by the python avocado test framework. Please see event_wait() and > events_wait() in python/qemu/machine/machine.py. If the matching event is not

Re: [RFC PATCH v3 15/30] io: Add a pwritev/preadv version that takes a discontiguous iovec

2024-01-17 Thread Peter Xu
On Tue, Jan 16, 2024 at 03:15:50PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Nov 27, 2023 at 05:25:57PM -0300, Fabiano Rosas wrote: > >> For the upcoming support to fixed-ram migration with multifd, we need > >> to be able to accept an iovec array with non-contiguous data. > >>

Re: [PULL 0/6] Firmware/edk2 20231213 patches

2024-01-17 Thread Michael Tokarev
15.01.2024 13:20, Gerd Hoffmann : Hi, PS: when are we likely to be able to update to a proper released EDK2 ? Running with a git snapshot isn't ideal, so if we can move to an EDK2 release version within this QEMU cycle that would be nice. Next release should be tagged by end of February, s

Re: [PATCH 1/4] reset: qemu_register_reset_one()

2024-01-17 Thread Eric Auger
On 1/17/24 10:15, pet...@redhat.com wrote: > From: Peter Xu > > Cleanup the code to use a single entrance on register reset hooks. > > Signed-off-by: Peter Xu Reviewed-by: Eric Auger Eric > --- > hw/core/reset.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > >

Re: [PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-17 Thread Eric Auger
Hi Peter, On 1/17/24 10:15, pet...@redhat.com wrote: > From: Peter Xu > > QEMU resets do not have a way to order reset hooks. Add one coarse grained > reset stage so that some devices can be reset later than some others. I would precise that the lowest stage has the highest priority and is handle

Re: [PATCH 0/4] intel_iommu: Reset vIOMMU after all the rest of devices

2024-01-17 Thread Eric Auger
Hi Peter, On 1/17/24 10:15, pet...@redhat.com wrote: > From: Peter Xu > > There're issue reported that when syetem_reset the VM with an intel iommu system_reset > device and MT2892 PF(mlx5_core driver), the host kernel throws DMAR error. > > https://issues.redhat.com/browse/RHEL-7188 > > Alex q

Re: [PATCH 3/4] intel_iommu: Tear down address spaces before IOMMU reset

2024-01-17 Thread Eric Auger
Hi Peter, On 1/17/24 10:15, pet...@redhat.com wrote: > From: Peter Xu > > No bug report for this, but logically tearing down of existing address > space should happen before reset of IOMMU state / registers, because the > current address spaces may still rely on those information. do you mean tha

Re: [PATCH 2/3] s390x/pci: refresh fh before disabling aif

2024-01-17 Thread Cédric Le Goater
Hello Matthew, On 1/16/24 23:31, Matthew Rosato wrote: Typically we refresh the host fh during CLP enable, however it's possible that the device goes through multiple reset events before the guest performs another CLP enable. Let's handle this for now by refreshing the host handle from vfio bef

Re: [PATCH 13/19] qapi/schema: fix typing for QAPISchemaVariants.tag_member

2024-01-17 Thread Markus Armbruster
Hmm, there's more union-specific code to move out of the base. Revised patch: diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 658c288f8f..4a2e62d919 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -328,7 +328,8 @@ def visit_object_type(self, name, info, ifco

Re: [PATCH 4/4] intel_iommu: Reset vIOMMU at the last stage of system reset

2024-01-17 Thread Eric Auger
Hi Peter, On 1/17/24 10:15, pet...@redhat.com wrote: > From: Peter Xu > > We got report from Yanghang Liu on an unexpected host DMA error when system > resets with VFIO attached to vIOMMU in the VM context. Alex Williamson > quickly spot that there can be ordering issues on resets. A further te

Re: [PATCH 2/3] s390x/pci: refresh fh before disabling aif

2024-01-17 Thread Cédric Le Goater
On 1/16/24 23:31, Matthew Rosato wrote: Typically we refresh the host fh during CLP enable, however it's possible that the device goes through multiple reset events before the guest performs another CLP enable. Let's handle this for now by refreshing the host handle from vfio before disabling ai

Re: [PATCH 13/19] qapi/schema: fix typing for QAPISchemaVariants.tag_member

2024-01-17 Thread Markus Armbruster
Still more... diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index 658c288f8f..4a2e62d919 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -328,7 +328,8 @@ def visit_object_type(self, name, info, ifcond, features, + self._nodes_for_sections(d

Re: [PATCH 1/3] s390x/pci: avoid double enable/disable of aif

2024-01-17 Thread Cédric Le Goater
On 1/16/24 23:31, Matthew Rosato wrote: Use a flag to keep track of whether AIF is currently enabled. This can be used to avoid enabling/disabling AIF multiple times as well as to determine whether or not it should be disabled during reset processing. Why don't we disable AIF always at reset ?

Re: [PATCH] ui/clipboard: avoid crash upon request when clipboard peer is not initialized

2024-01-17 Thread Fiona Ebner
Am 16.01.24 um 13:11 schrieb Fiona Ebner: > Am 15.01.24 um 13:00 schrieb Marc-André Lureau: > The trouble is when qemu_clipboard_update() is called without data & without a request callback set. We shouldn't allow that as we have no means to get the clipboard data then.

[PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Fiona Ebner
With VNC, it can be that a client sends a VNC_MSG_CLIENT_CUT_TEXT message before sending a VNC_MSG_CLIENT_SET_ENCODINGS message with VNC_ENCODING_CLIPBOARD_EXT for configuring the clipboard extension. This means that qemu_clipboard_request() can be reached (via vnc_client_cut_text_ext()) before vn

Re: [PATCH 3/3] s390x/pci: drive ISM reset from subsystem reset

2024-01-17 Thread Cédric Le Goater
Adding Alex, On 1/16/24 23:31, Matthew Rosato wrote: ISM devices are sensitive to manipulation of the IOMMU, so the ISM device needs to be reset before the vfio-pci device is reset (triggering a full UNMAP). In order to ensure this occurs, trigger ISM device resets from subsystem_reset before t

Re: Re: [PATCH 1/3] hw/arm: Add EHCI/OHCI controllers to Allwinner R40 and Bananapi board

2024-01-17 Thread Bernhard Beschow
Am 16. Januar 2024 10:13:37 UTC schrieb Gerd Hoffmann : >On Mon, Jan 15, 2024 at 08:12:29AM -0800, Guenter Roeck wrote: >> On 1/15/24 03:02, Philippe Mathieu-Daudé wrote: >> > On 13/1/24 20:16, Guenter Roeck wrote: >> > > If machine USB support is not enabled, create unimplemented devices >> > >

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner wrote: > > With VNC, it can be that a client sends a VNC_MSG_CLIENT_CUT_TEXT > message before sending a VNC_MSG_CLIENT_SET_ENCODINGS message with > VNC_ENCODING_CLIPBOARD_EXT for configuring the clipboard extension. > > This means that qemu_clipboard

Re: [PATCH 2/2] virtio-gpu: fix scanout migration post-load

2024-01-17 Thread Marc-André Lureau
Hi On Tue, Jan 16, 2024 at 3:17 PM Sebastian Ott wrote: > > On Mon, 15 Jan 2024, marcandre.lur...@redhat.com wrote: > > +scanout->ds = qemu_create_displaysurface_pixman(res->image); > > +if (!scanout->ds) { > > +return -EINVAL; > > +} > > "qemu_

[RFC PATCH] tests/vm/netbsd: Remove missing py311-expat package

2024-01-17 Thread Philippe Mathieu-Daudé
Per commits a9dbde71da ("mkvenv: add better error message for broken or missing ensurepip") and 1dee66c693 ("tests/vm: add py310-expat to NetBSD"), we need py-expat to use ensurepip. However the py311-expat package isn't available anymore: ### Installing packages ... processing remote summary

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Fiona Ebner
Am 17.01.24 um 12:11 schrieb Marc-André Lureau: > Hi > > On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner wrote: >> >> +for (type = 0; type < QEMU_CLIPBOARD_TYPE__COUNT && !missing_data; >> type++) { >> +if (!info->types[type].data) { >> +missing_data = true; >> +} >>

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 3:30 PM Fiona Ebner wrote: > > Am 17.01.24 um 12:11 schrieb Marc-André Lureau: > > Hi > > > > On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner wrote: > >> > >> +for (type = 0; type < QEMU_CLIPBOARD_TYPE__COUNT && !missing_data; > >> type++) { > >> +if (!info->t

Re: [PATCH v5] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-01-17 Thread Sebastian Ott
On Mon, 15 Jan 2024, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. Without the filter, all PMU events are exposed from

Re: chacha20-s390 broken in 8.2.0 in TCG on s390x

2024-01-17 Thread Michael Tokarev
04.01.2024 01:51, Richard Henderson : On 1/4/24 01:37, Philippe Mathieu-Daudé wrote: Finally changing the constraints on op_rotli_vec seems to fix it: --- diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index fbee43d3b0..b3456fe857 100644 --- a/tcg/s390x/tcg-target.c.inc ++

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Fiona Ebner
Am 17.01.24 um 12:33 schrieb Marc-André Lureau: > Hi > > On Wed, Jan 17, 2024 at 3:30 PM Fiona Ebner wrote: >> >> Am 17.01.24 um 12:11 schrieb Marc-André Lureau: >>> Hi >>> >>> On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner wrote: +for (type = 0; type < QEMU_CLIPBOARD_TYPE__COUNT && !

Re: [PATCH] ui: reject extended clipboard message if not activated

2024-01-17 Thread Michael Tokarev
15.01.2024 12:51, Daniel P. Berrangé wrote: The extended clipboard message protocol requires that the client activate the extension by requesting a psuedo encoding. If this is not done, then any extended clipboard messages from the client should be considered invalid and the client dropped. Sign

Re: [RFC PATCH] tests/vm/netbsd: Remove missing py311-expat package

2024-01-17 Thread Thomas Huth
On 17/01/2024 12.24, Philippe Mathieu-Daudé wrote: Per commits a9dbde71da ("mkvenv: add better error message for broken or missing ensurepip") and 1dee66c693 ("tests/vm: add py310-expat to NetBSD"), we need py-expat to use ensurepip. However the py311-expat package isn't available anymore: #

Re: [PATCH] ui: reject extended clipboard message if not activated

2024-01-17 Thread Daniel P . Berrangé
On Wed, Jan 17, 2024 at 03:10:30PM +0300, Michael Tokarev wrote: > 15.01.2024 12:51, Daniel P. Berrangé wrote: > > The extended clipboard message protocol requires that the client > > activate the extension by requesting a psuedo encoding. If this > > is not done, then any extended clipboard messag

Re: [PATCH v2] ui/clipboard: ensure data is available or request callback is set upon update

2024-01-17 Thread Marc-André Lureau
Hi On Wed, Jan 17, 2024 at 3:56 PM Fiona Ebner wrote: > > Am 17.01.24 um 12:33 schrieb Marc-André Lureau: > > Hi > > > > On Wed, Jan 17, 2024 at 3:30 PM Fiona Ebner wrote: > >> > >> Am 17.01.24 um 12:11 schrieb Marc-André Lureau: > >>> Hi > >>> > >>> On Wed, Jan 17, 2024 at 3:01 PM Fiona Ebner

Re: [PATCH] string-output-visitor: Fix (pseudo) struct handling

2024-01-17 Thread Markus Armbruster
Kevin Wolf writes: > Am 11.01.2024 um 12:45 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Commit ff32bb53 tried to get minimal struct support into the string >> > output visitor by just making it return "". Unfortunately, it >> > forgot that the caller will still make more vi

Re: [PATCH 2/5] qemu-options: Remove the deprecated -no-acpi option

2024-01-17 Thread Markus Armbruster
Thomas Huth writes: > It's been marked as deprecated since QEMU 8.0, so it should be fine > to remove this now. > > Signed-off-by: Thomas Huth Leftovers: docs/specs/tpm.rst:-nographic -no-acpi \ hw/i386/pc.c: * When -no-acpi is used with Q35 machine type, no ACPI is built, hw/i386/pc.

Re: [RFC PATCH v3 15/30] io: Add a pwritev/preadv version that takes a discontiguous iovec

2024-01-17 Thread Daniel P . Berrangé
On Mon, Nov 27, 2023 at 05:25:57PM -0300, Fabiano Rosas wrote: > For the upcoming support to fixed-ram migration with multifd, we need > to be able to accept an iovec array with non-contiguous data. > > Add a pwritev and preadv version that splits the array into contiguous > segments before writin

Re: [PATCH 3/5] qemu-options: Remove the deprecated -async-teardown option

2024-01-17 Thread Markus Armbruster
Thomas Huth writes: > It's been marked as deprecated since QEMU 8.1 (and was only available > since QEMU 8.0 anyway), so it should be fine to remove this now. > > Signed-off-by: Thomas Huth Reviewed-by: Markus Armbruster

Re: [PATCH 4/5] qemu-options: Remove the deprecated -chroot option

2024-01-17 Thread Markus Armbruster
Thomas Huth writes: > It's been marked as deprecated since QEMU 8.1, so it should be fine > to remove this now. > > Signed-off-by: Thomas Huth Reviewed-by: Markus Armbruster

Re: [PATCH] block/io: clear BDRV_BLOCK_RECURSE flag after recursing in bdrv_co_block_status

2024-01-17 Thread Vladimir Sementsov-Ogievskiy
On 16.01.24 18:48, Fiona Ebner wrote: Using fleecing backup like in [0] on a qcow2 image (with metadata preallocation) can lead to the following assertion failure: bdrv_co_do_block_status: Assertion `!(ret & BDRV_BLOCK_ZERO)' failed. In the reproducer [0], it happens because the BDRV_BLOCK_RE

Re: [PATCH 5/5] qemu-options: Remove the deprecated -singlestep option

2024-01-17 Thread Markus Armbruster
Thomas Huth writes: > It's been marked as deprecated since QEMU 8.1, so it should be fine > to remove this now. > > Signed-off-by: Thomas Huth Should we drop HMP command singlestep, too?

[PATCH 4/4] Add the GNU/Hurd as a target host

2024-01-17 Thread Manolo de Medici
Signed-off-by: Manolo de Medici --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index c36ce1f7e2..d4648af96a 100755 --- a/configure +++ b/configure @@ -354,6 +354,8 @@ elif check_define __NetBSD__; then host_os=netbsd elif check_define __APPLE__; then

[PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
tests/qtest/tpm-* compilation is not disabled by disable-tpm, for this reason compilation fails on systems that doesn't support the linux/bsd TPM api. Fix this by allowing tests to be disabled. Signed-off-by: Manolo de Medici --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Manolo de Medici
It's already defined as a stub on the GNU Hurd. Signed-off-by: Manolo de Medici diff --git a/block/file-posix.c b/block/file-posix.c index 35684f7e21..05426abb7d 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1999,7 +1999,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque

[PATCH 3/4] Allow tests to be disabled

2024-01-17 Thread Manolo de Medici
tests/qtest/tpm-* compilation is not disabled by disable-tpm, for this reason compilation fails on systems that doesn't support the linux/bsd TPM api. Fix this by allowing tests to be disabled. Signed-off-by: Manolo de Medici --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 0/4] Port qemu to GNU/Hurd

2024-01-17 Thread Manolo de Medici
Recently, a testsuite for gnumach, the GNU/Hurd microkernel, was developed that uses qemu. Currently qemu cannot be compiled for the GNU/Hurd, as such, this testsuite is available only for GNU/Linux users. As such, porting qemu to GNU/Hurd became an urgent requirement. This patcheset represents th

[PATCH 1/4] Include new arbitrary limits if not already defined

2024-01-17 Thread Manolo de Medici
qemu uses the PATH_MAX and IOV_MAX constants extensively in the code. Define these constants to sensible values ourselves if the system doesn't define them already. Signed-off-by: Manolo de Medici diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 9a405bed89..9fb6ac5c64 100644 --- a/

Re: [PATCH v5] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-01-17 Thread Eric Auger
Hi Shaoqin, On 1/15/24 09:01, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all PMU events

[PATCH v2] virtio-iommu: Use qemu_real_host_page_mask as default page_size_mask

2024-01-17 Thread Eric Auger
We used to set default page_size_mask to qemu_target_page_mask() but with VFIO assignment it makes more sense to use the actual host page mask instead. So from now on qemu_real_host_page_mask() will be used as a default. To be able to migrate older code, we increase the vmstat version_id to 3 and

Re: chacha20-s390 broken in 8.2.0 in TCG on s390x

2024-01-17 Thread Alex Bennée
Michael Tokarev writes: > 04.01.2024 01:51, Richard Henderson : >> On 1/4/24 01:37, Philippe Mathieu-Daudé wrote: >>> Finally changing the constraints on op_rotli_vec seems to fix it: >>> >>> --- >>> diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc >>> index fbee43d3b0..b3456f

Re: [PATCH] util/uri: Remove is_hex() function

2024-01-17 Thread Thomas Huth
On 12/01/2024 08.19, Stefan Weil via wrote: Am 12.01.24 um 07:35 schrieb Markus Armbruster: Thomas Huth writes: We can simply use the g_ascii_isxdigit() from the glib instead. ... or even use unescape_string() from the glib? https://docs.gtk.org/glib/type_func.Uri.unescape_string.html

[PATCH v1 0/2] memory-device: reintroduce memory region size check

2024-01-17 Thread David Hildenbrand
Reintroduce a modified region size check, after we would now allow some configurations that don't make any sense (e.g., partial hugetlb pages, 1G+1byte DIMMs). We have to take care of hv-balloon first, which was the case why we remove that check in the first place. Cc: "Maciej S. Szmigiero" Cc:

[PATCH v1 1/2] hv-balloon: use get_min_alignment() to express 32 GiB alignment

2024-01-17 Thread David Hildenbrand
Let's implement the get_min_alignment() callback for memory devices, and copy for the device memory region the alignment of the host memory region. This mimics what virtio-mem does, and allows for re-introducing proper alignment checks for the memory region size (where we don't care about additiona

[PATCH v1 2/2] memory-device: reintroduce memory region size check

2024-01-17 Thread David Hildenbrand
We used to check that the memory region size is multiples of the overall requested address alignment for the device memory address. We removed that check, because there are cases (i.e., hv-balloon) where devices unconditionally request an address alignment that has a very large alignment (i.e., 32

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Philippe Mathieu-Daudé
Hi Manolo, On 17/1/24 13:31, Manolo de Medici wrote: It's already defined as a stub on the GNU Hurd. Meson checks for this function and defines HAVE_COPY_FILE_RANGE if available, see in meson.build: config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_fi

Re: [PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-17 Thread Cédric Le Goater
On 1/17/24 11:28, Eric Auger wrote: Hi Peter, On 1/17/24 10:15, pet...@redhat.com wrote: From: Peter Xu QEMU resets do not have a way to order reset hooks. Add one coarse grained reset stage so that some devices can be reset later than some others. I would precise that the lowest stage has t

Re: chacha20-s390 broken in 8.2.0 in TCG on s390x

2024-01-17 Thread Philippe Mathieu-Daudé
On 17/1/24 12:53, Michael Tokarev wrote: 04.01.2024 01:51, Richard Henderson : On 1/4/24 01:37, Philippe Mathieu-Daudé wrote: Finally changing the constraints on op_rotli_vec seems to fix it: --- diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index fbee43d3b0..b3456fe857

Re: [RFC PATCH] tests/vm/netbsd: Remove missing py311-expat package

2024-01-17 Thread Philippe Mathieu-Daudé
On 17/1/24 13:10, Thomas Huth wrote: On 17/01/2024 12.24, Philippe Mathieu-Daudé wrote: Per commits a9dbde71da ("mkvenv: add better error message for broken or missing ensurepip") and 1dee66c693 ("tests/vm: add py310-expat to NetBSD"), we need py-expat to use ensurepip. However the py311-expat

Re: [PATCH 0/2] ppc: Rename power5+ and power7+ for the new QOM naming rules

2024-01-17 Thread Thomas Huth
On 12/01/2024 13.48, Peter Krempa wrote: On Thu, Jan 11, 2024 at 17:46:50 +0100, Thomas Huth wrote: We can get rid of the "power5+" / "power7+" hack in qom/object.c by using CPU aliases for those names instead (first patch). I think in the long run, we should get rid of the names with a "+" in

Re: [PATCH 2/5] qemu-options: Remove the deprecated -no-acpi option

2024-01-17 Thread Thomas Huth
On 17/01/2024 13.38, Markus Armbruster wrote: Thomas Huth writes: It's been marked as deprecated since QEMU 8.0, so it should be fine to remove this now. Signed-off-by: Thomas Huth Leftovers: docs/specs/tpm.rst:-nographic -no-acpi \ hw/i386/pc.c: * When -no-acpi is used with Q35 m

[PATCH v2 1/2] target/riscv: Convert sdtrig functionality from property to an extension

2024-01-17 Thread Himanshu Chauhan
The debug trigger (sdtrig) capability is controlled using the debug property. The sdtrig is an ISA extension and should be treated so. The sdtrig extension may or may not be implemented in a system. Therefore, it must raise an illegal instruction exception when it is disabled and its CSRs are acces

[PATCH v2 2/2] target/riscv: Export sdtrig in ISA string

2024-01-17 Thread Himanshu Chauhan
This patch adds "x-sdtrig" in the ISA string when sdtrig extension is enabled. The sdtrig extension may or may not be implemented in a system. Therefore, the -cpu rv64,x-sdtrig= option can be used to dynamically turn sdtrig extension on or off. Signed-off-by: Himanshu Chauhan --- tar

[PATCH v2 0/2] Export debug triggers as an extension

2024-01-17 Thread Himanshu Chauhan
All the CPUs may or may not implement the debug trigger (sdtrig) extension. The presence of it should be dynamically detectable. This patch exports the debug triggers as an extension which can be turned on or off by x-sdtrig= option. It is turned on by default. "x-sdtrig" is concatenated to ISA st

Re: [RFC PATCH v3 15/30] io: Add a pwritev/preadv version that takes a discontiguous iovec

2024-01-17 Thread Daniel P . Berrangé
On Wed, Jan 17, 2024 at 12:39:26PM +, Daniel P. Berrangé wrote: > On Mon, Nov 27, 2023 at 05:25:57PM -0300, Fabiano Rosas wrote: > > For the upcoming support to fixed-ram migration with multifd, we need > > to be able to accept an iovec array with non-contiguous data. > > > > Add a pwritev and

Re: Re: [PULL 0/6] Firmware/edk2 20231213 patches

2024-01-17 Thread Gerd Hoffmann
On Wed, Jan 17, 2024 at 01:16:34PM +0300, Michael Tokarev wrote: > 15.01.2024 13:20, Gerd Hoffmann : > >Hi, > > > > > PS: when are we likely to be able to update to a proper released > > > EDK2 ? Running with a git snapshot isn't ideal, so if we can > > > move to an EDK2 release version within

Re: [PATCH] block/io: clear BDRV_BLOCK_RECURSE flag after recursing in bdrv_co_block_status

2024-01-17 Thread Stefan Hajnoczi
On Tue, Jan 16, 2024 at 04:48:39PM +0100, Fiona Ebner wrote: > Using fleecing backup like in [0] on a qcow2 image (with metadata > preallocation) can lead to the following assertion failure: > > > bdrv_co_do_block_status: Assertion `!(ret & BDRV_BLOCK_ZERO)' failed. > > In the reproducer [0], it

[PATCH v2 1/8] tests/avocado: mark boot_linux.py long runtime instead of flaky

2024-01-17 Thread Nicholas Piggin
The ppc64 and s390x tests were first marked skipIf GITLAB_CI by commit c0c8687ef0f ("tests/avocado: disable BootLinuxPPC64 test in CI"), and commit 0f26d94ec9e ("tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab") due to being very heavy-weight for gitlab CI. Commit 9b45cc99318 ("docs/devel: ra

[PATCH v2 7/8] tests/avocado: ppc add hypervisor tests

2024-01-17 Thread Nicholas Piggin
The powernv and pseries machines both provide hypervisor facilities that are supported by KVM. This is a large and complicated set of features that don't get much system-level testing in ppc tests. Add a new test case for these which runs QEMU KVM inside the target. This downloads an Alpine VM ima

Re: [PATCH 2/4] Avoid multiple definitions of copy_file_range

2024-01-17 Thread Samuel Thibault
Manolo de Medici, le mer. 17 janv. 2024 15:09:39 +0100, a ecrit: > Hello Philippe, > thank you for the feedback, I've checked that. The problem is that the > Hurd fails that test due to the following: > > #if defined __stub_copy_file_range || defined __stub___copy_file_range > fail

  1   2   3   4   >