[PATCH RESEND] target/mips: Fix MSA BZ/BNZ opcodes displacement

2023-10-05 Thread Philippe Mathieu-Daudé
The PC offset is *signed*. Cc: qemu-sta...@nongnu.org Reported-by: Sergey Evlashev Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1624 Fixes: c7a9ef7517 ("target/mips: Introduce decode tree bindings for MSA ASE") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson ---

[PATCH v2] pc-bios/meson.build: Silent unuseful DTC warnings

2023-10-05 Thread Philippe Mathieu-Daudé
QEMU consumes some device tree blobs, so these have been committed to the tree in as firmware, along with the device tree source used to generate them. We know the blobs are "good enough" to have QEMU boot a system, so we don't really maintain and rebuild the sources. These blobs were generated wi

Re: [PATCH] dtc

2023-10-05 Thread Philippe Mathieu-Daudé
Oops, wrong subject. On 6/10/23 08:45, Philippe Mathieu-Daudé wrote: QEMU consumes some device tree blobs, so these have been committed to the tree in as firmware, along with the device tree source used to generate them. We know the blobs are "good enough" to have QEMU boot a system, so we don't

[PATCH] dtc

2023-10-05 Thread Philippe Mathieu-Daudé
QEMU consumes some device tree blobs, so these have been committed to the tree in as firmware, along with the device tree source used to generate them. We know the blobs are "good enough" to have QEMU boot a system, so we don't really maintain and rebuild the sources. These blobs were generated wi

Re: [PATCH v5 5/5] vfio-user: Fix config space access byte order

2023-10-05 Thread Mattias Nissler
On Thu, Oct 5, 2023 at 6:30 PM Jag Raman wrote: > > > > On Sep 20, 2023, at 4:06 AM, Mattias Nissler > wrote: > > > > PCI config space is little-endian, so on a big-endian host we need to > > perform byte swaps for values as they are passed to and received from > > the generic PCI config space a

Re: [PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-05 Thread Michael Tokarev
Applied to my trivial-patches tree, thanks! /mjt

Re: [PATCH] MAINTAINERS: Add some unowned files to the SBSA-REF section

2023-10-05 Thread Michael Tokarev
Applied to my trivial-patches tree, thanks! /mjt

Re: [PATCH] dump: Silence compiler warning in dump code when compiling with -Wshadow

2023-10-05 Thread Michael Tokarev
Applied to my trivial-patches tree, thanks! /mjt

Re: [PATCH v2] hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow

2023-10-05 Thread Michael Tokarev
Applied to my trivial-patches tree, thanks! /mjt

Re: [PATCH] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-05 Thread Michael Tokarev
Applied to my trivial-patches tree, thanks! Marcus, you picked up previous patches of this theme, -- you can continue this tradition if you like :) /mjt

[PULL 16/21] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-05 Thread Cédric Le Goater
From: Eric Auger Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Note that the migration reduces the following trace "vfio: subchannel %s has already been attached" (featuring cssid.ssid.devid) into "device is already

[PULL 13/21] vfio/pci: Introduce vfio_[attach/detach]_device

2023-10-05 Thread Cédric Le Goater
From: Eric Auger We want the VFIO devices to be able to use two different IOMMU backends, the legacy VFIO one and the new iommufd one. Introduce vfio_[attach/detach]_device which aim at hiding the underlying IOMMU backend (IOCTLs, datatypes, ...). Once vfio_attach_device completes, the device i

[PULL 15/21] vfio/ap: Use vfio_[attach/detach]_device

2023-10-05 Thread Cédric Le Goater
From: Eric Auger Let the vfio-ap device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. We take the opportunity to use g_path_get_basename() which is prefered, as suggested by 3e015d815b ("use g_path_get_basename instead of basename") Signe

[PULL 10/21] vfio/common: Propagate KVM_SET_DEVICE_ATTR error if any

2023-10-05 Thread Cédric Le Goater
From: Eric Auger In the VFIO_SPAPR_TCE_v2_IOMMU container case, when KVM_SET_DEVICE_ATTR fails, we currently don't propagate the error as we do on the vfio_spapr_create_window() failure case. Let's align the code. Take the opportunity to reword the error message and make it more explicit. Signed

