Re: [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)

2023-02-06 Thread Cédric Le Goater
On 2/3/23 22:16, Philippe Mathieu-Daudé wrote: part 1 [*] cover: -- QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review. I first converte

Re: [PATCH 2/3] hw/isa/vt82c686: Allow PM controller to switch to ACPI mode

2023-02-06 Thread Philippe Mathieu-Daudé
On 31/1/23 15:54, BALATON Zoltan wrote: On Sun, 29 Jan 2023, Bernhard Beschow wrote: Adds missing functionality the real hardware supports. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c68

Re: [PATCH 2/3] hw/isa/vt82c686: Allow PM controller to switch to ACPI mode

2023-02-06 Thread Philippe Mathieu-Daudé
Forgot to Cc ACPI maintainers. On 6/2/23 09:00, Philippe Mathieu-Daudé wrote: On 31/1/23 15:54, BALATON Zoltan wrote: On Sun, 29 Jan 2023, Bernhard Beschow wrote: Adds missing functionality the real hardware supports. Signed-off-by: Bernhard Beschow --- hw/isa/vt82c686.c | 18 +++

Re: [PATCH 5/5] hw/ppc/pnv: Set QDev properties using QDev API

2023-02-06 Thread Cédric Le Goater
On 2/3/23 22:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. One call in pnv_psi_power8_realize() propagate the Error* argument: if (!object_property_set_int(OBJECT(ics), "nr-irqs",

Re: [PATCH 4/5] hw/ppc/spapr: Set QDev properties using QDev API

2023-02-06 Thread Cédric Le Goater
On 2/3/23 22:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=&error_abort or &error_fatal, so converting to the QDev API is almost a no-op (QDev API always uses &e

Re: [PATCH v2 2/9] tests: fix test-io-channel-command on win32

2023-02-06 Thread Thomas Huth
On 29/01/2023 19.24, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau socat "PIPE:"" on Windows are named pipes, not fifo path names. Fixes: commit 68406d10859 ("tests/unit: cleanups for test-io-channel-command") Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-comm

Re: [PATCH 1/1] hw/loongarch/virt: add system_powerdown hmp command support

2023-02-06 Thread gaosong
Ping !! 在 2023/1/31 下午8:05, gaosong 写道: Ping ! 在 2023/1/12 下午2:11, Song Gao 写道: For loongarch virt machine, add powerdown notification callback and send ACPI_POWER_DOWN_STATUS event by acpi ged. Also add acpi dsdt table for ACPI_POWER_BUTTON_DEVICE device in this patch. Signed-off-by: Song Ga

Re: [PATCH v2 2/9] tests: fix test-io-channel-command on win32

2023-02-06 Thread Philippe Mathieu-Daudé
On 29/1/23 19:24, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau socat "PIPE:"" on Windows are named pipes, not fifo path names. Fixes: commit 68406d10859 ("tests/unit: cleanups for test-io-channel-command") Signed-off-by: Marc-André Lureau --- tests/unit/test-io-channel-command

Re: [PULL 00/11] Net patches

2023-02-06 Thread Laurent Vivier
On 2/5/23 13:36, Peter Maydell wrote: On Sat, 4 Feb 2023 at 20:09, Laurent Vivier wrote: On 2/4/23 15:57, Peter Maydell wrote: On Thu, 2 Feb 2023 at 06:21, Jason Wang wrote: The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: Merge tag 'block-pull-request' of

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

2023-02-06 Thread Juan Quintela
Thomas Huth wrote: > On 03/02/2023 22.14, Juan Quintela wrote: >> Peter Maydell wrote: >>> On Fri, 3 Feb 2023 at 15:44, Thomas Huth wrote: On 03/02/2023 13.08, Kevin Wolf wrote: > Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: >> On 30/01/2023 11.58, Daniel P. Berrangé wro

[PATCH] hw/riscv: virt: Simplify virt_{get,set}_aclint()

2023-02-06 Thread Bin Meng
There is no need to declare an intermediate "MachineState *ms". Signed-off-by: Bin Meng --- hw/riscv/virt.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4a11b4b010..bdb6b93115 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c

Re: [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)

2023-02-06 Thread Mark Cave-Ayland
On 06/02/2023 08:00, Cédric Le Goater wrote: On 2/3/23 22:16, Philippe Mathieu-Daudé wrote: part 1 [*] cover: -- QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-06 Thread Mark Cave-Ayland
On 06/02/2023 06:51, Philippe Mathieu-Daudé wrote: On 5/2/23 23:32, Mark Cave-Ayland wrote: On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the caller which d

Re: [PATCH] hw/riscv: virt: Simplify virt_{get,set}_aclint()

2023-02-06 Thread Philippe Mathieu-Daudé
On 6/2/23 09:50, Bin Meng wrote: There is no need to declare an intermediate "MachineState *ms". Signed-off-by: Bin Meng --- hw/riscv/virt.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

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

2023-02-06 Thread Juan Quintela
Peter Maydell wrote: > On Fri, 3 Feb 2023 at 21:14, Juan Quintela wrote: >> >> Peter Maydell wrote: >> > The migration tests have been flaky for a while now, >> > including setups where host and guest page sizes are the same. >> > (For instance, my x86 macos box pretty reliably sees failures >>

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12:54 PM Sunil V L wrote: > > ACPI is optional. So, add a switch to toggle. > > Signed-off-by: Sunil V L > --- > hw/riscv/virt.c | 38 ++ > include/hw/riscv/virt.h | 2 ++ > 2 files changed, 40 insertions(+) > > diff --git a/hw/

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

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12: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 > --- > hw/riscv/virt.c

Re: Qemu - how to run in Win?

2023-02-06 Thread Philippe Mathieu-Daudé
Cc'ing Yonggang & Stefan. On 5/2/23 13:01, Jacob A wrote: Hello, After installing Qemu on Win, I don't see any shortcut to run it? There is only a link to 'uninstall'. launching exe files doesn't do anything. Can you please explain how to launch this application? Thanks, J. Please see the

Re: [PATCH v3 8/9] hw/i386/x86: Make TYPE_X86_MACHINE the owner of smram

2023-02-06 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 4/2/23 16:10, Bernhard Beschow wrote: >> Treat the smram MemoryRegion analoguous to other memory regions such as >> ram, pci, io, ... , making the used memory regions more explicit when >> instantiating q35 or i440fx. >> Note that the q35 device uses these memory

Re: [PATCH v15 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-06 Thread Pierre Morel
On 2/3/23 18:36, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology

Re: [PATCH v15 04/11] s390x/sclp: reporting the maximum nested topology entries

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Mo

Re: [PATCH 04/10] hw/riscv/virt: virt-acpi-build.c: Add basic ACPI tables

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12:54 PM Sunil V L wrote: > > Add few basic ACPI tables and DSDT with few devices in a > new file virt-acpi-build.c. > > These are mostly leveraged from arm64. There are lots of same ACPI codes existing in x86/arm/riscv. I believe some refactoring work is needed before ACPI

Re: Qemu - how to run in Win?

2023-02-06 Thread Bin Meng
On Mon, Feb 6, 2023 at 5:55 PM Philippe Mathieu-Daudé wrote: > > Cc'ing Yonggang & Stefan. > > On 5/2/23 13:01, Jacob A wrote: > > Hello, > > > > After installing Qemu on Win, I don't see any shortcut to run it? There > > is only a link to 'uninstall'. launching exe files doesn't do anything. > >

Re: [PATCH v15 04/11] s390x/sclp: reporting the maximum nested topology entries

2023-02-06 Thread Pierre Morel
On 2/6/23 11:13, Thomas Huth wrote: On 01/02/2023 14.20, Pierre Morel wrote: The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support book

[PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-06 Thread Markus Armbruster
Commit eed56e9a89f "configure, meson: move config-poison.h to meson" lost a "| sort -u". Restore it. config-poison shrinks from ~4500 to ~700 lines when all targets are enabled. Signed-off-by: Markus Armbruster --- scripts/make-config-poison.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 07/10] hw/riscv: meson.build: Build virt-acpi-build.c

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12:53 PM Sunil V L wrote: > > ACPI functions are defined in new file virt-acpi-build.c. Enable > it to be built as part of virt machine if CONFIG_ACPI is set. > > Signed-off-by: Sunil V L > --- > hw/riscv/meson.build | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by:

Re: [PATCH 08/10] hw/riscv/Kconfig: virt: Enable ACPI config options

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12:54 PM Sunil V L wrote: > > Enable ACPI related config options to build ACPI subsystem > for virt machine. > > Signed-off-by: Sunil V L > --- > hw/riscv/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig > index 4550b3

Re: [PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-06 Thread Marc-André Lureau
On Mon, Feb 6, 2023 at 2:21 PM Markus Armbruster wrote: > > Commit eed56e9a89f "configure, meson: move config-poison.h to meson" > lost a "| sort -u". Restore it. config-poison shrinks from ~4500 to > ~700 lines when all targets are enabled. > > Signed-off-by: Markus Armbruster Reviewed-by: Ma

Re: [PATCH 09/10] hw/riscv/virt.c: Initialize the ACPI tables

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12:53 PM Sunil V L wrote: > > When the "acpi=on", ACPI tables need to be added. Detect the option > and initialize the ACPI tables. > > Signed-off-by: Sunil V L > --- > hw/riscv/virt.c | 4 > 1 file changed, 4 insertions(+) > Reviewed-by: Bin Meng

Re: [PATCH v15 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-06 Thread Nina Schoetterl-Glausch
On Mon, 2023-02-06 at 11:06 +0100, Pierre Morel wrote: > > On 2/3/23 18:36, Nina Schoetterl-Glausch wrote: > > On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: > > > > On interception of STSI(15.1.x) the System Information Block > > > > (SYSIB) is built from the list of pre-ordered topology

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

2023-02-06 Thread Bin Meng
On Thu, Feb 2, 2023 at 12: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 > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Bin Meng

Re: Qemu - how to run in Win?

2023-02-06 Thread Jacob A
Understood, thanks. Will stick to GUI app. On Mon, 6 Feb 2023 at 11:19, Bin Meng wrote: > On Mon, Feb 6, 2023 at 5:55 PM Philippe Mathieu-Daudé > wrote: > > > > Cc'ing Yonggang & Stefan. > > > > On 5/2/23 13:01, Jacob A wrote: > > > Hello, > > > > > > After installing Qemu on Win, I don't see a

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

2023-02-06 Thread Peter Maydell
On Mon, 6 Feb 2023 at 08:46, Juan Quintela wrote: > 31/659 qemu:qtest+qtest-aarch64 / qtest-aarch64/migration-test > ERROR 48.23s killed by signal 6 SIGABRT > >>> G_TEST_DBUS_DAEMON=/home/gitlab-runner/builds/-LCfcJ2T/0/qemu-project/qemu/tests/dbus-vmstate-daemon.sh

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Andrea Bolognani
On Thu, Feb 02, 2023 at 10:22:15AM +0530, Sunil V L wrote: > +object_class_property_add(oc, "acpi", "OnOffAuto", > + virt_get_acpi, virt_set_acpi, > + NULL, NULL); > +object_class_property_set_description(oc, "acpi", > +

Re: [PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-06 Thread Philippe Mathieu-Daudé
On 6/2/23 11:20, Markus Armbruster wrote: Commit eed56e9a89f "configure, meson: move config-poison.h to meson" lost a "| sort -u". Restore it. config-poison shrinks from ~4500 to ~700 lines when all targets are enabled. Signed-off-by: Markus Armbruster --- scripts/make-config-poison.sh | 2

Re: [PATCH v15 05/11] s390x/cpu topology: resetting the Topology-Change-Report

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel --- ... diff --git a/hw/s390x/

Re: [PATCH 1/1] hw/loongarch/virt: add system_powerdown hmp command support

2023-02-06 Thread Philippe Mathieu-Daudé
On 12/1/23 07:11, Song Gao wrote: For loongarch virt machine, add powerdown notification callback and send ACPI_POWER_DOWN_STATUS event by acpi ged. Also add acpi dsdt table for ACPI_POWER_BUTTON_DEVICE device in this patch. Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 1 + hw/

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Philippe Mathieu-Daudé
On 6/2/23 11:54, Andrea Bolognani wrote: On Thu, Feb 02, 2023 at 10:22:15AM +0530, Sunil V L wrote: +object_class_property_add(oc, "acpi", "OnOffAuto", + virt_get_acpi, virt_set_acpi, + NULL, NULL); +object_class_property_set_desc

[PATCH RFCv1 2/8] memory: Add last stage indicator to global dirty log synchronization

2023-02-06 Thread Gavin Shan
The global dirty log synchronization is used when KVM and dirty ring are enabled. There is a particularity for ARM64 where the backup bitmap is used to track dirty pages in non-running-vcpu situations. It means the dirty ring works with the combination of ring buffer and backup bitmap. The dirty bi

[PATCH RFCv1 0/8] hw/arm/virt: Support dirty ring

2023-02-06 Thread Gavin Shan
This series intends to support dirty ring for live migration. The dirty ring use discrete buffer to track dirty pages. For ARM64, the speciality is to use backup bitmap to track dirty pages when there is no-running-vcpu context. It's known that the backup bitmap needs to be synchronized when KVM de

[PATCH RFCv1 1/8] linux-headers: Update for dirty ring

2023-02-06 Thread Gavin Shan
Signed-off-by: Gavin Shan --- linux-headers/asm-arm64/kvm.h | 1 + linux-headers/linux/kvm.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h index 4bf2d7246e..a7cfefb3a8 100644 --- a/linux-headers/asm-arm64/kvm.h +++ b/linux

[PATCH RFCv1 3/8] migration: Add last stage indicator to global dirty log synchronization

2023-02-06 Thread Gavin Shan
For the pre-copy live migration scenario, the last stage indicator is needed for KVM backend to collect the dirty pages from the backup bitmap when dirty ring is used. The indicator isn't used so far. No functional change intended. Signed-off-by: Gavin Shan --- migration/ram.c | 16

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

2023-02-06 Thread Gavin Shan
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 functional change intended. Si

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

2023-02-06 Thread Gavin Shan
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 --- accel/kvm/kvm-all.c | 10 -- 1 file changed, 8 insertions(+), 2 dele

[PATCH RFCv1 7/8] hw/arm/virt: Enable backup bitmap for dirty ring

2023-02-06 Thread Gavin Shan
When KVM device "kvm-arm-gicv3" or "arm-its-kvm" is used, we have to enable the backup bitmap for the dirty ring. Otherwise, the migration will fail because those two devices are using the backup bitmap to track dirty guest memory, corresponding to various hardware tables. Signed-off-by: Gavin Sha

[PATCH RFCv1 5/8] kvm: Synchronize secondary bitmap in last stage

2023-02-06 Thread Gavin Shan
In the last stage of live migration or memory slot removal, the backup bitmap needs to be synchronized. Signed-off-by: Gavin Shan --- accel/kvm/kvm-all.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 1a93985574..9ec117c441 100644 --- a

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

2023-02-06 Thread Gavin Shan
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 kvm_dirty_ring_init() to enable the dirty ri

Re: [PATCH v15 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index d3ade40a5a..712fd68123

Re: [PULL 00/16] ppc queue

2023-02-06 Thread Peter Maydell
On Sun, 5 Feb 2023 at 10:04, Daniel Henrique Barboza wrote: > > The following changes since commit ceabf6e500570ecfb311d8896c4ba9da8cf21f2a: > > Merge tag 'linux-user-for-8.0-pull-request' of > https://gitlab.com/laurent_vivier/qemu into staging (2023-02-04 17:17:15 > +) > > are available

Re: [PATCH v15 06/11] s390x/cpu topology: interception of PTF instruction

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation s/hypervizor/hypervisor/ by using the KVM_CAP_S390_CPU_TOPOLOGY KVM

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

2023-02-06 Thread Eugenio Perez Martin
On Sun, Feb 5, 2023 at 2:57 PM Stefan Hajnoczi wrote: > > On Sun, 5 Feb 2023 at 03:15, Eugenio Perez Martin wrote: > > > > On Fri, Jan 27, 2023 at 4:18 PM Stefan Hajnoczi wrote: > > > > > > Dear QEMU, KVM, and rust-vmm communities, > > > QEMU will apply for Google Summer of Code 2023 > > > (http

Re: [PATCH v15 07/11] target/s390x/cpu topology: activating CPU topology

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled b

Re: [PATCH v15 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-02-06 Thread Stefan Hajnoczi
)(_On Sun, 29 Jan 2023 at 05:30, Sam Li wrote: > > Add zoned device option to host_device BlockDriver. It will be presented only > for zoned host block devices. By adding zone management operations to the > host_block_device BlockDriver, users can use the new block layer APIs > including Report Zo

Re: [PATCH v15 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-02-06 Thread Sam Li
Stefan Hajnoczi 于2023年2月6日周一 20:04写道: > > )(_On Sun, 29 Jan 2023 at 05:30, Sam Li wrote: > > > > Add zoned device option to host_device BlockDriver. It will be presented > > only > > for zoned host block devices. By adding zone management operations to the > > host_block_device BlockDriver, user

[PATCH 0/9] target/arm: Housekeeping around NVIC

2023-02-06 Thread Philippe Mathieu-Daudé
Few cleanups while using link properties between CPU/NVIC: - Restrict code to sysemu|useremu or tcg - Simplify ID_PFR1 on useremu - Move NVIC helpersto "hw/intc/armv7m_nvic.h" Something odd occurs when an ARM CPU is realized, the CPU reset handler is called, ending calling armv7m_nvic_neg_prio_req

Re: [PATCH v15 8/8] docs/zoned-storage: add zoned device documentation

2023-02-06 Thread Stefan Hajnoczi
On Sun, 29 Jan 2023 at 05:31, Sam Li wrote: > > Add the documentation about the zoned device support to virtio-blk > emulation. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Damien Le Moal > Reviewed-by: Dmitry Fomichev > --- > docs/devel/zoned-storage.rst

[PATCH 1/9] target/arm: Restrict v7-M MMU helpers to sysemu TCG

2023-02-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 2 +- target/arm/m_helper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index c62ed05c12..5dbeade787 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c

[PATCH 5/9] target/arm: Restrict CPUARMState::gicv3state to sysemu

2023-02-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 01d478e9ce..61681101a5 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -772,10 +772,10 @@ typedef struct CPUArchStat

[PATCH 2/9] target/arm: Constify ID_PFR1 on user emulation

2023-02-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 5dbeade787..b58800a1a5 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7021,6 +7021,7 @@ s

[PATCH 7/9] target/arm: Declare CPU <-> NVIC helpers in 'hw/intc/armv7m_nvic.h'

2023-02-06 Thread Philippe Mathieu-Daudé
While dozens of files include "cpu.h", only 3 files require these NVIC helper declarations. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/armv7m_nvic.h | 123 ++ target/arm/cpu.c | 4 +- target/arm/cpu.h | 123 --

[PATCH 8/9] hw/intc/armv7m_nvic: Allow calling neg_prio_requested on unrealized NVIC

2023-02-06 Thread Philippe Mathieu-Daudé
armv7m_nvic_neg_prio_requested() is called via arm_cpu_reset_hold() during CPU realize() time, when the NVIC isn't yet realized: (lldb) bt * frame #0: 0x10059ed5c armv7m_nvic_neg_prio_requested(opaque=0x1180087b0, secure=true) at armv7m_nvic.c:404:9 frame #1: 0x100383018 arm_v7m_mmu_idx_f

[PATCH 9/9] hw/arm/armv7m: Pass CPU/NVIC using object_property_add_const_link()

2023-02-06 Thread Philippe Mathieu-Daudé
Avoid having QOM objects poke at each other internals. Instead, pass references using QOM link properties. Signed-off-by: Philippe Mathieu-Daudé --- Cc: Mark Cave-Ayland --- hw/arm/armv7m.c | 4 ++-- hw/intc/armv7m_nvic.c | 3 ++- target/arm/cpu.c | 3 ++- 3 files changed, 6 insertio

[PATCH 6/9] target/arm: Restrict CPUARMState::nvic to sysemu and store as NVICState*

2023-02-06 Thread Philippe Mathieu-Daudé
There is no point in using a void pointer to access the NVIC. Use the real type to avoid casting it while debugging. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/armv7m_nvic.c | 38 ++--- include/hw/intc/armv7m_nvic.h | 5 +--- target/arm/cpu.c

[PATCH 3/9] target/arm: Avoid resetting CPUARMState::eabi field

2023-02-06 Thread Philippe Mathieu-Daudé
Although the 'eabi' field is only used in user emulation where CPU reset doesn't occur, it doesn't belong to the area to reset. Move it after the 'end_reset_fields' for consistency. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 9 - 1 file changed, 4 insertions(+), 5 delet

[PATCH 4/9] target/arm: Restrict CPUARMState::arm_boot_info to sysemu

2023-02-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index bbbcf2e153..01d478e9ce 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -770,9 +770,10 @@ typedef struct CPUArchState {

Re: [PATCH v15 8/8] docs/zoned-storage: add zoned device documentation

2023-02-06 Thread Sam Li
Stefan Hajnoczi 于2023年2月6日周一 20:16写道: > > On Sun, 29 Jan 2023 at 05:31, Sam Li wrote: > > > > Add the documentation about the zoned device support to virtio-blk > > emulation. > > > > Signed-off-by: Sam Li > > Reviewed-by: Stefan Hajnoczi > > Reviewed-by: Damien Le Moal > > Reviewed-by: Dmitry

Re: [PATCH v15 08/11] qapi/s390x/cpu topology: x-set-cpu-topology monitor command

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimise I'm not a native speaker, but "optimize" is more common, I think? the cache usage in the case the host's hypervi

Re: [PULL 04/35] tests/unit: drop hacky race avoidance in test-io-channel-command

2023-02-06 Thread Philippe Mathieu-Daudé
Hi Alex, Thomas. On 26/1/23 12:22, Alex Bennée wrote: We don't need to play timing games to ensure one socat wins over the other, just create the fifo they both can use before spawning the processes. However in the process we need to disable two tests for Windows platforms as we don't have an ab

Re: [PATCH v8 0/8] Introduce igb

2023-02-06 Thread Akihiko Odaki
Hi Jason, Let me remind that every patches in this series now has Reviewed-by: or Acked-by: tag though I forgot to include tags the prior versions of this series received to the latest version: "Introduce igb" https://lore.kernel.org/qemu-devel/dbbp189mb143365704198dc9a0684dea595...@dbbp189mb

[PATCH v9 00/14] vfio/migration: Implement VFIO migration protocol v2

2023-02-06 Thread Avihai Horon
Hello, This v9 of the series adds a patch to block multiple devices migration and removes redundant P2P code. Note that when Juan's pull request [1] is merged, I will rebase this series on it and send a v10. Following VFIO migration protocol v2 acceptance in kernel, this series implements VFIO m

[PATCH v9 03/14] vfio/migration: Fix NULL pointer dereference bug

2023-02-06 Thread Avihai Horon
As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is started or stopped not during migration a

[PATCH v9 02/14] migration: No save_live_pending() method uses the QEMUFile parameter

2023-02-06 Thread Avihai Horon
From: Juan Quintela So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 3 +-- migration/savevm.h | 3 +-- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration

[PATCH v9 01/14] linux-headers: Update to v6.2-rc1

2023-02-06 Thread Avihai Horon
Update to commit 1b929c02afd3 ("Linux 6.2-rc1"). Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Reviewed-by: Michael S. Tsirkin --- include/standard-headers/drm/drm_fourcc.h | 63 +++- include/standard-headers/linux/ethtool.h | 81 - include/standard-headers/linux/fus

[PATCH] build: make meson-buildoptions.sh stable

2023-02-06 Thread Paolo Bonzini
The library directory can change depending on the multilib setup of the host. It would be even better to detect it in configure with the same algorithm that Meson uses, but the important thing to avoid confusing developers is to have identical contents of scripts/meson-buildoptions.sh, independent

[PATCH v9 07/14] vfio/migration: Block multiple devices migration

2023-02-06 Thread Avihai Horon
Currently VFIO migration doesn't implement some kind of intermediate quiescent state in which P2P DMAs are quiesced before stopping or running the device. This can cause problems in multi-device migration where the devices are doing P2P DMAs, since the devices are not stopped together at the same t

[PATCH v9 04/14] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-02-06 Thread Avihai Horon
Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked. This is because a DMA-able VFIO device can dirty RAM pages without updating QEMU about it, thus breaking the migration. However, this doesn't mean that migration can't be done at all. In such case, a

[PATCH v9 05/14] migration/qemu-file: Add qemu_file_get_to_fd()

2023-02-06 Thread Avihai Horon
Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cédric Le Goater --- migration/qemu-file.h

[PATCH v9 09/14] vfio/migration: Rename functions/structs related to v1 protocol

2023-02-06 Thread Avihai Horon
To avoid name collisions, rename functions and structs related to VFIO migration protocol v1. This will allow the two protocols to co-exist when v2 protocol is added, until v1 is removed. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vf

[PATCH v9 08/14] vfio/migration: Move migration v1 logic to vfio_migration_init()

2023-02-06 Thread Avihai Horon
Move vfio_dev_get_region_info() logic from vfio_migration_probe() to vfio_migration_init(). This logic is specific to v1 protocol and moving it will make it easier to add the v2 protocol implementation later. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goate

[PATCH v9 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-02-06 Thread Avihai Horon
Implement the basic mandatory part of VFIO migration protocol v2. This includes all functionality that is necessary to support VFIO_MIGRATION_STOP_COPY part of the v2 protocol. The two protocols, v1 and v2, will co-exist and in the following patches v1 protocol code will be removed. There are sev

[PATCH v9 06/14] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one

2023-02-06 Thread Avihai Horon
vfio_devices_all_running_and_saving() is used to check if migration is in pre-copy phase. This is done by checking if migration is in setup or active states and if all VFIO devices are in pre-copy state, i.e. _SAVING | _RUNNING. In VFIO migration protocol v2 pre-copy support is made optional. Henc

[PATCH v9 13/14] vfio: Alphabetize migration section of VFIO trace-events file

2023-02-06 Thread Avihai Horon
Sort the migration section of VFIO trace events file alphabetically and move two misplaced traces to common.c section. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- hw/vfio/trace-events | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/

[PATCH v9 11/14] vfio/migration: Optimize vfio_save_pending()

2023-02-06 Thread Avihai Horon
During pre-copy phase of migration vfio_save_pending() is called repeatedly and queries the VFIO device for its pending data size. As long as pending RAM size is over the threshold, migration can't converge and be completed. Therefore, during this time there is no point in querying the VFIO device

[PATCH v9 14/14] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-06 Thread Avihai Horon
Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 protocol. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- docs/devel/vfio-migration.rst | 68 --- 1 file changed, 30

[PATCH v9 12/14] vfio/migration: Remove VFIO migration protocol v1

2023-02-06 Thread Avihai Horon
Now that v2 protocol implementation has been added, remove the deprecated v1 implementation. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 5 - hw/vfio/common.c | 17 +- hw/vfio/migration.c | 703 +

vhost-user (virtio-fs) migration: back end state

2023-02-06 Thread Hanna Czenczek
Hi Stefan, For true virtio-fs migration, we need to migrate the daemon’s (back end’s) state somehow.  I’m addressing you because you had a talk on this topic at KVM Forum 2021. :) As far as I understood your talk, the only standardized way to migrate a vhost-user back end’s state is via dbus

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Andrew Jones
On Mon, Feb 06, 2023 at 12:18:06PM +0100, Philippe Mathieu-Daudé wrote: > On 6/2/23 11:54, Andrea Bolognani wrote: > > On Thu, Feb 02, 2023 at 10:22:15AM +0530, Sunil V L wrote: > > > +object_class_property_add(oc, "acpi", "OnOffAuto", > > > + virt_get_acpi, virt_se

Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: S390x provides two more topology containers above the sockets, books and drawers. books and drawers are already handled via the entries in CpuInstanceProperties, so this sentence looks like a wrong leftover now? I'd suggest talking about "dedication"

Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-06 Thread Thomas Huth
On 01/02/2023 14.20, Pierre Morel wrote: S390x provides two more topology containers above the sockets, books and drawers. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel --- qapi/machine.json | 13 ++--- hw/core/machine-qmp-cm

Re: [PATCH v5 1/3] arm/virt: don't try to spell out the accelerator

2023-02-06 Thread Eric Auger
Hi Connie, On 2/3/23 14:44, Cornelia Huck wrote: > Just use current_accel_name() directly. > > Signed-off-by: Cornelia Huck Reviewed-by: Eric Auger Thanks Eric > --- > hw/arm/virt.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c

Re: [PATCH] meson: Avoid duplicates in generated config-poison.h again

2023-02-06 Thread Alex Bennée
Markus Armbruster writes: > Commit eed56e9a89f "configure, meson: move config-poison.h to meson" > lost a "| sort -u". Restore it. config-poison shrinks from ~4500 to > ~700 lines when all targets are enabled. > > Signed-off-by: Markus Armbruster Reviewed-by: Alex Bennée Tested-by: Alex Be

Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-06 Thread Daniel P . Berrangé
On Mon, Feb 06, 2023 at 01:41:44PM +0100, Thomas Huth wrote: > On 01/02/2023 14.20, Pierre Morel wrote: > > S390x provides two more topology containers above the sockets, > > books and drawers. > > > > Let's add these CPU attributes to the QAPI command query-cpu-fast. > > > > Signed-off-by: Pierr

Re: [PATCH v15 05/11] s390x/cpu topology: resetting the Topology-Change-Report

2023-02-06 Thread Pierre Morel
On 2/6/23 12:05, Thomas Huth wrote: On 01/02/2023 14.20, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Gerd Hoffmann
On Mon, Feb 06, 2023 at 12:18:06PM +0100, Philippe Mathieu-Daudé wrote: > On 6/2/23 11:54, Andrea Bolognani wrote: > > On Thu, Feb 02, 2023 at 10:22:15AM +0530, Sunil V L wrote: > > > +object_class_property_add(oc, "acpi", "OnOffAuto", > > > + virt_get_acpi, virt_se

Re: [PATCH v15 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-02-06 Thread Pierre Morel
On 2/6/23 12:24, Thomas Huth wrote: On 01/02/2023 14.20, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... ... --- a/target/s390x/cpu.h +++ b/target/s390x/

Re: [PATCH 18/19] hw/rx: Set QDev properties using QDev API

2023-02-06 Thread Yoshinori Sato
On Sat, 04 Feb 2023 03:09:13 +0900, Philippe Mathieu-Daudé wrote: > > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/rx/rx-gdbsim.c | 11 +-- > 1 file chang

Re: [PATCH v15 06/11] s390x/cpu topology: interception of PTF instruction

2023-02-06 Thread Pierre Morel
On 2/6/23 12:38, Thomas Huth wrote: On 01/02/2023 14.20, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation s/hypervizor/hypervisor/ gr

Re: [PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-06 Thread Sunil V L
On Mon, Feb 06, 2023 at 01:35:20PM +0100, Andrew Jones wrote: > On Mon, Feb 06, 2023 at 12:18:06PM +0100, Philippe Mathieu-Daudé wrote: > > On 6/2/23 11:54, Andrea Bolognani wrote: > > > On Thu, Feb 02, 2023 at 10:22:15AM +0530, Sunil V L wrote: > > > > +object_class_property_add(oc, "acpi", "O

Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast

2023-02-06 Thread Thomas Huth
On 06/02/2023 13.49, Daniel P. Berrangé wrote: On Mon, Feb 06, 2023 at 01:41:44PM +0100, Thomas Huth wrote: On 01/02/2023 14.20, Pierre Morel wrote: S390x provides two more topology containers above the sockets, books and drawers. Let's add these CPU attributes to the QAPI command query-cpu-fa

Re: [PATCH v5 2/3] arm/kvm: add support for MTE

2023-02-06 Thread Eric Auger
Hi, On 2/3/23 21:40, Richard Henderson wrote: > On 2/3/23 03:44, Cornelia Huck wrote: >> +static void aarch64_cpu_get_mte(Object *obj, Visitor *v, const char >> *name, >> +    void *opaque, Error **errp) >> +{ >> +    ARMCPU *cpu = ARM_CPU(obj); >> +    OnOffAuto mte =

  1   2   3   4   5   >