Re: [PATCH 1/2] exec/ioport: Factor portio_list_register_flush_coalesced() out

2023-02-08 Thread Richard Henderson
On 2/7/23 13:46, Philippe Mathieu-Daudé wrote: We always follow the same pattern when registering coalesced portio: - portio_list_init() - portio_list_set_flush_coalesced() - portio_list_add() Factor these 3 operations in a single helper named portio_list_register_flush_coalesced().

Re: [PATCH 2/2] exec/ioport: Factor portio_list_register() out

2023-02-08 Thread Richard Henderson
On 2/7/23 13:46, Philippe Mathieu-Daudé wrote: We always follow the same pattern when registering non-coalesced portio: - portio_list_init() - portio_list_add() Factor these 2 operations in a single helper named portio_list_register(). Since both calls become local to ioport.c, reduce

Re: [PATCH v2 1/3] migration: Rework multi-channel checks on URI

2023-02-08 Thread Juan Quintela
Peter Xu wrote: > The whole idea of multi-channel checks was not properly done, IMHO. > > Currently we check multi-channel in a lot of places, but actually that's > not needed because we only need to check it right after we get the URI and > that should be it. > > If the URI check succeeded, we

Re: [PATCH v2 2/3] migration: Add a semaphore to count PONGs

2023-02-08 Thread Juan Quintela
Peter Xu wrote: > This is mostly useless, but useful for us to know whether the main channel > is correctly established without changing the migration protocol. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

Re: [PATCH v2 3/3] migration: Postpone postcopy preempt channel to be after main

2023-02-08 Thread Juan Quintela
Peter Xu wrote: > Postcopy with preempt-mode enabled needs two channels to communicate. The > order of channel establishment is not guaranteed. It can happen that the > dest QEMU got the preempt channel connection request before the main > channel is established, then the migration may make no

Re: [PATCH v15 10/11] qapi/s390x/cpu topology: CPU_POLARITY_CHANGE qapi event

2023-02-08 Thread Markus Armbruster
Nina Schoetterl-Glausch writes: > On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: >> When the guest asks to change the polarity this change >> is forwarded to the admin using QAPI. >> The admin is supposed to take according decisions concerning >> CPU provisioning. >> >> Signed-off-by:

Re: [PATCH V2] memory: RAM_NAMED_FILE flag

2023-02-08 Thread Peter Xu
On Wed, Feb 08, 2023 at 01:34:18PM -0500, Steven Sistare wrote: > On 2/7/2023 3:23 PM, Peter Xu wrote: > > On Tue, Feb 07, 2023 at 11:03:33AM -0800, Steve Sistare wrote: > >> migrate_ignore_shared() is an optimization that avoids copying memory > >> that is visible and can be mapped on the target.

Re: [PATCH 1/7] hw/isa: Un-inline isa_bus_from_device()

2023-02-08 Thread Richard Henderson
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote: No point in inlining isa_bus_from_device() which is only used at device realization time. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 5 + include/hw/isa/isa.h | 5 + 2 files changed, 6 insertions(+), 4 deletions(-)

[PATCH v2 00/10] Kconfig vs. default devices

2023-02-08 Thread Fabiano Rosas
v2: Applying the feedback received, all small tweaks. Patch 6 still needs consensus on whether to apply the fix to Kconfig or elsewhere. Link to the previous version: https://lore.kernel.org/r/461ba038-31bf-49c4-758b-94ece36f1...@redhat.com changelog: - patch 1: moved isa-parallel to a build

[PATCH v2 01/10] hw/i386: Select CONFIG_PARALLEL for PC machines

2023-02-08 Thread Fabiano Rosas
Currently the isa-parallel driver is always added by the PC machines regardless of the presence of the actual code in the build, which can lead to a crash: qemu-system-i386: unknown type 'isa-parallel' Aborted (core dumped) Signed-off-by: Fabiano Rosas --- hw/i386/Kconfig | 2 +- 1 file

[PATCH v2 08/10] hw/arm: Select GICV3_TCG for sbsa-ref machine

2023-02-08 Thread Fabiano Rosas
This machine hardcodes the creation of the interrupt controller, so make sure the dependency is explicitly described in the Kconfig. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Maydell --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig

[PATCH v2 05/10] hw/arm: Select VIRTIO_NET for virt machine

2023-02-08 Thread Fabiano Rosas
The 'virt' machine uses virtio-net-pci as a fallback when no other network driver has been selected via command line. Select VIRTIO_NET and VIRTIO_PCI from CONFIG_ARM_VIRT to avoid errors when PCI_DEVICES=n (due to e.g. --without-default-devices): $ ./qemu-system-aarch64 -M virt -accel tcg -cpu