[PULL 18/21] vfio/common: Introduce a per container device list

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan Several functions need to iterate over the VFIO devices attached to a given container. This is currently achieved by iterating over the groups attached to the container and then over the devices in the group. Let's introduce a per container device list that simplifies this s

[PULL 21/21] vfio/common: Move legacy VFIO backend code into separate container.c

2023-10-05 Thread Cédric Le Goater
From: Yi Liu Move all the code really dependent on the legacy VFIO container/group into a separate file: container.c. What does remain in common.c is the code related to VFIOAddressSpace, MemoryListeners, migration and all other general operations. Signed-off-by: Eric Auger Signed-off-by: Yi Li

[PULL 00/21] vfio queue

2023-10-05 Thread Cédric Le Goater
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-vfio-2023100

[PULL 04/21] vfio/pci: enable vector on dynamic MSI-X allocation

2023-10-05 Thread Cédric Le Goater
From: Jing Liu The vector_use callback is used to enable vector that is unmasked in guest. The kernel used to only support static MSI-X allocation. When allocating a new interrupt using "static MSI-X allocation" kernels, QEMU first disables all previously allocated vectors and then re-allocates a

[PULL 03/21] vfio/pci: detect the support of dynamic MSI-X allocation

2023-10-05 Thread Cédric Le Goater
From: Jing Liu Kernel provides the guidance of dynamic MSI-X allocation support of passthrough device, by clearing the VFIO_IRQ_INFO_NORESIZE flag to guide user space. Fetch the flags from host to determine if dynamic MSI-X allocation is supported. Originally-by: Reinette Chatre Signed-off-by:

[PULL 17/21] vfio/common: Move VFIO reset handler registration to a group agnostic function

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan Move the reset handler registration/unregistration to a place that is not group specific. vfio_[get/put]_address_space are the best places for that purpose. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed

[PULL 01/21] vfio/display: Fix missing update to set backing fields

2023-10-05 Thread Cédric Le Goater
From: Alex Williamson The below referenced commit renames scanout_width/height to backing_width/height, but also promotes these fields in various portions of the egl interface. Meanwhile vfio dmabuf support has never used the previous scanout fields and is therefore missed in the update. This r

[PULL 19/21] vfio/common: Store the parent container in VFIODevice

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan let's store the parent contaienr within the VFIODevice. This simplifies the logic in vfio_viommu_preset() and brings the benefice to hide the group specificity which is useful for IOMMUFD migration. Signed-off-by: Eric Auger Signed-off-by: Zhenzhong Duan [ clg: Add test on

[PULL 20/21] vfio/common: Introduce a global VFIODevice list

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan Some functions iterate over all the VFIODevices. This is currently achieved by iterating over all groups/devices. Let's introduce a global list of VFIODevices simplifying that scan. This will also be useful while migrating to IOMMUFD by hiding the group specificity. Signed-

[PULL 14/21] vfio/platform: Use vfio_[attach/detach]_device

2023-10-05 Thread Cédric Le Goater
From: Eric Auger Let the vfio-platform device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Drop the trace event for vfio-platform as we have similar one in vfio_attach_device. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-

[PULL 06/21] vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation

2023-10-05 Thread Cédric Le Goater
From: Jing Liu During migration restoring, vfio_enable_vectors() is called to restore enabling MSI-X interrupts for assigned devices. It sets the range from 0 to nr_vectors to kernel to enable MSI-X and the vectors unmasked in guest. During the MSI-X enabling, all the vectors within the range are

[PULL 12/21] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan Introduce two new helpers, vfio_kvm_device_[add/del]_fd which take as input a file descriptor which can be either a group fd or a cdev fd. This uses the new KVM_DEV_VFIO_FILE VFIO KVM device group, which aliases to the legacy KVM_DEV_VFIO_GROUP. vfio_kvm_device_[add/del]_gro

[PULL 11/21] vfio/common: Introduce vfio_container_add|del_section_window()

2023-10-05 Thread Cédric Le Goater
From: Eric Auger Introduce helper functions that isolate the code used for VFIO_SPAPR_TCE_v2_IOMMU. Those helpers hide implementation details beneath the container object and make the vfio_listener_region_add/del() implementations more readable. No code change intended. Signed-off-by: Eric Auge

