Re: [PATCH v3 2/4] tests/lcitool: Refresh generated files

2023-07-12 Thread Philippe Mathieu-Daudé
On 12/7/23 13:12, Daniel P. Berrangé wrote: On Wed, Jul 12, 2023 at 01:00:38PM +0200, Philippe Mathieu-Daudé wrote: On 11/7/23 19:58, Daniel P. Berrangé wrote: On Tue, Jul 11, 2023 at 04:49:20PM +0200, Philippe Mathieu-Daudé wrote: Refresh the generated files by running: $ make lcitool-re

Re: [PATCH v7 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-07-12 Thread Markus Armbruster
The subject migration: introduced 'MigrateAddress' in QAPI for migration wire protocol. is rather long. Try to limit subjects to about 60 characters. Easily done here: migration: New QAPI type 'MigrateAddress' Het Gala writes: > This patch introduces well defined MigrateAddress stru

Re: [PATCH v4] kconfig: Add PCIe devices to s390x machines

2023-07-12 Thread Thomas Huth
On 12/07/2023 14.11, Paolo Bonzini wrote: diff --git a/configs/devices/s390x-softmmu/default.mak b/configs/devices/s390x-softmmu/default.mak index f2287a133f36..2d5ff476e32a 100644 --- a/configs/devices/s390x-softmmu/default.mak +++ b/configs/devices/s390x-softmmu/default.mak @@ -7,6 +7,7 @@ #

Re: [PATCH v7 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration

2023-07-12 Thread Markus Armbruster
The subject migration: modified migration QAPIs to accept 'channels' argument for migration is rather long. Try to limit subjects to about 60 characters. Easily done here: migration: New migrate and migrate-incoming argument 'channels' Het Gala writes: > MigrateChannelList allows t

Re: [PATCH v3 2/4] tests/lcitool: Refresh generated files

2023-07-12 Thread Daniel P . Berrangé
On Wed, Jul 12, 2023 at 02:55:10PM +0200, Philippe Mathieu-Daudé wrote: > On 12/7/23 13:12, Daniel P. Berrangé wrote: > > On Wed, Jul 12, 2023 at 01:00:38PM +0200, Philippe Mathieu-Daudé wrote: > > > On 11/7/23 19:58, Daniel P. Berrangé wrote: > > > > On Tue, Jul 11, 2023 at 04:49:20PM +0200, Phili

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Christoph Hellwig
On Wed, Jul 12, 2023 at 10:28:00AM +0200, Stefano Garzarella wrote: > The problem is that the SCSI stack does not send this command, so we > should do it in the driver. In fact we do it for > VIRTIO_SCSI_EVT_RESET_RESCAN (hotplug), but not for > VIRTIO_SCSI_EVT_RESET_REMOVED (hotunplug). No, you s

Re: [PATCH-for-8.1] linux-user/arm: Do not allocate a commpage at all for M-profile CPUs

2023-07-12 Thread Anton Johansson via
On 7/11/23 17:34, Philippe Mathieu-Daudé wrote: Since commit fbd3c4cff6 ("linux-user/arm: Mark the commpage executable") executing bare-metal (linked with rdimon.specs) cortex-M code fails as: $ qemu-arm -cpu cortex-m3 ~/hello.exe.m3 qemu-arm: ../../accel/tcg/user-exec.c:492: page_set_fl

[PATCH 1/3] scsi: fetch unit attention when creating the request

2023-07-12 Thread Stefano Garzarella
Commit 1880ad4f4e ("virtio-scsi: Batched prepare for cmd reqs") split calls to scsi_req_new() and scsi_req_enqueue() in the virtio-scsi device. This had no drawback, until commit 8cc5583abe ("virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events") added a bus unit attention.

[PATCH 2/3] scsi: cleanup scsi_clear_unit_attention()

2023-07-12 Thread Stefano Garzarella
The previous commit moved the unit attention clearing when we create the request. So now we can clean scsi_clear_unit_attention() to handle only the case of the REPORT LUNS command. Suggested-by: Paolo Bonzini Signed-off-by: Stefano Garzarella --- hw/scsi/scsi-bus.c | 28 ++-

[PATCH 3/3] scsi: clear unit attention only for REPORT LUNS commands

2023-07-12 Thread Stefano Garzarella
scsi_clear_unit_attention() now only handles REPORTED LUNS DATA HAS CHANGED. This only happens when we handle REPORT LUNS commands, so let's rename the function in scsi_clear_reported_luns_changed() and call it only in scsi_target_emulate_report_luns(). Suggested-by: Paolo Bonzini Signed-off-by:

[PATCH 0/3] scsi: fix issue with Linux guest and unit attention

2023-07-12 Thread Stefano Garzarella
This series tries to fix a problem highlighted by the commit 8cc5583abe ("virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"). We initially thought about reverting that commit, but now we have found a pre-existing issue introduced by commit 1880ad4f4e ("virtio-scsi: Bat

Re: [PATCH] vdpa: Increase out buffer size for CVQ commands

2023-07-12 Thread Hawkins Jiawei
在 2023/7/12 18:45, Michael Tokarev 写道: > 11.07.2023 04:48, Hawkins Jiawei wrote: > .. >> Sorry for not mentioning that I have moved the patch to the patch series >> titled "Vhost-vdpa Shadow Virtqueue _F_CTRL_RX commands support" at [1]. >> The reason for this move is that the bug in question shoul

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > On 11.07.23 22:23, Stefan Hajnoczi wrote: > > On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > > > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > > > which bdrv_check_qiov_request() does not

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 12:14 PM Stefano Garzarella wrote: > > On Wed, Jul 12, 2023 at 10:06:56AM +0200, Paolo Bonzini wrote: > >On 7/11/23 22:21, Mike Christie wrote: > >>What was the issue you are seeing? > >> > >>Was it something like you get the UA. We retry then on one of the > >>retries the

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

2023-07-12 Thread Pierre Morel
On 7/4/23 13:40, Thomas Huth wrote: On 30/06/2023 11.17, 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/target/s390x/cpu.h b/target/s390x/cpu.h

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Paolo Bonzini
On 7/12/23 15:40, Christoph Hellwig wrote: The problem is that the SCSI stack does not send this command, so we should do it in the driver. In fact we do it for VIRTIO_SCSI_EVT_RESET_RESCAN (hotplug), but not for VIRTIO_SCSI_EVT_RESET_REMOVED (hotunplug). No, you should absolutely no do it in t

[PATCH] docs/system/target-riscv.rst: tidy CPU firmware section

2023-07-12 Thread Daniel Henrique Barboza
This is how the content of the "RISC-V CPU firmware" section is displayed after the html is generated: "When using the sifive_u or virt machine there are three different firmware boot options: 1. -bios default - This is the default behaviour if no -bios option is included. (...) 3. -bios - Tells

Re: [PATCH v4 5/5] amd_iommu: report x2APIC support to the operating system

2023-07-12 Thread Bui Quang Minh
On 7/11/23 01:37, Michael S. Tsirkin wrote: On Fri, Jun 23, 2023 at 10:28:43PM +0700, Bui Quang Minh wrote: On 6/23/23 03:26, Michael S. Tsirkin wrote: On Mon, May 22, 2023 at 11:31:57PM +0700, Bui Quang Minh wrote: This commit adds XTSup configuration to let user choose to whether enable this

Re: [PATCH v21 06/20] s390x/cpu topology: interception of PTF instruction

2023-07-12 Thread Pierre Morel
On 7/4/23 14:16, Thomas Huth wrote: On 30/06/2023 11.17, 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 hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TO

Re: [PATCH v21 08/20] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-07-12 Thread Pierre Morel
On 7/4/23 14:53, Thomas Huth wrote: On 30/06/2023 11.17, 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 optimize the cache usage in the case the host's hypervisor previously moved the CPU.

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Hanna Czenczek
On 12.07.23 16:15, Stefan Hajnoczi wrote: On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: On 11.07.23 22:23, Stefan Hajnoczi wrote: On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, which bdrv_

Re: [PATCH v4 0/5] Support x2APIC mode with TCG accelerator

2023-07-12 Thread Bui Quang Minh
On 7/11/23 01:39, Michael S. Tsirkin wrote: On Mon, May 22, 2023 at 11:31:52PM +0700, Bui Quang Minh wrote: Hi everyone, This series implements x2APIC mode in userspace local APIC and the RDMSR/WRMSR helper to access x2APIC registers in x2APIC mode. Intel iommu and AMD iommu are adjusted to sup

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Peter Maydell
On Wed, 12 Jul 2023 at 15:50, Hanna Czenczek wrote: > There was and is no fix for the Coverity warning. I have mentioned that > warning because the question as to why the code uses > bdrv_check_qiov_request() came in the context of discussing it > (https://lists.nongnu.org/archive/html/qemu-devel

Re: [PATCH v3 03/16] target/riscv: Restrict sysemu specific header to user emulation

2023-07-12 Thread Daniel Henrique Barboza
Phil, This patch breaks the build for me. Applied on top of master: FAILED: libqemu-riscv64-linux-user.fa.p/target_riscv_cpu.c.o cc -m64 -mcx16 -Ilibqemu-riscv64-linux-user.fa.p -I. -I.. -Itarget/riscv -I../target/riscv -I../common-user/host/x86_64 -I../linux-user/include/host/x86_64 -I../lin

Re: [PATCH v4] kconfig: Add PCIe devices to s390x machines

2023-07-12 Thread Paolo Bonzini
On Wed, Jul 12, 2023 at 2:57 PM Thomas Huth wrote: > I think the patch is fine for now, but in the long run, I think we should > make sure to mark PCIe-only devices only with PCIE_DEVICES, as Philippe > suggested. So PCIe devices will then also not show up any more on targets > that only provide a

Re: [PATCH] target/ppc: Generate storage interrupts for radix RC changes

2023-07-12 Thread Shawn Anastasio
Hi Cédric, On 7/12/23 3:27 AM, Cédric Le Goater wrote: > Hello Shawn, > > On 7/12/23 00:24, Shawn Anastasio wrote: >> Change radix64_set_rc to always generate a storage interrupt when the >> R/C bits are not set appropriately instead of setting the bits itself. >> According to the ISA both behavi

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

2023-07-12 Thread Pierre Morel
On 7/4/23 14:55, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel ---   qapi/machine.json  | 9 -   targe

Re: [PATCH v21 10/20] machine: adding s390 topology to info hotpluggable-cpus

2023-07-12 Thread Pierre Morel
On 7/4/23 14:59, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch ---   hw/core/machine-hmp-cmd

Re: [GIT PULL 00/21] Host Memory Backends and Memory devices queue 2023-07-12

2023-07-12 Thread Richard Henderson
On 7/12/23 09:17, David Hildenbrand wrote: The following changes since commit 887cba855bb6ff4775256f7968409281350b568c: configure: Fix cross-building for RISCV host (v5) (2023-07-11 17:56:09 +0100) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git tags

Re: [PATCH v21 11/20] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-07-12 Thread Pierre Morel
On 7/4/23 15:04, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel

Re: [PATCH v21 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-07-12 Thread Pierre Morel
On 7/5/23 09:58, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel ---   qapi/machine-target.json | 29 +   hw/s390x/cpu-topology.c  | 

[PATCH v2] target/ppc: Generate storage interrupts for radix RC changes

2023-07-12 Thread Shawn Anastasio
Change radix model to always generate a storage interrupt when the R/C bits are not set appropriately in a PTE instead of setting the bits itself. According to the ISA both behaviors are valid, but in practice this change more closely matches behavior observed on the POWER9 CPU. >From the POWER9

Re: [PATCH v21 13/20] docs/s390x/cpu topology: document s390x cpu topology

2023-07-12 Thread Pierre Morel
On 7/5/23 10:41, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel ---   MAINTAINERS    |   2 +   docs/devel/index-internals.rst |   1 +   docs/devel/s390-cpu-to

Re: [PATCH 1/3] scsi: fetch unit attention when creating the request

2023-07-12 Thread Paolo Bonzini
On 7/12/23 15:43, Stefano Garzarella wrote: Commit 1880ad4f4e ("virtio-scsi: Batched prepare for cmd reqs") split calls to scsi_req_new() and scsi_req_enqueue() in the virtio-scsi device. This had no drawback, until commit 8cc5583abe ("virtio-scsi: Send More precisely, it was pretty hard to tri

[PATCH 00/10] RISC-V: ACPI: Enable AIA and update RHC

2023-07-12 Thread Sunil V L
This series primarily enables AIA interrupt controllers in ACPI tables for RISC-V virt platform. It also updates RHCT with CMO and MMU related information. Below ECRs for these changes are approved by ASWG and will be available in next ACPI spec release. 1) MADT (AIA) - https://drive.google.com/

[PATCH 04/10] hw/riscv: virt: Add PCIe HIGHMEM in memmap

2023-07-12 Thread Sunil V L
PCIe High MMIO base is actually dynamic and fixed at run time based on the RAM configured. Currently, this is not part of the memmap and kept in separate static variable in virt.c. However, ACPI code also needs this information to populate DSDT. So, once the base is discovered, merge this into the

[PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-07-12 Thread Sunil V L
The functions which add fw_cfg and virtio to DSDT are same for ARM and RISC-V. So, instead of duplicating in RISC-V, move them from hw/arm/virt-acpi-build.c to common aml-build.c. Signed-off-by: Sunil V L --- hw/acpi/aml-build.c | 41 hw/arm/virt-acpi

[PATCH 08/10] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT

2023-07-12 Thread Sunil V L
When CMO related extensions like Zicboz, Zicbom and Zicbop are enabled, the block size for those extensions need to be communicated via CMO node in RHCT. Add CMO node in RHCT if any of those CMO extensions are detected. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 64 +++

[PATCH 06/10] hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT

2023-07-12 Thread Sunil V L
Add IMSIC structure in MADT when IMSIC is configured. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 12b8ef0352..ebdc3bffea 100644 --- a/

[PATCH 10/10] hw/riscv/virt-acpi-build.c: Add IO controllers and devices

2023-07-12 Thread Sunil V L
Add basic IO controllers and devices like PCI, VirtIO and UART in the ACPI namespace. Signed-off-by: Sunil V L --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 87 ++ 2 files changed, 88 insertions(+) diff --git a/hw/riscv/Kconfig b/hw/risc

[PATCH 09/10] hw/riscv/virt-acpi-build.c: Add MMU node in RHCT

2023-07-12 Thread Sunil V L
MMU type information is available via MMU node in RHCT. Add this node in RHCT. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 2d2bd3b97

[PATCH 07/10] hw/riscv/virt-acpi-build.c: Add APLIC in the MADT

2023-07-12 Thread Sunil V L
Add APLIC structures for each socket in the MADT when system is configured with APLIC as the external wired interrupt controller. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/hw/r

[PATCH 05/10] hw/riscv/virt-acpi-build.c: Add AIA support in RINTC

2023-07-12 Thread Sunil V L
Update the RINTC structure in MADT with AIA related fields. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 66 +++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 01843e4509

[PATCH 03/10] hw/riscv: virt: Make few IMSIC macros and functions public

2023-07-12 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 25 + include/hw/riscv/virt.h | 25 + 2 files changed, 26 i

[PATCH 02/10] hw/riscv: virt: Add PCI bus reference in RISCVVirtState

2023-07-12 Thread Sunil V L
The PCI bus information is needed in RISCVVirtState so that other files like virt-acpi-build.c can make use of it. Add new field in RISCVVirtState so that ACPI code can use it. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 6 -- include/hw/riscv/virt.h | 1 + 2 files changed, 5 inse

[PATCH v2] io: remove io watch if TLS channel is closed during handshake

2023-07-12 Thread Daniel P . Berrangé
The TLS handshake make take some time to complete, during which time an I/O watch might be registered with the main loop. If the owner of the I/O channel invokes qio_channel_close() while the handshake is waiting to continue the I/O watch must be removed. Failing to remove it will later trigger the

Re: [PATCH v2] target/ppc: Generate storage interrupts for radix RC changes

2023-07-12 Thread Cédric Le Goater
Hello Shawn, On 7/12/23 18:13, Shawn Anastasio wrote: Change radix model to always generate a storage interrupt when the R/C bits are not set appropriately in a PTE instead of setting the bits itself. According to the ISA both behaviors are valid, but in practice this change more closely matche

Re: [PATCH v4] kconfig: Add PCIe devices to s390x machines

2023-07-12 Thread Cédric Le Goater
diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index 454e0ff4b613..4c068d7960b9 100644 --- a/hw/s390x/Kconfig +++ b/hw/s390x/Kconfig @@ -5,7 +5,8 @@ config S390_CCW_VIRTIO   imply VFIO_AP   imply VFIO_CCW   imply WDT_DIAG288 -    select PCI +    imply PCIE_DEVICES +    select PCI_EXP

Re: [PATCH v2] target/ppc: Generate storage interrupts for radix RC changes

2023-07-12 Thread Shawn Anastasio
On 7/12/23 11:56 AM, Cédric Le Goater wrote: > Hello Shawn, > > On 7/12/23 18:13, Shawn Anastasio wrote: >> Change radix model to always generate a storage interrupt when the R/C >> bits are not set appropriately in a PTE instead of setting the bits >> itself. According to the ISA both behaviors

Re: [PATCH v3 1/4] tests/lcitool: Generate distribution packages list in JSON format

2023-07-12 Thread Warner Losh
On Wed, Jul 12, 2023 at 5:07 AM Philippe Mathieu-Daudé wrote: > On 11/7/23 21:39, Warner Losh wrote: > > On Tue, Jul 11, 2023 at 8:49 AM Philippe Mathieu-Daudé > > mailto:phi...@linaro.org>> wrote: > > > > Add the generate_pkglist() helper to generate a list of packages > > required by a

[PATCH for-8.2 1/7] target/riscv/cpu.c: split CPU options from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
We'll add a new CPU type that will enable a considerable amount of extensions. To make it easier for us we'll do a few cleanups in our existing riscv_cpu_extensions[] array. Start by splitting all CPU non-boolean options from it. Create a new riscv_cpu_options[] array for them. Add all these prope

[PATCH for-8.2 5/7] target/riscv/cpu.c: add a ADD_CPU_PROPERTIES_ARRAY() macro

2023-07-12 Thread Daniel Henrique Barboza
The code inside riscv_cpu_add_user_properties() became quite repetitive after recent changes. Add a macro to hide the repetition away. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/target/ris

[PATCH for-8.2 0/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
Hi, Following the discussions made in [1] I decided to go ahead and implement the 'max' CPU type. It's a CPU that has (almost) all ratified non-vendor extensions enabled by default. Tooling such as libvirt uses this kind of CPU to do capabilities discovery. It's also used for testing purposes. T

[PATCH for-8.2 4/7] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
Create a new riscv_cpu_experimental_exts[] to store the non-ratified extensions properties. Once they are ratified we'll move them back to riscv_cpu_extensions[]. Change riscv_cpu_add_user_properties to keep adding them to users. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 3

[PATCH for-8.2 3/7] target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
Our goal is to make riscv_cpu_extensions[] hold only ratified, non-vendor extensions. Create a new riscv_cpu_vendor_exts[] array for them, changing riscv_cpu_add_user_properties() accordingly. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 34 --

[PATCH for-8.2 2/7] target/riscv/cpu.c: skip 'bool' check when filtering KVM props

2023-07-12 Thread Daniel Henrique Barboza
After the introduction of riscv_cpu_options[] all properties in riscv_cpu_extensions[] are booleans. This check is now obsolete. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/target/riscv/cpu.c b/

[PATCH for-8.2 7/7] avocado, risc-v: add opensbi tests for 'max' CPU

2023-07-12 Thread Daniel Henrique Barboza
Add smoke tests to ensure that we'll not break the 'max' CPU type when adding new ratified extensions to be enabled. Signed-off-by: Daniel Henrique Barboza --- tests/avocado/riscv_opensbi.py | 16 1 file changed, 16 insertions(+) diff --git a/tests/avocado/riscv_opensbi.py b/te

[PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
The 'max' CPU type is used by tooling to determine what's the most capable CPU a current QEMU version implements. Other archs such as ARM implements this type. Let's add it to RISC-V. What we consider "most capable CPU" in this context are related to ratified, non-vendor extensions. This means tha

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 13:39, Sunil V L wrote: The functions which add fw_cfg and virtio to DSDT are same for ARM and RISC-V. So, instead of duplicating in RISC-V, move them from hw/arm/virt-acpi-build.c to common aml-build.c. Nice. Signed-off-by: Sunil V L --- Reviewed-by: Daniel Henrique Barboza

[PATCH v5 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-07-12 Thread Fabiano Rosas
Use the new migrate_incoming_qmp helper in the places that currently open-code calling migrate-incoming. Reviewed-by: Juan Quintela Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 1 + tests/qtest/migration-test.c | 12 ++--- tests/qtest/virtio-

[PATCH v5 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate

2023-07-12 Thread Fabiano Rosas
There is currently no way to write a test for errors that happened in qmp_migrate before the migration has started. Add a version of qmp_migrate that ensures an error happens. To make use of it a test needs to set MigrateCommon.result as MIG_TEST_QMP_ERROR. Reviewed-by: Peter Xu Signed-off-by: F

[PATCH v5 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-07-12 Thread Fabiano Rosas
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently there's no easy way to initiate 'migrate-incoming', allow this by introducing migrate_incoming_qmp helper, similarly to migrate_qmp. Also make sure migration

[PATCH v5 4/6] migration: Set migration status early in incoming side

2023-07-12 Thread Fabiano Rosas
We are sending a migration event of MIGRATION_STATUS_SETUP at qemu_start_incoming_migration but never actually setting the state. This creates a window between qmp_migrate_incoming and process_incoming_migration_co where the migration status is still MIGRATION_STATUS_NONE. Calling query-migrate du

[PATCH v5 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-07-12 Thread Fabiano Rosas
Add basic tests for file-based migration. Note that we cannot use test_precopy_common because that routine expects it to be possible to run the migration live. With the file transport there is no live migration because we must wait for the source to finish writing the migration data to the file be

[PATCH v5 0/6] migration: Test the new "file:" migration

2023-07-12 Thread Fabiano Rosas
Based-on: [PATCH V4 0/2] migration file URI https://lore.kernel.org/r/1688135108-316997-1-git-send-email-steven.sist...@oracle.com Since v4: - Implemented a separate version of test_precopy_common to be used with the file transport (patch 6). v4: https://lore.kernel.org/r/20230706201927.15442-

[PATCH v5 1/6] tests/qtest: migration: Expose migrate_set_capability

2023-07-12 Thread Fabiano Rosas
The following patch will make use of this function from within migrate-helpers.c, so move it there. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 11 +++ tests/qtest/migration-helpers.h | 3

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

2023-07-12 Thread Marc-André Lureau
Hi On Tue, Jul 11, 2023 at 6:57 AM Gurchetan Singh wrote: > 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 grap

Re: [PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-12 Thread John Allen
On Fri, Jul 07, 2023 at 04:25:22PM +0200, Paolo Bonzini wrote: > On 7/6/23 21:40, John Allen wrote: > > case 0x8007: > > *eax = 0; > > -*ebx = 0; > > +*ebx = env->features[FEAT_8000_0007_EBX] | > > CPUID_8000_0007_EBX_SUCCOR; > > *ecx = 0; > >

[PATCH] block/nvme: invoke blk_io_plug_call() outside q->lock

2023-07-12 Thread Stefan Hajnoczi
blk_io_plug_call() is invoked outside a blk_io_plug()/blk_io_unplug() section while opening the NVMe drive from: nvme_file_open() -> nvme_init() -> nvme_identify() -> nvme_admin_cmd_sync() -> nvme_submit_command() -> blk_io_plug_call() blk_io_plug_call() immediately invokes the given

Re: [PATCH] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-12 Thread Stefan Hajnoczi
On Tue, Jul 04, 2023 at 05:15:27PM +0200, Stefan Hajnoczi wrote: > The main loop thread can consume 100% CPU when using --device > virtio-blk-pci,iothread=. ppoll() constantly returns but > reading virtqueue host notifiers fails with EAGAIN. The file descriptors > are stale and remain registered wi

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Conor Dooley
On Wed, Jul 12, 2023 at 04:01:48PM -0300, Daniel Henrique Barboza wrote: > The 'max' CPU type is used by tooling to determine what's the most > capable CPU a current QEMU version implements. Other archs such as ARM > implements this type. Let's add it to RISC-V. > > What we consider "most capable

Re: [PATCH] block: Fix pad_request's request restriction

2023-07-12 Thread Stefan Hajnoczi
On Wed, 12 Jul 2023 at 10:51, Hanna Czenczek wrote: > > On 12.07.23 16:15, Stefan Hajnoczi wrote: > > On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > >> On 11.07.23 22:23, Stefan Hajnoczi wrote: > >>> On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > bdrv_pad

[PULL 1/1] virtio-blk: fix host notifier issues during dataplane start/stop

2023-07-12 Thread Stefan Hajnoczi
The main loop thread can consume 100% CPU when using --device virtio-blk-pci,iothread=. ppoll() constantly returns but reading virtqueue host notifiers fails with EAGAIN. The file descriptors are stale and remain registered with the AioContext because of bugs in the virtio-blk dataplane start/stop

[PULL 0/1] Block patches

2023-07-12 Thread Stefan Hajnoczi
The following changes since commit 887cba855bb6ff4775256f7968409281350b568c: configure: Fix cross-building for RISCV host (v5) (2023-07-11 17:56:09 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to 75dc

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-12 Thread Nina Schoetterl-Glausch
On Wed, 2023-07-05 at 12:22 +0200, Thomas Huth wrote: > On 30/06/2023 11.17, Pierre Morel wrote: > > This test takes care to check the changes on different entitlements > > when the guest requests a polarization change. > > > > Signed-off-by: Pierre Morel > > --- > >   tests/avocado/s390_topology

Re: [PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-07-12 Thread Nina Schoetterl-Glausch
On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: > Introduction of the s390x cpu topology core functions and > basic tests. > > We test the corelation between the command line and corRelation > the QMP results in query-cpus-fast for various CPU topology. > > Signed-off-by: Pierre Morel

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-12 Thread Thomas Huth
On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22 +0200, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test takes care to check the changes on different entitlements when the guest requests a polarization change. Signed-off-by: Pierre Morel ---

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

2023-07-12 Thread Thomas Huth
On 12/07/2023 16.24, Pierre Morel wrote: On 7/4/23 13:40, Thomas Huth wrote: On 30/06/2023 11.17, 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

Re: [PATCH 02/10] hw/riscv: virt: Add PCI bus reference in RISCVVirtState

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 13:39, Sunil V L wrote: The PCI bus information is needed in RISCVVirtState so that other files like virt-acpi-build.c can make use of it. Add new field in RISCVVirtState so that ACPI code can use it. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 6 -- include/hw/r

Re: [PATCH 03/10] hw/riscv: virt: Make few IMSIC macros and functions public

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 13:39, Sunil V L wrote: Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L --- Reviewed-by: Daniel Henrique Barboza hw/riscv/virt.c | 25 +

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 16:22, Conor Dooley wrote: On Wed, Jul 12, 2023 at 04:01:48PM -0300, Daniel Henrique Barboza wrote: The 'max' CPU type is used by tooling to determine what's the most capable CPU a current QEMU version implements. Other archs such as ARM implements this type. Let's add it to RISC-V

Re: [PATCH] linux-user: make sure brk(0) returns a page-aligned value

2023-07-12 Thread Helge Deller
On 7/8/23 23:36, Helge Deller wrote: On 7/8/23 19:26, Richard Henderson wrote: On 7/6/23 12:34, Andreas Schwab wrote: Fixes: 86f04735ac ("linux-user: Fix brk() to release pages") Signed-off-by: Andreas Schwab ---   linux-user/syscall.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH for-8.2 v2 2/7] target/riscv/cpu.c: skip 'bool' check when filtering KVM props

2023-07-12 Thread Daniel Henrique Barboza
After the introduction of riscv_cpu_options[] all properties in riscv_cpu_extensions[] are booleans. This check is now obsolete. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/target/riscv/cpu.c b/

[PATCH for-8.2 v2 1/7] target/riscv/cpu.c: split CPU options from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
We'll add a new CPU type that will enable a considerable amount of extensions. To make it easier for us we'll do a few cleanups in our existing riscv_cpu_extensions[] array. Start by splitting all CPU non-boolean options from it. Create a new riscv_cpu_options[] array for them. Add all these prope

[PATCH for-8.2 v2 3/7] target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
Our goal is to make riscv_cpu_extensions[] hold only ratified, non-vendor extensions. Create a new riscv_cpu_vendor_exts[] array for them, changing riscv_cpu_add_user_properties() accordingly. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 34 --

[PATCH for-8.2 v2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
The 'max' CPU type is used by tooling to determine what's the most capable CPU a current QEMU version implements. Other archs such as ARM implements this type. Let's add it to RISC-V. What we consider "most capable CPU" in this context are related to ratified, non-vendor extensions. This means tha

[PATCH for-8.2 v2 5/7] target/riscv/cpu.c: add a ADD_CPU_PROPERTIES_ARRAY() macro

2023-07-12 Thread Daniel Henrique Barboza
The code inside riscv_cpu_add_user_properties() became quite repetitive after recent changes. Add a macro to hide the repetition away. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/target/ris

[PATCH for-8.2 v2 0/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
Hi, This second version has smalls tweak in patch 6 that I found out missing while chatting with Conor in the v1 review. Changes from v1: - patch 6: - enable RVG, RVJ and RVV in riscv_init_max_cpu_extensions() - Added the resulting 'riscv,isa' DT in the commit message - v1 link: https://lore

[PATCH for-8.2 v2 7/7] avocado, risc-v: add opensbi tests for 'max' CPU

2023-07-12 Thread Daniel Henrique Barboza
Add smoke tests to ensure that we'll not break the 'max' CPU type when adding new ratified extensions to be enabled. Signed-off-by: Daniel Henrique Barboza --- tests/avocado/riscv_opensbi.py | 16 1 file changed, 16 insertions(+) diff --git a/tests/avocado/riscv_opensbi.py b/te

[PATCH for-8.2 v2 4/7] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[]

2023-07-12 Thread Daniel Henrique Barboza
Create a new riscv_cpu_experimental_exts[] to store the non-ratified extensions properties. Once they are ratified we'll move them back to riscv_cpu_extensions[]. Change riscv_cpu_add_user_properties to keep adding them to users. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 3

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Conor Dooley
On Wed, Jul 12, 2023 at 05:30:41PM -0300, Daniel Henrique Barboza wrote: > On 7/12/23 16:22, Conor Dooley wrote: > > On Wed, Jul 12, 2023 at 04:01:48PM -0300, Daniel Henrique Barboza wrote: > > > The 'max' CPU type is used by tooling to determine what's the most > > > capable CPU a current QEMU ver

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 18:00, Conor Dooley wrote: On Wed, Jul 12, 2023 at 05:30:41PM -0300, Daniel Henrique Barboza wrote: On 7/12/23 16:22, Conor Dooley wrote: On Wed, Jul 12, 2023 at 04:01:48PM -0300, Daniel Henrique Barboza wrote: The 'max' CPU type is used by tooling to determine what's the most ca

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Conor Dooley
On Wed, Jul 12, 2023 at 06:09:10PM -0300, Daniel Henrique Barboza wrote: > It is intentional. Those default marchid/mimpid vals were derived from the > current > QEMU version ID/build and didn't mean much. > > It is still possible to set them via "-cpu rv64,marchid=N,mimpid=N" if needed > when

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Daniel Henrique Barboza
On 7/12/23 18:35, Conor Dooley wrote: On Wed, Jul 12, 2023 at 06:09:10PM -0300, Daniel Henrique Barboza wrote: It is intentional. Those default marchid/mimpid vals were derived from the current QEMU version ID/build and didn't mean much. It is still possible to set them via "-cpu rv64,marc

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

2023-07-12 Thread Akihiko Odaki
On 2023/07/11 11:56, Gurchetan Singh wrote: This adds basic documentation for virtio-gpu. Thank you for adding documentation for other backends too. I have been asked how virtio-gpu works so many times and always had to explain by myself though Gerd does have a nice article.* This documentati

Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type

2023-07-12 Thread Conor Dooley
On Wed, Jul 12, 2023 at 06:39:28PM -0300, Daniel Henrique Barboza wrote: > On 7/12/23 18:35, Conor Dooley wrote: > > On Wed, Jul 12, 2023 at 06:09:10PM -0300, Daniel Henrique Barboza wrote: > > > > > It is intentional. Those default marchid/mimpid vals were derived from > > > the current > > > QE

Re: [PATCH v4] kconfig: Add PCIe devices to s390x machines

2023-07-12 Thread Akihiko Odaki
On 2023/07/12 19:48, Philippe Mathieu-Daudé wrote: Hi Cédric, On 12/7/23 10:01, Cédric Le Goater wrote: It is useful to extend the number of available PCIe devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture. Introduce a new c

Re: [PATCH v1 0/5] target/arm: Handle psci calls in userspace

2023-07-12 Thread Gavin Shan
Hi Salil, On 7/4/23 19:58, Salil Mehta wrote: Latest Qemu Prototype (Pre RFC V2) (Not in the final shape of the patches) https://github.com/salil-mehta/qemu.git    virt-cpuhp-armv8/rfc-v1-port11052023.dev-1 should work against below kernel changes as confirmed by James, Latest Kernel Protot

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

2023-07-12 Thread Gurchetan Singh
On Wed, Jul 12, 2023 at 2:40 PM Akihiko Odaki wrote: > > On 2023/07/11 11:56, Gurchetan Singh wrote: > > This adds basic documentation for virtio-gpu. > > Thank you for adding documentation for other backends too. I have been > asked how virtio-gpu works so many times and always had to explain by

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

2023-07-12 Thread Gurchetan Singh
On Wed, Jul 12, 2023 at 12:15 PM Marc-André Lureau wrote: > > Hi > > On Tue, Jul 11, 2023 at 6:57 AM Gurchetan Singh > wrote: >> >> 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 th

<    1   2   3   >