[PATCH v2 09/10] hw/arm: Select e1000e for sbsa-ref machine

2023-02-08 Thread Fabiano Rosas
This machine explicitly selects the e1000e network adapter if no other option was given in the command line. Make sure e1000e is present in the build. Signed-off-by: Fabiano Rosas --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index

[PATCH v2 04/10] hw/i386: Select E1000_PCI for i440fx

2023-02-08 Thread Fabiano Rosas
The i440fx machines uses the e1000 adapter as the default when no other network card is configured. Move the E1000_PCI entry in Kconfig from 'imply' to 'select' to avoid the following situation: ./qemu-system-i386 -machine pc-i440fx-8.0 qemu-system-i386: Unsupported NIC model: e1000

[PATCH v2 10/10] hw/arm: Select VGA_PCI for sbsa-ref machine

2023-02-08 Thread Fabiano Rosas
The sbsa-ref machine explicitly creates a VGA PCI device, so make sure vga-pci.c is included in the build. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Maydell --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 5022d519ea..74fceb419d

[PATCH v2 03/10] hw/i386: Select VGA_PCI in Kconfig

2023-02-08 Thread Fabiano Rosas
Machines that have "std" as default VGA display need to always build vga-pci.c, otherwise we get a crash when CONFIG_PCI_DEVICES=n: $ ./qemu-system-x86_64 -M q35 qemu-system-x86_64: unknown type 'VGA' Aborted (core dumped) Signed-off-by: Fabiano Rosas --- hw/i386/Kconfig | 2 +- 1 file

[PATCH v2 02/10] hw/i386: Select E1000E for q35

2023-02-08 Thread Fabiano Rosas
The e1000e network adapter is the default network card for the q35 machine. Make sure that CONFIG is always selected for that machine. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- hw/i386/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/Kconfig

[PATCH v2 06/10] hw/arm: Select VIRTIO_BLK for virt machine