[PULL 02/21] vfio/pci: rename vfio_put_device to vfio_pci_put_device

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan vfio_put_device() is a VFIO PCI specific function, rename it with 'vfio_pci' prefix to avoid confusing. No functional change. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 inser

[PULL 09/21] vfio/common: Move IOMMU agnostic helpers to a separate file

2023-10-05 Thread Cédric Le Goater
From: Yi Liu Move low-level iommu agnostic helpers to a separate helpers.c file. They relate to regions, interrupts, device/region capabilities and etc. Signed-off-by: Eric Auger Signed-off-by: Yi Sun Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-o

[PULL 08/21] linux-headers: Add iommufd.h

2023-10-05 Thread Cédric Le Goater
From: Zhenzhong Duan Since commit da3c22c74a3c ("linux-headers: Update to Linux v6.6-rc1"), linux-headers has been updated to v6.6-rc1. As previous patch added iommufd.h to update-linux-headers.sh, run the script again against TAG v6.6-rc1 to have iommufd.h included. Signed-off-by: Zhenzhong Du

[PULL 07/21] scripts/update-linux-headers: Add iommufd.h

2023-10-05 Thread Cédric Le Goater
From: Eric Auger Update the script to import iommufd.h Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- scripts/update-linux-headers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PULL 05/21] vfio/pci: use an invalid fd to enable MSI-X

2023-10-05 Thread Cédric Le Goater
From: Jing Liu Guests typically enable MSI-X with all of the vectors masked in the MSI-X vector table. To match the guest state of device, QEMU enables MSI-X by enabling vector 0 with userspace triggering and immediately release. However the release function actually does not release it due to al