2023-02-08 Thread Fabiano Rosas
The virt machine has IF_VIRTIO as block_default_type, which causes the generic code to try to create a virtio-blk-pci device pair at configure_blockdev()/qemu_create_cli_devices(). Select VIRTIO_BLK and VIRTIO_PCI from CONFIG_ARM_VIRT to avoid errors when PCI_DEVICES=n (due to e.g.

[PATCH v2 07/10] hw/arm: Select XLNX_USB_SUBSYS for xlnx-zcu102 machine

2023-02-08 Thread Fabiano Rosas
This machine hardcodes initialization of the USB device, so select the corresponding Kconfig. It is not enough to have it as "default y if XLNX_VERSAL" at usb/Kconfig because building --without-default-devices disables the default selection resulting in: $ ./qemu-system-aarch64 -M xlnx-zcu102

Re: [RFC v5 2/3] memory: add depth assert in address_space_to_flatview

2023-02-08 Thread Juan Quintela
Chuang Xu wrote: > Before using any flatview, sanity check we're not during a memory > region transaction or the map can be invalid. > > Signed-off-by: Chuang Xu Reviewed-by: Juan Quintela I am waiting to see what Paolo thinks (specially of patch 1). Later, JUan.

Re: [PATCH 2/7] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus'

2023-02-08 Thread Richard Henderson
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~ diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 5bd99379e9..95fc1ba5f7 100644

Re: [PATCH] x86: temporarily remove all attempts to provide setup_data

2023-02-08 Thread Dov Murik
On 08/02/2023 20:08, Jason A. Donenfeld wrote: > All attempts at providing setup_data have been made as an iteration on > whatever was there before, stretching back to the original > implementation used for DTBs that [mis]used the kernel image itself. > We've now had a dozen rounds of bugs and

Re: [PATCH 3/7] hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa()

2023-02-08 Thread Richard Henderson
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote: Rename ide_init_ioport() as ide_init_ioport_isa() to make explicit it expects an ISA device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 4 ++--

Re: [PATCH 7/7] hw/ide/piix: Remove dead code in pci_piix_init_ports()

2023-02-08 Thread Richard Henderson
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote: pci_piix_init_ports() always return '0' so can't fail. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/piix.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-08 Thread Steven Sistare
On 2/8/2023 9:17 AM, Alex Bennée wrote: > Steven Sistare writes: > >> On 2/8/2023 1:43 AM, Marc-André Lureau wrote: >>> Hi >>> >>> On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare >>> wrote: Generalize hmp_split_at_comma() to take any delimiter character, rename as

Re: [PATCH v2 00/10] Kconfig vs. default devices

2023-02-08 Thread Philippe Mathieu-Daudé
On 8/2/23 20:26, Fabiano Rosas wrote: We currently have a situation where disabling a Kconfig might result in a runtime error when QEMU selects the corresponding device as a default value for an option. But first a disambiguation: Kconfig default:: a device "Foo" for which there's "config

Re: [PATCH 5/7] hw/ide/piix: Use generic ide_init_ioport()

2023-02-08 Thread Philippe Mathieu-Daudé
On 8/2/23 01:07, Philippe Mathieu-Daudé wrote: TYPE_PIIX3_IDE is a PCI function inheriting from QOM TYPE_PCI_DEVICE. To be able to call the ISA specific ide_init_ioport_isa(), we call this function passing a NULL ISADevice argument. Remove this hack by calling the recently added generic

Re: [PATCH 6/7] hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device

2023-02-08 Thread Richard Henderson
On 2/7/23 14:07, Philippe Mathieu-Daudé wrote: The previous commit removed the single call to isa_register_portio_list() with dev=NULL. To be sure we won't reintroduce such weird (ab)use, add an assertion. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson I wonder how

[PATCH v2 00/12] qtests vs. default devices

2023-02-08 Thread Fabiano Rosas
Based on: <20230208192654.8854-1-faro...@suse.de> [PATCH v2 00/10] Kconfig vs. default devices https://lore.kernel.org/r/20230208192654.8854-1-faro...@suse.de v2: patch 3 - fixed typo s/PCIE_ROOT/PCIE_PORT and dropped runtime check; patch 4 - dropped runtime check and added a dep on

[PATCH v2 05/12] tests/qtest: hd-geo-test: Check for missing devices

2023-02-08 Thread Fabiano Rosas
Don't include tests that require devices not available in the QEMU binary. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/hd-geo-test.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/qtest/hd-geo-test.c

[PATCH v2 09/12] tests/qtest: Check for devices in bios-tables-test

2023-02-08 Thread Fabiano Rosas
Do not include tests that require devices that are not available in the QEMU build. Signed-off-by: Fabiano Rosas Acked-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 75 -- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git

[PATCH v2 02/12] tests/qtest: Do not run lsi53c895a test if device is not present

2023-02-08 Thread Fabiano Rosas
The tests are built once for all the targets, so as long as one QEMU binary is built with CONFIG_LSI_SCSI_PCI=y, this test will run. However some binaries might not include the device. So check this again in runtime. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth ---

[PATCH v2 06/12] test/qtest: Fix coding style in device-plug-test.c

2023-02-08 Thread Fabiano Rosas
We should not mix declarations and statements in QEMU code. Signed-off-by: Fabiano Rosas --- tests/qtest/device-plug-test.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 5a6afa2b57..4f92617335

[PATCH v2 01/12] tests/qtest: Skip PXE tests for missing devices

2023-02-08 Thread Fabiano Rosas
Check if the devices we're trying to add are present in the QEMU binary. They could have been removed from the build via Kconfig or the --without-default-devices option. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/pxe-test.c | 4 1 file changed, 4 insertions(+)

[PATCH v2 04/12] tests/qtest: Don't build virtio-serial-test.c if device not present

2023-02-08 Thread Fabiano Rosas
The virtconsole device might not be present in the QEMU build that is being tested. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 5c8b031ce0..eccdfca235

[PATCH v2 03/12] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c

2023-02-08 Thread Fabiano Rosas
This test depends on the presence of the pcie-root-port device. Add a build time dependency. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index

[PATCH v2 10/12] tests/qtest: Do not include hexloader-test if loader device is not present

2023-02-08 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index eccdfca235..c6dba4f87e 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -197,11 +197,11 @@

[PATCH v2 08/12] tests/qtest: drive_del-test: Skip tests that require missing devices

2023-02-08 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/drive_del-test.c | 65 1 file changed, 65 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 9a750395a9..8a6f3ac963 100644 --- a/tests/qtest/drive_del-test.c +++

[PATCH v2 07/12] tests/qtest: Skip unplug tests that use missing devices

2023-02-08 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/device-plug-test.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 4f92617335..01cecd6e20 100644 ---

[PATCH v2 11/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-08 Thread Fabiano Rosas
Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54e62b..eaf13c7a33

[PATCH v2 12/12] tests/qtest: bios-tables-test: Skip if missing configs

2023-02-08 Thread Fabiano Rosas
If we build with --without-default-devices, CONFIG_HPET and CONFIG_PARALLEL are set to N, which makes the respective devices go missing from acpi tables. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [PATCH v2 1/3] migration: Rework multi-channel checks on URI

2023-02-08 Thread Peter Xu
On Wed, Feb 08, 2023 at 08:19:11PM +0100, Juan Quintela wrote: > Peter Xu wrote: > > The whole idea of multi-channel checks was not properly done, IMHO. > > > > Currently we check multi-channel in a lot of places, but actually that's > > not needed because we only need to check it right after we

Re: [PATCH v2 3/3] migration: Postpone postcopy preempt channel to be after main

2023-02-08 Thread Peter Xu
On Wed, Feb 08, 2023 at 08:22:05PM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Postcopy with preempt-mode enabled needs two channels to communicate. The > > order of channel establishment is not guaranteed. It can happen that the > > dest QEMU got the preempt channel connection request

Re: [PATCH v2 00/10] Kconfig vs. default devices

2023-02-08 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > On 8/2/23 20:26, Fabiano Rosas wrote: > >> We currently have a situation where disabling a Kconfig might result >> in a runtime error when QEMU selects the corresponding device as a >> default value for an option. But first a disambiguation: >> >> Kconfig

Re: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-08 Thread Eric Blake
On Wed, Feb 08, 2023 at 09:35:56AM +, Het Gala wrote: > Existing 'migrate' QAPI design enforces transport mechanism, ip address > of destination interface and corresponding port number in the form > of a unified string 'uri' parameter for initiating a migration stream. > This scheme has a

Re: [PATCH v2 5/6] migration: Modified 'migrate-incoming' QAPI and HMP side changes on the destination interface.

2023-02-08 Thread Eric Blake
On Wed, Feb 08, 2023 at 09:35:59AM +, Het Gala wrote: > 'migrate-incoming' QAPI design have been modified into well-defined > MigrateChannel struct to prevent multiple encoding of uri strings on > the destination side.'uri' parameter is kept for backward compatibility. > > Suggested-by:

Re: [PATCH] x86: temporarily remove all attempts to provide setup_data

2023-02-08 Thread Michael S. Tsirkin
On Wed, Feb 08, 2023 at 03:08:35PM -0300, Jason A. Donenfeld wrote: > All attempts at providing setup_data have been made as an iteration on > whatever was there before, stretching back to the original > implementation used for DTBs that [mis]used the kernel image itself. > We've now had a dozen

Re: [PATCH 01/10] hw/riscv/virt: Add OEM_ID and OEM_TABLE_ID fields

2023-02-08 Thread Alistair Francis
On Thu, Feb 2, 2023 at 2:54 PM Sunil V L wrote: > > ACPI needs OEM_ID and OEM_TABLE_ID for the machine. Add these fields > in the RISCVVirtState structure and initialize with default values. > > Signed-off-by: Sunil V L Acked-by: Alistair Francis Alistair > --- > hw/riscv/virt.c | 4

Re: [PATCH 03/10] hw/riscv/virt: Add memmap pointer to RiscVVirtState

2023-02-08 Thread Alistair Francis
On Thu, Feb 2, 2023 at 2:54 PM Sunil V L wrote: > > memmap needs to be exported outside of virt.c so that > modules like acpi can use it. Hence, add a pointer field > in RiscVVirtState structure and initialize it with the > memorymap. > > Signed-off-by: Sunil V L Acked-by: Alistair Francis

Re: [PATCH] roms/opensbi: Upgrade from v1.1 to v1.2

2023-02-08 Thread Alistair Francis
On Tue, Feb 7, 2023 at 2:41 PM Bin Meng wrote: > > Upgrade OpenSBI from v1.1 to v1.2 and the pre-built bios images. > > The v1.2 release includes the following commits: > > 994c8cf lib: sbi_timer: Added a conditional wait function which can timeout > caa5eea lib: sbi: add check for ipi device for

Re: [PATCH RFCv1 6/8] kvm: Add helper kvm_dirty_ring_init()

2023-02-08 Thread Juan Quintela
Gavin Shan wrote: > Due to multiple capabilities associated with the dirty ring for different > architectures: KVM_CAP_DIRTY_{LOG_RING, LOG_RING_ACQ_REL} for x86 and > arm64 separately. There will be more to be done in order to support the > dirty ring for arm64. > > Lets add helper

Re: [PATCH 08/22] include/exec/memattrs: Add two bits of space to MemTxAttrs

2023-02-08 Thread Richard Henderson
On 2/7/23 05:05, Peter Maydell wrote: On Tue, 24 Jan 2023 at 00:01, Richard Henderson wrote: We will need 2 bits to represent ARMSecurityState. Do not attempt to replace or widen secure, even though it logically overlaps the new field -- there are uses within e.g. hw/block/pflash_cfi01.c,

[PATCH 2/2] configure: './configure --help' should work

2023-02-08 Thread Dinah Baum
Always initialize --help display option Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 --- configure | 676 +++--- 1 file changed, 338 insertions(+), 338 deletions(-) diff --git a/configure b/configure index 3b384914ce..1fb4d145f1

[PATCH 1/2] configure: Add 'mkdir build' check

2023-02-08 Thread Dinah Baum
QEMU configure script goes into an infinite error printing loop when in read only directory due to 'build' dir never being created. Checking if 'mkdir dir' succeeds prevents this error. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 --- configure | 15 ++- 1 file

[PATCH 0/2] *** configure: Add 'mkdir build' check ***

2023-02-08 Thread Dinah Baum
QEMU configure script goes into an infinite error printing loop when in read only directory due to 'build' dir never being created. 1 - Checking if 'mkdir dir' succeeds and if the directory is writeable prevents this error. 2 - Since we exit early on error in (1), code for reading in arguments

Re: [PATCH 10/10] MAINTAINERS: Add entry for RISC-V ACPI

2023-02-08 Thread Alistair Francis
On Thu, Feb 2, 2023 at 2:54 PM Sunil V L wrote: > > RISC-V ACPI related functionality for virt machine is added in > virt-acpi-build.c. Add the maintainer entry. > > Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Alistair > --- > MAINTAINERS | 6 ++ > 1 file changed, 6

Re: [PATCH v3 4/6] i386: Mask and report unavailable multi-bit feature values

2023-02-08 Thread Wang, Lei
On 2/6/2023 3:43 PM, Yuan Yao wrote: > On Fri, Jan 06, 2023 at 12:38:24AM -0800, Lei Wang wrote: >> Some feature words, e.g., feature words in AMX-related CPUID leaf 0x1D and >> 0x1E are not bit-wise but multiple bits represents one value. Handle this >> situation when the values specified are not

Re: [PATCH v2 12/23] vfio-user: region read/write

2023-02-08 Thread Alex Williamson
On Wed, 8 Feb 2023 06:38:27 + John Johnson wrote: > > On Feb 6, 2023, at 11:07 AM, Alex Williamson > > wrote: > > > > On Wed, 1 Feb 2023 21:55:48 -0800 > > John Johnson wrote: > > > >> Add support for posted writes on remote devices > >> > >> Signed-off-by: Elena Ufimtseva > >>

[PATCH v2 3/3] vhost-user: Adopt new backend naming

2023-02-08 Thread Maxime Coquelin
The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- hw/virtio/vhost-user.c | 30 +++--- hw/virtio/virtio-qmp.c | 12 ++-- 2 files changed, 21

[PATCH v2 2/3] libvhost-user: Adopt new backend naming

2023-02-08 Thread Maxime Coquelin
The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- subprojects/libvhost-user/libvhost-user.c | 20 ++-- subprojects/libvhost-user/libvhost-user.h | 20

Re: [PATCH 1/3] include/exec: Introduce `CF_PCREL`

2023-02-08 Thread Richard Henderson
On 2/7/23 00:43, Anton Johansson wrote: Adds a new field to TranslationBlock.cflags denoting whether or not the instructions of a given translation block are pc-relative. This field aims to replace the macro `TARGET_TB_PCREL`. Signed-off-by: Anton Johansson --- include/exec/exec-all.h | 1 +

[PATCH v2 1/4] hw/gpio: add PCA6416 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
The PCA6416 is an i2c device with 16 GPIOs. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/arm/Kconfig | 1 + hw/gpio/Kconfig | 4 + hw/gpio/meson.build | 1 + hw/gpio/pca_i2c_gpio.c | 388

[PATCH v2 3/4] hw/gpio: add PCA9536 i2c gpio expander

2023-02-08 Thread Titus Rwantare
This device has the same register layout as the pca9538, but 4 fewer gpio pins. This commit lowers the number of pins initialised, and reuses the pca9538 logic. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 18 ++

[PATCH v2 2/4] hw/gpio: add PCA9538 8-bit GPIO expander

2023-02-08 Thread Titus Rwantare
The 8-bit expander has different register offsets than the 16-bit one, making them incompatible. Reviewed-by: Hao Wu Signed-off-by: Titus Rwantare --- hw/gpio/pca_i2c_gpio.c | 94 ++ include/hw/gpio/pca_i2c_gpio.h | 7 +++ 2 files changed, 101

[PATCH v2 0/4] PCA I2C GPIO expanders

2023-02-08 Thread Titus Rwantare
This patch series contains a set of i2c GPIO expanders, with support for 4, 8, and 16 GPIO connections. The devices are configured as GPIO *inputs by default, but can have pins configured to be inputs with qmp commands. For example, the following snippet in a board file for a system, configures

[PATCH v2 4/4] hw/i2c: add canonical path to i2c event traces

2023-02-08 Thread Titus Rwantare
Signed-off-by: Titus Rwantare --- hw/i2c/core.c | 8 +--- hw/i2c/trace-events | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/i2c/core.c b/hw/i2c/core.c index d4ba8146bf..c583c1497a 100644 --- a/hw/i2c/core.c +++ b/hw/i2c/core.c @@ -161,7 +161,8 @@ static int

Re: [PATCH 07/22] target/arm: Introduce ARMSecuritySpace

2023-02-08 Thread Richard Henderson
On 2/7/23 05:00, Peter Maydell wrote: static inline bool arm_is_secure(CPUARMState *env) { -if (arm_is_el3_or_mon(env)) { -return true; -} -return arm_is_secure_below_el3(env); +ARMSecuritySpace ss = arm_security_space(env); +return ss == ARMSS_Secure || ss ==

Re: [PATCH RFCv1 8/8] kvm: Enable dirty ring for arm64

2023-02-08 Thread Juan Quintela
Gavin Shan wrote: > arm64 has different capability from x86 to enable the dirty ring, which > is KVM_CAP_DIRTY_LOG_RING_ACQ_REL. To enable it in kvm_dirty_ring_init() > when KVM_CAP_DIRTY_LOG_RING isn't supported. > > Signed-off-by: Gavin Shan Reviewed-by: Juan Quintela

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-08 Thread Warner Losh
On Fri, Jan 27, 2023 at 3:02 PM Stefan Hajnoczi wrote: > On Fri, 27 Jan 2023 at 12:10, Warner Losh wrote: > > > > [[ cc list trimmed to just qemu-devel ]] > > > > On Fri, Jan 27, 2023 at 8:18 AM Stefan Hajnoczi > wrote: > >> > >> Dear QEMU, KVM, and rust-vmm communities, > >> QEMU will apply

[PATCH] MAINTAINERS: Add some RISC-V reviewers

2023-02-08 Thread Alistair Francis
From: Alistair Francis This patch adds some active RISC-V members as reviewers to the MAINTAINERS file. Signed-off-by: Alistair Francis --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 96e25f62ac..847bc7f131 100644 --- a/MAINTAINERS +++

Re: [PATCH 3/3] target: Set `CF_PCREL` for arm and i386 frontends

2023-02-08 Thread Richard Henderson
On 2/7/23 00:43, Anton Johansson wrote: Signed-off-by: Anton Johansson --- target/arm/cpu-param.h | 2 -- target/arm/cpu.c| 5 + target/i386/cpu-param.h | 4 target/i386/cpu.c | 5 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git

Re: [PATCH v11 0/3] Consolidate all kernel init in load_kernel()

2023-02-08 Thread Alistair Francis
On Tue, Feb 7, 2023 at 12:03 AM Daniel Henrique Barboza wrote: > > Hi, > > In this new version patch 1 was changed to extract the lower 32 bits of > the 64 bit address when running 32 bit CPUs. The difference now, in comparison > with what was being done in version 6, is that now we're doing that

CXL 2.0 memory pooling emulation

2023-02-08 Thread zhiting zhu
Hi, I saw a PoC: https://lore.kernel.org/qemu-devel/20220525121422.3...@huawei.com/T/ to implement memory pooling and fabric manager on qemu. Is there any further development on this? Can qemu emulate a memory pooling on a simple case that two virtual machines connected to a CXL switch where

Re: [PATCH] MAINTAINERS: Add some RISC-V reviewers

2023-02-08 Thread LIU Zhiwei
On 2023/2/9 8:33, Alistair Francis wrote: From: Alistair Francis This patch adds some active RISC-V members as reviewers to the MAINTAINERS file. Signed-off-by: Alistair Francis --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v3 0/4] migration: Fix disorder of channel creations

2023-02-08 Thread Peter Xu
v3 - Fix indent for uri_supports_multi_channels() [Juan] - Rename migration_uri_validate() to migration_channels_and_uri_compatible() [Juan] - Separate the changes to migrate_postcopy_preempt() into separate patch [Juan] I can trigger disordered connections with preempt mode postcopy (1 out of a

[PATCH v3 4/4] migration: Postpone postcopy preempt channel to be after main

2023-02-08 Thread Peter Xu
Postcopy with preempt-mode enabled needs two channels to communicate. The order of channel establishment is not guaranteed. It can happen that the dest QEMU got the preempt channel connection request before the main channel is established, then the migration may make no progress even during

[PATCH v3 1/4] migration: Rework multi-channel checks on URI

2023-02-08 Thread Peter Xu
The whole idea of multi-channel checks was not properly done, IMHO. Currently we check multi-channel in a lot of places, but actually that's not needed because we only need to check it right after we get the URI and that should be it. If the URI check succeeded, we should never need to check it

Re: [PATCH v3 0/4] migration: Fix disorder of channel creations

2023-02-08 Thread Peter Xu
On Wed, Feb 08, 2023 at 03:28:09PM -0500, Peter Xu wrote: > v3 > - Fix indent for uri_supports_multi_channels() [Juan] > - Rename migration_uri_validate() to migration_channels_and_uri_compatible() > [Juan] > - Separate the changes to migrate_postcopy_preempt() into separate patch > [Juan]

Re: [PATCH v2 15/23] vfio-user: forward msix BAR accesses to server

2023-02-08 Thread Alex Williamson
On Wed, 8 Feb 2023 06:38:30 + John Johnson wrote: > > On Feb 6, 2023, at 12:33 PM, Alex Williamson > > wrote: > > > > On Wed, 1 Feb 2023 21:55:51 -0800 > > John Johnson wrote: > > > >> Server holds device current device pending state > >> Use irq masking commands in socket case > >>

Re: [RFC PATCH 0/5] Deprecate/rename singlestep command line option

2023-02-08 Thread Warner Losh
On Tue, Feb 7, 2023 at 8:56 AM Markus Armbruster wrote: > Peter Maydell writes: > > > The command line option '-singlestep' and its HMP equivalent > > the 'singlestep' command are very confusingly named, because > > they have nothing to do with single-stepping the guest (either > > via the gdb

[PATCH v3 2/3] hw/ssi: Add Nuvoton PSPI Module

2023-02-08 Thread Hao Wu
Nuvoton's PSPI is a general purpose SPI module which enables connections to SPI-based peripheral devices. Signed-off-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Philippe Mathieu-Daude --- MAINTAINERS| 6 +- hw/ssi/meson.build | 2 +- hw/ssi/npcm_pspi.c

[PATCH v3 1/3] MAINTAINERS: Add myself to maintainers and remove Havard

2023-02-08 Thread Hao Wu
Havard is no longer working on the Nuvoton systems for a while and won't be able to do any work on it in the future. So I'll take over maintaining the Nuvoton system from him. Signed-off-by: Hao Wu Acked-by: Havard Skinnemoen Reviewed-by: Philippe Mathieu-Daude --- MAINTAINERS | 2 +- 1 file

[PATCH v3 3/3] hw/arm: Attach PSPI module to NPCM7XX SoC

2023-02-08 Thread Hao Wu
Signed-off-by: Hao Wu Reviewed-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daude --- docs/system/arm/nuvoton.rst | 2 +- hw/arm/npcm7xx.c| 25 +++-- include/hw/arm/npcm7xx.h| 2 ++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git

[PATCH v3 0/3] Nuvoton Peripheral SPI (PSPI) Module

2023-02-08 Thread Hao Wu
This patch set adds peripheral SPI (PSPI) modules to NPCM7XX SoCs. These modules can be used to connect any SPI peripheral devices to the SoC. This module will also be used in the next generation NPCM8XX SoCs which haven't been merged yet. -- Changes from v2 -- Change max_access_size to 2 to

Re: [PATCH v3 1/6] multifd: Create property multifd-sync-after-each-section

2023-02-08 Thread Eric Blake
On Wed, Feb 08, 2023 at 02:30:05PM +0100, Juan Quintela wrote: > We used to synchronize all channels at the end of each RAM section > sent. That is not needed, so preparing to only synchronize once every > full round in latests patches. > > Notice that we initialize the property as true. We

[PATCH v2 1/3] docs: vhost-user: replace _SLAVE_ with _BACKEND_

2023-02-08 Thread Maxime Coquelin
Backend's message and protocol features names were still using "_SLAVE_" naming. For consistency with the new naming convention, replace it with _BACKEND_. Signed-off-by: Maxime Coquelin --- docs/interop/vhost-user.rst | 40 ++--- 1 file changed, 20

[PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_

2023-02-08 Thread Maxime Coquelin
This series continues the work done to switch to a more inclusive terminology in the Vhost-user specification. While the spec texts were changed to replace slave with backend, the protocol features and messages names hadn't been changed. This series renames remaining occurences in the spec and

Re: [PATCH RFCv1 4/8] kvm: Introduce secondary dirty bitmap

2023-02-08 Thread Juan Quintela
Gavin Shan wrote: > When dirty ring is enabled on ARM64, the backup bitmap may be used > to track the dirty pages in no-running-vcpu situations. The original > bitmap is the primary one, used for the dirty ring buffer. We need > the secondary bitmap to collect the backup bitmap for ARM64. > > No

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 19:43, Joel Stanley wrote: > > On Mon, 6 Feb 2023 at 19:51, Titus Rwantare wrote: > > > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > Nice. > > In Linux this is supported by a driver called pca953x. Would it make > sense to name your

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 17:29, Dong, Eddie wrote: > > -Original Message- > > From: qemu-devel-bounces+eddie.dong=intel@nongnu.org > devel-bounces+eddie.dong=intel@nongnu.org> On Behalf Of Titus > > Rwantare > > Sent: Monday, February 6, 2023 11:50 AM > > To:

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 13:38, Philippe Mathieu-Daudé wrote: > > Hi Titus, > > On 6/2/23 20:49, Titus Rwantare wrote: > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > > > Reviewed-by: Hao Wu > > Signed-off-by: Titus Rwantare > > --- > > hw/arm/Kconfig

Re: [PATCH 1/3] hw/gpio: add PCA6414 i2c GPIO expander

2023-02-08 Thread Titus Rwantare
On Mon, 6 Feb 2023 at 14:27, Corey Minyard wrote: > > On Mon, Feb 06, 2023 at 07:49:34PM +, Titus Rwantare wrote: > > This is a simple i2c device that allows i2c capable devices to have > > GPIOs. > > > > Reviewed-by: Hao Wu > > Signed-off-by: Titus Rwantare > > --- > > hw/arm/Kconfig

Re: [PATCH v2 2/3] hw/ssi: Add Nuvoton PSPI Module

2023-02-08 Thread Hao Wu
Thanks for pointing that out. I'll send another version to fix that. On Tue, Feb 7, 2023 at 11:48 PM Philippe Mathieu-Daudé wrote: > On 7/2/23 20:45, Hao Wu wrote: > > Nuvoton's PSPI is a general purpose SPI module which enables > > connections to SPI-based peripheral devices. > > > >

RE: [PULL 28/30] multifd: Fix flush of zero copy page send request

2023-02-08 Thread Duan, Zhenzhong
Hi Juan, >-Original Message- >From: Juan Quintela >Sent: Tuesday, February 7, 2023 8:57 AM >To: qemu-devel@nongnu.org >Cc: qemu-bl...@nongnu.org; Stefan Berger ; >Stefan Hajnoczi ; Halil Pasic ; >John Snow ; David Hildenbrand ; >Fam Zheng ; Thomas Huth ; Daniel P. >Berrangé ; Laurent

Re: [PATCH 1/1] hw/core/cpu: always print cpu index with cpu state

2023-02-08 Thread Alistair Francis
On Tue, Feb 7, 2023 at 9:46 AM Dongli Zhang wrote: > > The cpu_dump_state() does not print the cpu index. When the > cpu_dump_state() is invoked due to the KVM failure, we are not able to tell > from which CPU the state is. The below is an example. > > KVM internal error. Suberror: 764064 >

[PATCH v3 3/4] migration: Add a semaphore to count PONGs

2023-02-08 Thread Peter Xu
This is mostly useless, but useful for us to know whether the main channel is correctly established without changing the migration protocol. Signed-off-by: Peter Xu --- migration/migration.c | 3 +++ migration/migration.h | 6 ++ 2 files changed, 9 insertions(+) diff --git

[PATCH v3 2/4] migration: Cleanup postcopy_preempt_setup()

2023-02-08 Thread Peter Xu
Since we just dropped the only case where postcopy_preempt_setup() can return an error, it doesn't need a retval anymore because it never fails. Move the preempt check to the caller, preparing it to be used elsewhere to do nothing but as simple as kicking the async connection. Signed-off-by:

Re: [PATCH v3 6/6] ram: Document migration ram flags

2023-02-08 Thread Eric Blake
On Wed, Feb 08, 2023 at 02:30:10PM +0100, Juan Quintela wrote: > 0x80 is RAM_SAVE_FLAG_HOOK, it is in qemu-file now. > Bigger usable flag is 0x200, noticing that. > We can reuse RAM_SAVE_FLAG_FULL. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 7 +-- > 1 file changed, 5

RE: [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests

2023-02-08 Thread Taylor Simpson
> -Original Message- > From: Taylor Simpson > Sent: Wednesday, February 8, 2023 9:19 AM > To: a...@rev.ng; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: RE: [PATCH v5 10/14] Hexagon

[PATCH RFC 1/7] Revert "x86: don't let decompressed kernel image clobber setup_data"

2023-02-08 Thread Michael S. Tsirkin
This reverts commit eac7a7791bb6d719233deed750034042318ffd56. Fixes: eac7a7791b ("x86: don't let decompressed kernel image clobber setup_data") Signed-off-by: Michael S. Tsirkin --- include/hw/i386/microvm.h | 5 ++-- include/hw/nvram/fw_cfg.h | 9 --- hw/i386/microvm.c | 15

  1   2   3   4   >