Re: [PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-05 Thread Philippe Mathieu-Daudé
On 6/10/23 00:22, Brian Cain wrote: Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../targe

[PATCH] target/ppc: Clean up local variable shadowing in kvm_arch_*_registers()

2023-10-05 Thread Cédric Le Goater
Remove extra 'i' variable to fix this warning : ../target/ppc/kvm.c: In function ‘kvm_arch_put_registers’: ../target/ppc/kvm.c:963:13: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 963 | int i; | ^ ../target/ppc/kvm.c:906:9:

Re: [PATCH qemu] timer/i8254: Fix one shot PIT mode

2023-10-05 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 02:36:52AM +, Damien Zammit wrote: > >From: Michael Tokarev > >26.02.2023 04:58, Damien Zammit wrote: > >> Currently, the one-shot (mode 1) PIT expires far too quickly, > >> due to the output being set under the wrong logic. > >> This change fixes the one-shot PIT mode

[PATCH] tap-win32: Remove unnecessary stubs

2023-10-05 Thread Akihiko Odaki
Some of them are only necessary for POSIX systems. The others are assigned to function pointers in NetClientInfo that can actually be NULL. Signed-off-by: Akihiko Odaki --- net/tap-win32.c | 54 - 1 file changed, 54 deletions(-) diff --git a/net/t

Re: [PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-05 Thread Marc-André Lureau
On Fri, Oct 6, 2023 at 8:53 AM Thomas Huth wrote: > > If a script is executable and has a shebang line, Meson treats it as > a normal executable, so that this script here is run via the "python3" > binary in the $PATH. However, "python3" might not be in the $PATH at > all, or it might be a wrong v

[PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-05 Thread Thomas Huth
If a script is executable and has a shebang line, Meson treats it as a normal executable, so that this script here is run via the "python3" binary in the $PATH. However, "python3" might not be in the $PATH at all, or it might be a wrong version, so we should make sure to run this script via the Pyt

Re: [PATCH v4 3/3] hw/vfio: add ramfb migration support

2023-10-05 Thread Laszlo Ersek
On 10/5/23 18:34, Cédric Le Goater wrote: > On 10/5/23 13:30, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. >> >> Turn it off by default on machines <= 8.1 for compatibility reasons. >> >> Signed-off-by:

[PATCH] hw/ide: Add command to sync cache on ATAPI

2023-10-05 Thread Damien Zammit
Bumping this thread[1] as it seems to have gotten lost: [1] https://lists.gnu.org/archive/html/qemu-block/2022-03/msg00586.html Damien

Re: [PATCH qemu] timer/i8254: Fix one shot PIT mode

2023-10-05 Thread Damien Zammit
>From: Michael Tokarev >26.02.2023 04:58, Damien Zammit wrote: >> Currently, the one-shot (mode 1) PIT expires far too quickly, >> due to the output being set under the wrong logic. >> This change fixes the one-shot PIT mode to behave similarly to mode 0. >> >> TESTED: using the one-shot PIT mode

RE: [PATCH v4] target/riscv: update checks on writing pmpcfg for Smepmp to version 1.0

2023-10-05 Thread Chang Alvin
> On Mon, Sep 25, 2023 at 2:11 AM Alvin Chang > wrote: > > > > Current checks on writing pmpcfg for Smepmp follows Smepmp version > > 0.9.1. However, Smepmp specification has already been ratified, and > > there are some differences between version 0.9.1 and 1.0. In this > > commit we update

[PATCH v17 4/9] virtio-gpu: blob prep

2023-10-05 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki

[PATCH v17 3/9] virtio-gpu: hostmem

2023-10-05 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Acked-by: Michael S. Tsirkin Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-pci.c

[PATCH v17 8/9] gfxstream + rutabaga: enable rutabaga

2023-10-05 Thread Gurchetan Singh
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Antonio Caggiano Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Akihiko Odaki

[PATCH v17 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-10-05 Thread Gurchetan Singh
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Ant

[PATCH v17 2/9] virtio-gpu: CONTEXT_INIT feature

2023-10-05 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-D

[PATCH v17 1/9] virtio: Add shared memory capability

2023-10-05 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David A

[PATCH v17 7/9] gfxstream + rutabaga: meson support

2023-10-05 Thread Gurchetan Singh
- Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano R

[PATCH v17 9/9] docs/system: add basic virtio-gpu documentation

2023-10-05 Thread Gurchetan Singh
This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano Reviewed-by: Akihiko Odaki --- doc

[PATCH v17 0/9] gfxstream + rutabaga_gfx

2023-10-05 Thread Gurchetan Singh
From: Gurchetan Singh Branch containing changes: https://gitlab.com/gurchetansingh/qemu/-/commits/qemu-gfxstream-v17 Changes since v16: - Fixed typo mentioned here: https://lists.gnu.org/archive/html/qemu-devel/2023-10/msg01407.html Antonio Caggiano (2): virtio-gpu: CONTEXT_INIT feature

[PATCH v17 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-10-05 Thread Gurchetan Singh
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the Android

Re: [RFC PATCH v2 1/9] Add Rust SEV library as subproject

2023-10-05 Thread Tyler Fanelli
On 10/5/23 2:03 AM, Philippe Mathieu-Daudé wrote: Hi Tyler, On 4/10/23 22:34, Tyler Fanelli wrote: The Rust sev library provides a C API for the AMD SEV launch ioctls, as well as the ability to build with meson. Add the Rust sev library as a QEMU subproject with the goal of outsourcing all SEV

Re: [PATCH v2 5/5] hw/intc/apic: Pass CPU using QOM link property

2023-10-05 Thread Paolo Bonzini
On 10/3/23 10:27, Philippe Mathieu-Daudé wrote: -/* TODO: convert to link<> */ -apic = APIC_COMMON(cpu->apic_state); -apic->cpu = cpu; -apic->apicbase = APIC_DEFAULT_ADDRESS | MSR_IA32_APICBASE_ENABLE; +qdev_prop_set_uint32(cpu->apic_state, "base-addr", +

Re: [PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()

2023-10-05 Thread Paolo Bonzini
On 10/3/23 10:27, Philippe Mathieu-Daudé wrote: -x86_cpu_apic_create(cpu, &local_err); -if (local_err != NULL) { -goto out; -} +x86_cpu_apic_new(cpu); I don't like this, "*_new" is generally for functions that return what they create. Patch 2 is sc

Re: [PATCH v2] coverity: physmem: use simple assertions instead of modelling

2023-10-05 Thread Paolo Bonzini
On Thu, Oct 5, 2023 at 4:04 PM Vladimir Sementsov-Ogievskiy wrote: > +/* > + * Assure Coverity (and ourselves) that we are not going to > OVERRUN > + * the buffer by following ldn_he_p(). > + */ > +assert((l == 1 && len >= 1) || > +

[PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-05 Thread Brian Cain
Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:205:18: error:

[PATCH v2 1/3] target/hexagon: move GETPC() calls to top level helpers

2023-10-05 Thread Brian Cain
From: Matheus Tavares Bernardino As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of ``GETPC()`` should be read from the helper

[PATCH v2 3/3] target/hexagon: avoid shadowing globals

2023-10-05 Thread Brian Cain
The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. The global `cpu_env` is shadowed by local `cpu_env` arguments, so we rename the function arguments to avoid shadowing the global. Signed-off-by: Brian Cain --- target/hexagon/g

[PATCH v2 0/3] hexagon: GETPC() and shadowing fixes

2023-10-05 Thread Brian Cain
In v2: reworked with suggestions from Philippe and added a new patch to cover -Wshadow=global. Brian Cain (2): target/hexagon: fix some occurrences of -Wshadow=local target/hexagon: avoid shadowing globals Matheus Tavares Bernardino (1): target/hexagon: move GETPC() calls to top level helpe

[PATCH 3/3] hw/ppc: Add emulation of AmigaOne XE board

2023-10-05 Thread BALATON Zoltan
The AmigaOne is a rebranded MAI Teron board that uses U-Boot firmware with patches to support AmigaOS and is very similar to pegasos2 so can be easily emulated sharing most code with pegasos2. The reason to emulate it is that AmigaOS comes in different versions for AmigaOne and PegasosII which only

[PATCH 0/3] Add emulation of AmigaOne XE board

2023-10-05 Thread BALATON Zoltan
This small series adds amigaone PPC machine which can be emulated mostly reusing existing models used by pegasos2 as these machines are very similar. The reason to add another board is that AmigaOS has different versions for different machines that only run on that machine and the AmigaOne version

[PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-05 Thread BALATON Zoltan
The Articia S is a generic chipset supporting several different CPUs that were used on some PPC boards. This is a minimal emulation of the parts needed for emulating the AmigaOne board. Signed-off-by: BALATON Zoltan --- hw/pci-host/Kconfig | 5 + hw/pci-host/articia.c | 266 +

[PATCH 1/3] via-ide: Fix legacy mode emulation

2023-10-05 Thread BALATON Zoltan
The initial value for BARs were set in reset method for emulating legacy mode at start but this does not work because PCI code resets BARs after calling device reset method. Additionally the values written to BARs were also wrong. Move setting the BARs to a callback on writing the PCI config regsi

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Oct 05, 2023 at 06:10:20PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: >> >> >> +/* >> >> >> + * Make sure both QEMU instances will go into RECOVER stage, then >> >> >> test >> >> >> +

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 06:10:20PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: > >> >> +/* > >> >> + * Make sure both QEMU instances will go into RECOVER stage, then > >> >> test > >> >> + * kicking them out usin

Re: [PATCH] qtest/migration: Add a test for the analyze-migration script

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Sep 27, 2023 at 06:47:56PM -0300, Fabiano Rosas wrote: >> I know this adds a python dependency to qtests and I'm not sure how >> much we care about this script, but on the other hand it would be nice >> to catch these errors early on. >> >> This would also help with fu

[PATCH v2] misc/pca9552: Fix for pca9552 not getting reset

2023-10-05 Thread Glenn Miles
Testing of the pca9552 device on the powernv platform showed that the reset method was not being called when an instance of the device was realized. This was causing the INPUT0/INPUT1 POR values to be incorrect. Fixed by overriding the parent pca955x_realize method with a new pca9552_realize meth

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: >> >> +/* >> >> + * Make sure both QEMU instances will go into RECOVER stage, then >> >> test >> >> + * kicking them out using migrate-pause. >> >> + */ >> >> +wait_for_postcopy_status(from, "po

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: > >> +/* > >> + * Make sure both QEMU instances will go into RECOVER stage, then test > >> + * kicking them out using migrate-pause. > >> + */ > >> +wait_for_postcopy_status(from, "postcopy-recover"); > >> +wait_

Re: [PATCH v3 07/10] migration: Add migration_rp_wait|kick()

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 09:49:25AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > It's just a simple wrapper for rp_sem on either wait() or kick(), make it > > even clearer on how it is used. Prepared to be used even for other things. > > > > Reviewed-by: Fabiano Rosas > > Signed-off-by: Pete

[PATCH] misc/pca9552: Fix for pca9552 not getting reset

2023-10-05 Thread Glenn Miles
Testing of the pca9552 device on the powernv platform showed that the reset method was not being called when an instance of the device was realized. This was causing the INPUT0/INPUT1 POR values to be incorrect. Fixed by calling pca9552_reset from within the pca9552_realize method. Signed-off-by

[PATCH v2] misc/pca9552: Let external devices set pca9552 inputs

2023-10-05 Thread Glenn Miles
Allow external devices to drive pca9552 input pins by adding input GPIO's to the model. This allows a device to connect its output GPIO's to the pca9552 input GPIO's. In order for an external device to set the state of a pca9552 pin, the pin must first be configured for high impedance (LED is off

Re: [PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-10-05 Thread Phil Dennis-Jordan
Ping - let me know if there's anything particularly controversial, unclear, etc. about these patches or if I can do anything to make reviewing easier. Thanks! On Fri, 22 Sept 2023 at 16:09, Phil Dennis-Jordan wrote: > > This is a series of semi-related patches for the x86 macOS > Hypervisor.fr

Re: [PATCH v6 14/14] python: use vm.cmd() instead of vm.qmp() where appropriate

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: > In many cases we just want an effect of qmp command and want to raise on > failure. Use vm.cmd() method which does exactly this. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/avocado/vnc.py

Re: [PATCH v6 13/14] tests/vm/basevm.py: use cmd() instead of qmp()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:49PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We don't expect failure here and need 'result' object. cmd() is better > in this case. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/vm/basevm.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletio

Re: [PATCH v6 12/14] iotests.py: pause_job(): drop return value

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:48PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The returned value is unused. It's simple to check by command > > git grep -B 3 '\.pause_job(' > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 3 +-- > 1 file changed, 1 inse

Re: [PATCH v6 11/14] iotests: drop some extra ** in qmp() call

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:47PM +0300, Vladimir Sementsov-Ogievskiy wrote: > qmp() method supports passing dict (if it doesn't need substituting > '_' to '-' in keys). So, drop some extra '**' operators. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/040

Re: [PATCH v6 10/14] iotests: drop some occasional semicolons

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/041 | 2 +- > tests/qemu-iotests/196 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Maybe in the subject s/occasional/extra/ Reviewe

Re: [PATCH v6 09/14] iotests: refactor some common qmp result checks into generic pattern

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > To simplify further conversion. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/040 | 3 ++- > tests/qemu-iotests/147 | 3 ++- > tests/qemu-iotests/155 | 4 ++-- > tests/qemu-iotests/218 |

Re: [PATCH v6 08/14] iotests: add some missed checks of qmp result

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:44PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/041| 1 + > tests/qemu-iotests/151| 1 + > tests/qemu-iotests/152| 2 ++ >

Re: [PATCH v2 03/21] preallocate: Don't poll during permission updates

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
On 11.09.23 12:46, Kevin Wolf wrote: When the permission related BlockDriver callbacks are called, we are in the middle of an operation traversing the block graph. Polling in such a place is a very bad idea because the graph could change in unexpected ways. In the future, callers will also hold t

Re: [PATCH v6 07/14] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:43PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Add similar method for consistency. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake --

Re: [PATCH v6 06/14] python/machine.py: upgrade vm.cmd() method

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:42PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The method is not popular in iotests, we prefer use vm.qmp() and then > check success by hand.. But that's not optimal. To simplify movement to extra '.' > vm.cmd() let's support same interface improvements like in vm

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 10:22:52AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > rp_state.error was a boolean used to show error happened in return path > > thread. That's not only duplicating error reporting (migrate_set_error), > > but also not good enough in that we only do error_report()

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 09:57:58AM -0300, Fabiano Rosas wrote: > > @@ -2008,9 +1996,14 @@ static void *source_return_path_thread(void *opaque) > > } > > > > out: > > -if (qemu_file_get_error(rp)) { > > +if (err) { > > Need to keep both checks here. The next patch did that. Let me

Re: [PATCH v8 2/2] tpm: add backend for mssim

2023-10-05 Thread James Bottomley
On Thu, 2023-10-05 at 18:11 +0200, Philippe Mathieu-Daudé wrote: > On 5/10/23 15:57, James Bottomley wrote: > > On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote: > > > On 4/10/23 20:42, James Bottomley wrote: > > > > From: James Bottomley [...] > > > > +.. code-block:: console > > >

Re: [PATCH] MAINTANERS: Split vt82c686 out of fuloong2e

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Philippe Mathieu-Daudé wrote: On 5/10/23 20:18, BALATON Zoltan wrote: It is used by other machines not just fuloong2e so put it in a separate section and add myself as reviewer. Signed-off-by: BALATON Zoltan --- By the way, PIIX4 already has a section just above where I've

Re: [PATCH v6 05/14] python/qemu: rename command() to cmd()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:41PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Use a shorter name. We are going to move in iotests from qmp() to > command() where possible. But command() is longer than qmp() and don't > look better. Let's rename. > > You can simply grep for '\.command(' and for '

Re: [PATCH v6 04/14] python: rename QEMUMonitorProtocol.cmd() to cmd_raw()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:40PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Having cmd() and command() methods in one class doesn't look good. > Rename cmd() to cmd_raw(), to show its meaning better. > > We also want to rename command() to cmd() in future, so this commit is > a necessary step.

Re: [PATCH v6 03/14] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:39PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Here we don't expect a failure. In case on failure we'll crash on s/case on/case of/ > trying to access ['return']. Let's better use .command() that clearly > raise on failure. Maybe: s/Let's better /Better is to/; s

[PULL 13/15] nbd/server: Refactor list of negotiated meta contexts

2023-10-05 Thread Eric Blake
Peform several minor refactorings of how the list of negotiated meta contexts is managed, to make upcoming patches easier: Promote the internal type NBDExportMetaContexts to the public opaque type NBDMetaContexts, and mark exp const. Use a shorter member name in NBDClient. Hoist calls to nbd_chec

[PULL 11/15] nbd/client: Accept 64-bit block status chunks

2023-10-05 Thread Eric Blake
Once extended mode is enabled, we need to accept 64-bit status replies (even for replies that don't exceed a 32-bit length). It is easier to normalize narrow replies into wide format so that the rest of our code only has to handle one width. Although a server is non-compliant if it sends a 64-bit

[PULL 12/15] nbd/client: Request extended headers during negotiation

2023-10-05 Thread Eric Blake
All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd is used to connect to the kernel module (as nbd.ko does not expect them, but expects us to do the negotiation in userspace before handing the socket over to th

[PULL 06/15] nbd/server: Prepare to send extended header replies

2023-10-05 Thread Eric Blake
Although extended mode is not yet enabled, once we do turn it on, we need to reply with extended headers to all messages. Update the low level entry points necessary so that all other callers automatically get the right header based on the current mode. Signed-off-by: Eric Blake Reviewed-by: Vla

[PULL 09/15] nbd/client: Plumb errp through nbd_receive_replies

2023-10-05 Thread Eric Blake
Instead of ignoring the low-level error just to refabricate our own message to pass to the caller, we can just plumb the caller's errp down to the low level. Signed-off-by: Eric Blake Message-ID: <20230925192229.3186470-20-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/n

[PULL 07/15] nbd/server: Support 64-bit block status

2023-10-05 Thread Eric Blake
The NBD spec states that if the client negotiates extended headers, the server must avoid NBD_REPLY_TYPE_BLOCK_STATUS and instead use NBD_REPLY_TYPE_BLOCK_STATUS_EXT which supports 64-bit lengths, even if the reply does not need more than 32 bits. As of this patch, client->mode is still never NBD_

[PULL 03/15] mailmap: Fix BALATON Zoltan author email

2023-10-05 Thread Eric Blake
This fixes authorship of commits 5cbd51a5 and friends, where the qemu-ppc mailing list rewrote the "From:" field in the corresponding patches. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for explanation. Signed-off-by: Eric Blake Message-ID: <202309

[PULL 00/15] NBD patches through 2023-10-05

2023-10-05 Thread Eric Blake
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2023-10-

[PULL 02/15] maint: Tweak comments in mailmap regarding SPF

2023-10-05 Thread Eric Blake
Documenting that we should not add new lines to work around SPF rewrites sounds foreboding; the intent is instead that new lines here are okay, but indicate a second problem elsewhere in our build process that we should also consider fixing at the same time, to keep the section from growing without

  1   2   3   >