Re: [PATCH v2 1/7] vhost-user: strip superfluous whitespace

2023-09-06 Thread Albert Esteve
On Thu, Aug 31, 2023 at 9:14 AM Laszlo Ersek wrote: > On 8/30/23 15:40, Laszlo Ersek wrote: > > Cc: "Michael S. Tsirkin" (supporter:vhost) > > Cc: Eugenio Perez Martin > > Cc: German Maglione > > Cc: Liu Jiang > > Cc: Sergio Lopez Pascual > > Cc: Stefano Garzarella > > Signed-off-by: Laszlo

Re: [PATCH 01/13] memory: Let ReservedRegion use Range

2023-09-06 Thread David Hildenbrand
On 04.09.23 10:03, Eric Auger wrote: A reserved region is a range tagged with a type. Let's directly use the Range type in the prospect to reuse some of the library helpers shipped with the Range type. Signed-off-by: Eric Auger --- include/exec/memory.h| 4 ++-- hw/core/qdev-prop

Re: [PATCH v5 2/4] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 7:56 AM Philippe Mathieu-Daudé wrote: > Hi Albert, > > On 2/8/23 11:08, Albert Esteve wrote: > > This API manages objects (in this iteration, > > dmabuf fds) that can be shared along different > > virtio devices, associated to a UUID. > > > > The API allows the different de

[PATCH v10 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-09-06 Thread Jeuk Kim
Since v9: - Added the "UFS_" prefix to all define and enum defined in block/ufs.h. This fixes https://gitlab.com/qemu-project/qemu/-/jobs/4977255992 which is a win32 build error. - Fixed not to use pointer type casting (uint32_t * -> unsigned long *). It causes the bug in the find_first_bit() func

[PATCH v10 3/4] hw/ufs: Support for UFS logical unit

2023-09-06 Thread Jeuk Kim
From: Jeuk Kim This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi --- hw/ufs/lu.c | 1445 +++

[PATCH v10 1/4] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-09-06 Thread Jeuk Kim
From: Jeuk Kim Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI device. Patches to hand

[PATCH v10 2/4] hw/ufs: Support for Query Transfer Requests

2023-09-06 Thread Jeuk Kim
From: Jeuk Kim This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi --- hw/ufs/trace-events | 1 + hw/ufs/ufs.c| 988

[PATCH v10 4/4] tests/qtest: Introduce tests for UFS

2023-09-06 Thread Jeuk Kim
From: Jeuk Kim This patch includes the following tests Test mmio read Test ufs device initialization and ufs-lu recognition Test I/O (Performs a write followed by a read to verify) Signed-off-by: Jeuk Kim Acked-by: Thomas Huth Reviewed-by: Stefan Hajnoczi --- MAINTAINERS |

Re: [QEMU PATCH v4 09/13] virtio-gpu: Handle resource blob commands

2023-09-06 Thread Huang Rui
On Wed, Sep 06, 2023 at 11:39:09AM +0800, Akihiko Odaki wrote: > On 2023/09/06 12:09, Huang Rui wrote: > > On Tue, Sep 05, 2023 at 05:20:43PM +0800, Akihiko Odaki wrote: > >> On 2023/09/05 18:08, Huang Rui wrote: > >>> On Thu, Aug 31, 2023 at 06:24:32PM +0800, Akihiko Odaki wrote: > On 2023/08

Re: PCI Hotplug ACPI device names only 3 characters long

2023-09-06 Thread Igor Mammedov
On Tue, 5 Sep 2023 16:43:54 -0400 "Michael S. Tsirkin" wrote: > On Tue, Sep 05, 2023 at 07:45:12PM +0200, Marcello Sylverster Bauer wrote: > > Hi Michael, > > > > On 9/5/23 18:44, Michael S. Tsirkin wrote: > > > On Tue, Sep 05, 2023 at 05:05:33PM +0200, Marcello Sylverster Bauer > > > wrote:

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

2023-09-06 Thread Thomas Huth
On 05/09/2023 17.25, Nina Schoetterl-Glausch wrote: On Tue, 2023-09-05 at 15:26 +0200, Thomas Huth wrote: On 01/09/2023 17.57, Nina Schoetterl-Glausch wrote: From: Pierre Morel On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology

Re: [PATCH v4 12/14] simpletrace: added simplified Analyzer2 class

2023-09-06 Thread Mads Ynddal
> AFAIK, we don't consider simpletrace.py python code to be a > supported public API, just a command line tool. > > IOW, we can change the python code at will, as long as the > command line doesn't alter its behaviour. Thus I don't see > a need to add new classes, just change the existing ones.

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-06 Thread Matias Ezequiel Vara Larsen
On Mon, Aug 28, 2023 at 10:54:57PM +0300, Emmanouil Pitsidianakis wrote: > This patch series adds an audio device implementing the recent virtio > sound spec (1.2) and a corresponding PCI wrapper device. > > v8 can be found online at: > > https://gitlab.com/epilys/qemu/-/tree/virtio-snd-v8 > He

Re: [PATCH] hw/intc/arm_gicv3: Simplify gicv3_class_name() logic

2023-09-06 Thread Francisco Iglesias
On [2023 Sep 05] Tue 16:56:51, Philippe Mathieu-Daudé wrote: > Simplify gicv3_class_name() logic. No functional change intended. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias > --- > hw/intc/arm_gicv3_common.c | 9 - > 1 file changed, 4 insertions(+), 5 del

Re: [PATCH v5 2/4] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 9:42 AM Albert Esteve wrote: > > > On Wed, Sep 6, 2023 at 7:56 AM Philippe Mathieu-Daudé > wrote: > >> Hi Albert, >> >> On 2/8/23 11:08, Albert Esteve wrote: >> > This API manages objects (in this iteration, >> > dmabuf fds) that can be shared along different >> > virtio d

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

2023-09-06 Thread Thomas Huth
On 01/09/2023 17.58, Nina Schoetterl-Glausch wrote: From: Pierre Morel 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. The sam

Re: [PATCH v4 12/14] simpletrace: added simplified Analyzer2 class

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 10:32:14AM +0200, Mads Ynddal wrote: > > > AFAIK, we don't consider simpletrace.py python code to be a > > supported public API, just a command line tool. > > > > IOW, we can change the python code at will, as long as the > > command line doesn't alter its behaviour. Thus

Re: [PATCH v3 4/4] migration/qapi: Drop @MigrationParameter enum

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 06:42:16AM +0200, Philippe Mathieu-Daudé wrote: > On 5/9/23 18:23, Peter Xu wrote: > > Drop the enum in qapi because it is never used in QMP APIs. Instead making > > it an internal definition for QEMU so that we can decouple it from QAPI, > > and also we can deduplicate the

Re: [PATCH v1 7/7] qapi: fix example of NETDEV_STREAM_CONNECTED event

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:46PM +0200, Victor Toso wrote: > Example output was using single quotes. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/net.json | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https:

Re: [PATCH v1 6/7] qapi: fix example of calc-dirty-rate command

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:45PM +0200, Victor Toso wrote: > Example output has property name with single quotes. Fix it. > > Signed-off-by: Victor Toso > --- > qapi/migration.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel

Re: [PATCH v1 5/7] qapi: fix example of set-vcpu-dirty-limit command

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:44PM +0200, Victor Toso wrote: > Example output has extra end curly bracket. Remove it. > > Signed-off-by: Victor Toso > --- > qapi/migration.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |:

Re: [PATCH v1 4/7] qapi: fix example of cancel-vcpu-dirty-limit command

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:43PM +0200, Victor Toso wrote: > Example output has extra end curly bracket. Remove it. > > Signed-off-by: Victor Toso > --- > qapi/migration.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |:

Re: [PATCH v1 3/7] qapi: fix example of dumpdtb command

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:42PM +0200, Victor Toso wrote: > Example output has extra end curly bracket. Switch with comma. > > Signed-off-by: Victor Toso > --- > qapi/machine.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel

Re: [PATCH v1 2/7] qapi: fix example of get-win32-socket command

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:41PM +0200, Victor Toso wrote: > Example output lacks double quotes. Fix it. > > Fixes: 4cda177c60 "qmp: add 'get-win32-socket'" > Signed-off-by: Victor Toso > --- > qapi/misc.json | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berra

Re: [PATCH v8 02/12] Add virtio-sound-pci device

2023-09-06 Thread Mark Cave-Ayland
On 28/08/2023 20:54, Emmanouil Pitsidianakis wrote: Hi Emmanouil, This patch adds a PCI wrapper device for the virtio-sound device. It is necessary to instantiate a virtio-snd device in a guest. All sound logic will be added to the virtio-snd device in the following commits. To add this device

Re: [PATCH v2 1/7] vhost-user: strip superfluous whitespace

2023-09-06 Thread Laszlo Ersek
On 9/6/23 09:12, Albert Esteve wrote: > > > On Thu, Aug 31, 2023 at 9:14 AM Laszlo Ersek > wrote: > > On 8/30/23 15:40, Laszlo Ersek wrote: > > Cc: "Michael S. Tsirkin" mailto:m...@redhat.com>> > (supporter:vhost) > > Cc: Eugenio Perez Martin

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

2023-09-06 Thread Thomas Huth
On 01/09/2023 17.58, Nina Schoetterl-Glausch wrote: From: Pierre Morel 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 Reviewed-by: Nina Schoetterl-Glausch Co-developed-by

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

2023-09-06 Thread Thomas Huth
On 01/09/2023 17.58, Nina Schoetterl-Glausch wrote: From: Pierre Morel 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-cmds.c | 6

Re: [PATCH v1 1/7] qapi: scripts: add a generator for qapi's examples

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:40PM +0200, Victor Toso wrote: > This generator has two goals: > 1. Mechanical validation of QAPI examples > 2. Generate the examples in a JSON format to be consumed for extra > validation. > > The generator iterates over every Example section, parsing both serv

Re: [PATCH v5 2/4] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 10:45, Albert Esteve wrote: > diff --git a/include/hw/virtio/virtio-dmabuf.h b/include/hw/virtio/virtio-dmabuf.h > new file mode 100644 > index 00..536e622555 > --- /dev/null > +++ b/include/hw/virtio/virtio-dmabuf.h

[PATCH v2 01/19] target/riscv: introduce TCG AccelCPUClass

2023-09-06 Thread Daniel Henrique Barboza
target/riscv/cpu.c needs to handle all possible accelerators (TCG and KVM at this moment) during both init() and realize() time. This forces us to resort to a lot of "if tcg" and "if kvm" throughout the code, which isn't wrong, but can get cluttered over time. Splitting acceleration specific code f

[PATCH v2 08/19] target/riscv: move riscv_cpu_add_kvm_properties() to kvm.c

2023-09-06 Thread Daniel Henrique Barboza
We'll introduce the KVM accelerator class with a 'cpu_instance_init' implementation that is going to be invoked during the common riscv_cpu_post_init() (via accel_cpu_instance_init()). This instance_init will execute KVM exclusive code that TCG doesn't care about, such as adding KVM specific proper

[PATCH v2 10/19] target/riscv: remove kvm-stub.c

2023-09-06 Thread Daniel Henrique Barboza
This file is not needed for some time now. All the stubs implemented in it (kvm_riscv_reset_vcpu() and kvm_riscv_set_irq()) are wrapped in 'if kvm_enabled()' blocks that the compiler will rip it out in non-KVM builds. We'll also add non-KVM stubs for all functions declared in kvm_riscv.h. All stub

[PATCH v2 05/19] target/riscv/cpu.c: add .instance_post_init()

2023-09-06 Thread Daniel Henrique Barboza
All generic CPUs call riscv_cpu_add_user_properties(). The 'max' CPU calls riscv_init_max_cpu_extensions(). Both can be moved to a common instance_post_init() callback, implemented in riscv_cpu_post_init(), called by all CPUs. The call order then becomes: riscv_cpu_init() -> cpu_init() of each CPU

[PATCH v2 06/19] target/riscv: move 'host' CPU declaration to kvm.c

2023-09-06 Thread Daniel Henrique Barboza
This CPU only exists if we're compiling with KVM so move it to the kvm specific file. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 16 target/riscv/kvm.c | 21 + 2 files change

[PATCH v2 02/19] target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()

2023-09-06 Thread Daniel Henrique Barboza
riscv_cpu_realize_tcg() was added to allow TCG cpus to have a different realize() path during the common riscv_cpu_realize(), making it a good choice to start moving TCG exclusive code to tcg-cpu.c. Rename it to tcg_cpu_realizefn() and assign it as a implementation of accel::cpu_realizefn(). tcg_c

[PATCH v2 13/19] target/riscv/kvm: do not use riscv_cpu_add_misa_properties()

2023-09-06 Thread Daniel Henrique Barboza
riscv_cpu_add_misa_properties() is being used to fill the missing KVM MISA properties but it is a TCG helper that was adapted to do so. We'll move it to tcg-cpu.c in the next patches, meaning that KVM needs to fill the remaining MISA properties on its own. Do not use riscv_cpu_add_misa_properties(

[PATCH v2 19/19] target/riscv/cpu: move priv spec functions to tcg-cpu.c

2023-09-06 Thread Daniel Henrique Barboza
Priv spec validation is TCG specific. Move it to the TCG accel class. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 38 -- target/riscv/cpu.h | 2 -- target/riscv/tcg/tcg-cpu.c | 38

[PATCH v2 11/19] target/riscv: introduce KVM AccelCPUClass

2023-09-06 Thread Daniel Henrique Barboza
Add a KVM accelerator class like we did with TCG. The difference is that, at least for now, we won't be using a realize() implementation for this accelerator. We'll start by assiging kvm_riscv_cpu_add_kvm_properties(), renamed to kvm_cpu_instance_init(), as a 'cpu_instance_init' implementation. Ch

[PATCH v2 03/19] target/riscv: move riscv_cpu_validate_set_extensions() to tcg-cpu.c

2023-09-06 Thread Daniel Henrique Barboza
This function is the core of the RISC-V validations for TCG CPUs, and it has a lot going on. Functions in cpu.c were made public to allow them to be used by the KVM accelerator class later on. 'cpu_cfg_ext_get_min_version()' is notably hard to move it to another file due to its dependency with isa

Re: [PATCH v1 0/7] Validate and test qapi examples

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 09:48:39PM +0200, Victor Toso wrote: > Hi, > > This is a follow up from the RFC sent in the end of 08-2022: > https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04525.html > > The generator code was rebased, without conflicts. The commit log was > improved as per

[PATCH v2 00/19] riscv: split TCG/KVM accelerators from cpu.c

2023-09-06 Thread Daniel Henrique Barboza
Based-on: 20230901194627.1214811-1-dbarb...@ventanamicro.com ("[PATCH v9 00/20] riscv: 'max' CPU, detect user choice in TCG") Hi, This v2 contains changes suggested by Drew and Phil in v1. The series is now focused in the task at hand (split the accelerators), avoid changing existing behavior.

[PATCH v2 04/19] target/riscv: move riscv_tcg_ops to tcg-cpu.c

2023-09-06 Thread Daniel Henrique Barboza
Move the remaining of riscv_tcg_ops now that we have a working realize() implementation. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 58 target/riscv/cpu.h |

[PATCH v2 16/19] target/riscv/cpu.c: make misa_ext_cfgs[] 'const'

2023-09-06 Thread Daniel Henrique Barboza
The array isn't marked as 'const' because we're initializing their elements in riscv_cpu_add_misa_properties(), 'name' and 'description' fields. In a closer look we can see that we're not using these 2 fields after creating the MISA properties. And we can create the properties by using riscv_get_m

[PATCH v2 12/19] target/riscv: move KVM only files to kvm subdir

2023-09-06 Thread Daniel Henrique Barboza
Move the files to a 'kvm' dir to promote more code separation between accelerators and making our lives easier supporting build options such as --disable-tcg. Rename kvm.c to kvm-cpu.c to keep it in line with its TCG counterpart. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones

[PATCH v2 07/19] target/riscv/cpu.c: mark extensions arrays as 'const'

2023-09-06 Thread Daniel Henrique Barboza
We'll need to export these arrays to the accelerator classes in the next patches. Mark them as 'const' now because they should not be modified at runtime. Note that 'riscv_cpu_options' will also be exported, but can't be marked as 'const', because the properties are changed via qdev_property_add_s

Re: [PATCH v3 07/20] virtio: add vhost-user-base and a generic vhost-user-device

2023-09-06 Thread Matias Ezequiel Vara Larsen
On Tue, Sep 05, 2023 at 06:01:56PM +0100, Alex Bennée wrote: > > Matias Ezequiel Vara Larsen writes: > > > On Mon, Jul 10, 2023 at 04:35:09PM +0100, Alex Bennée wrote: > >> In theory we shouldn't need to repeat so much boilerplate to support > >> vhost-user backends. This provides a generic vhos

Re: [PATCH 05/21] block: Introduce bdrv_schedule_unref()

2023-09-06 Thread Kevin Wolf
Am 05.09.2023 um 18:39 hat Kevin Wolf geschrieben: > Am 22.08.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > > On Thu, Aug 17, 2023 at 02:50:04PM +0200, Kevin Wolf wrote: > > > bdrv_unref() is called by a lot of places that need to hold the graph > > > lock (it naturally happens in the context of

[PATCH v2 14/19] target/riscv/cpu.c: export set_misa()

2023-09-06 Thread Daniel Henrique Barboza
We'll move riscv_init_max_cpu_extensions() to tcg-cpu.c in the next patch and set_misa() needs to be usable from there. Rename it to riscv_cpu_set_misa() and make it public. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 34 ++ target/riscv/cpu.h

[PATCH v2 18/19] target/riscv/cpu.c: export isa_edata_arr[]

2023-09-06 Thread Daniel Henrique Barboza
This array will be read by the TCG accel class, allowing it to handle priv spec verifications on its own. The array will remain here in cpu.c because it's also used by the riscv,isa string function. To export it we'll finish it with an empty element since ARRAY_SIZE() won't work outside of cpu.c.

[PATCH v2 09/19] target/riscv: make riscv_add_satp_mode_properties() public

2023-09-06 Thread Daniel Henrique Barboza
This function is used for both accelerators. Make it public, and call it from kvm_riscv_cpu_add_kvm_properties(). This will make it easier to split KVM specific code for the KVM accelerator class in the next patch. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 5 ++--- target/r

[PATCH v2 15/19] target/riscv/tcg: introduce tcg_cpu_instance_init()

2023-09-06 Thread Daniel Henrique Barboza
tcg_cpu_instance_init() will be the 'cpu_instance_init' impl for the TCG accelerator. It'll be called from within riscv_cpu_post_init(), via accel_cpu_instance_init(), similar to what happens with KVM. In fact, to preserve behavior, the implementation will be similar to what riscv_cpu_post_init() a

[PATCH v2 17/19] target/riscv/tcg: move riscv_cpu_add_misa_properties() to tcg-cpu.c

2023-09-06 Thread Daniel Henrique Barboza
All code related to MISA TCG properties is also moved. At this point, all TCG properties handling is done in tcg-cpu.c, all KVM properties handling is done in kvm-cpu.c. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 90 ---

Re: [PATCH v2 05/19] host-utils: Add muldiv64_round_up

2023-09-06 Thread Cédric Le Goater
On 9/4/23 15:07, Nicholas Piggin wrote: On Sat Sep 2, 2023 at 3:02 AM AEST, Richard Henderson wrote: On 9/1/23 04:51, Cédric Le Goater wrote: Adding more reviewers since this patch is modifying a common service. Thanks, C. On 8/8/23 06:19, Nicholas Piggin wrote: This will be used for conve

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-06 Thread Mark Cave-Ayland
On 28/08/2023 20:55, Emmanouil Pitsidianakis wrote: Hi Emmanouil, Receive guest requests in the control (CTRL) queue of the virtio sound device and reply with a NOT SUPPORTED error to all control commands. The receiving handler is virtio_snd_handle_ctrl(). It stores all control messages in the

[PATCH 2/8] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined

2023-09-06 Thread Denis V. Lunev
This patch also drops definition of some locals in main() to avoid useless data copy. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- qemu-nbd.c | 60 -- 1 file changed, 27 insertions(+), 33 deletions(-) dif

[PATCH 3/8] qemu-nbd: move srcpath into struct NbdClientOpts

2023-09-06 Thread Denis V. Lunev
We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- qemu-nbd.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/qemu-nbd.

[PATCH 5/8] qemu-nbd: invent nbd_client_release_pipe() helper

2023-09-06 Thread Denis V. Lunev
Move the code from main() and nbd_client_thread() into the specific helper. This code is going to be grown. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- qemu-nbd.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a

[PATCH 7/8] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-06 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- docs/tools/qemu-nbd.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tools/qemu-nbd.rst b/docs/tools/qemu-nbd.rst index faf6349ea5..5c48ee7345 100644 --- a/docs/tools/qemu-nbd.rst ++

[PATCH 1/8] qemu-nbd: improve error message for dup2 error

2023-09-06 Thread Denis V. Lunev
This error is happened when we are not able to close the pipe to the parent (to trace errors in the child process) and assign stderr to /dev/null as required by the daemonizing convention. Signed-off-by: Denis V. Lunev Suggested-by: Eric Blake CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --

[PATCH 6/8] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-06 Thread Denis V. Lunev
Closing stderr earlier is good for daemonized qemu-nbd under ssh earlier, but breaks the case where -v is being used to track what is happening in the server, as in iotest 233. When we know we are verbose, we should preserve original stderr and restore it once the setup stage is done. This commit

[PATCH 8/8] qemu-nbd: fix formatting in main()

2023-09-06 Thread Denis V. Lunev
Just a formatting, no functional changes. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- Do not really sure that this patch is mandatory, just stabs my eye. Feel free to drop if this is too useless. qemu-nbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 dele

[PATCH v3 0/8] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-06 Thread Denis V. Lunev
This series contains the fix to the regression introduced with 5c56dd27a2 plus documentation update. Changes from v2: - fixed error message of dup2 (patch #1) - removed options copy as suggested by Eric - moved all other options used in nbd_client_thread() to struct NbdClientOpts for consistency

[PATCH 4/8] qemu-nbd: put saddr into into struct NbdClientOpts

2023-09-06 Thread Denis V. Lunev
We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- qemu-nbd.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qemu-nbd.c b/

Re: [PATCH v5 0/4] Virtio shared dma-buf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 8:13 AM Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 5/9/23 22:45, Michael S. Tsirkin wrote: > > I was hoping for some acks from Gerd or anyone else with a clue > > about graphics, but as that doesn't seem to happen I'll merge. > > Thanks! > > I made few late comments

Re: [PATCH 3/3] sysemu/xen: Allow elision of xen_hvm_modified_memory()

2023-09-06 Thread David Hildenbrand
On 05.09.23 14:21, Philippe Mathieu-Daudé wrote: Call xen_enabled() before xen_hvm_modified_memory() to let the compiler elide its call. Have xen_enabled() return a boolean to match its declaration in the CONFIG_XEN_IS_POSSIBLE case. Suggested-by: Daniel Henrique Barboza Signed-off-by: Philipp

Re: [PATCH v2 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-09-06 Thread Denis V. Lunev
On 7/11/23 19:25, Andrey Drobyshev wrote: Add testcase which checks that allocations during copy-on-read are performed on the subcluster basis when subclusters are enabled in target image. This testcase also triggers the following assert with previous commit not being applied, so we check that a

Re: [PATCH v2 5/7] vhost-user: hoist "write_sync", "get_features", "get_u64"

2023-09-06 Thread Philippe Mathieu-Daudé
On 31/8/23 09:20, Laszlo Ersek wrote: On 8/30/23 15:40, Laszlo Ersek wrote: In order to avoid a forward-declaration for "vhost_user_write_sync" in a subsequent patch, hoist "vhost_user_write_sync" -> "vhost_user_get_features" -> "vhost_user_get_u64" just above "vhost_set_vring". This is purely

Re: [PATCH v3 4/4] migration/qapi: Drop @MigrationParameter enum

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 11:00, Daniel P. Berrangé wrote: On Wed, Sep 06, 2023 at 06:42:16AM +0200, Philippe Mathieu-Daudé wrote: On 5/9/23 18:23, Peter Xu wrote: Drop the enum in qapi because it is never used in QMP APIs. Instead making it an internal definition for QEMU so that we can decouple it from QAPI

Re: [PATCH v5 0/4] Virtio shared dma-buf

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 11:39, Albert Esteve wrote: On Wed, Sep 6, 2023 at 8:13 AM Philippe Mathieu-Daudé > wrote: Hi Michael, On 5/9/23 22:45, Michael S. Tsirkin wrote: > I was hoping for some acks from Gerd or anyone else with a clue > about graphics, but as t

Re: [PATCH v2 14/19] target/riscv/cpu.c: export set_misa()

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 11:16, Daniel Henrique Barboza wrote: We'll move riscv_init_max_cpu_extensions() to tcg-cpu.c in the next patch and set_misa() needs to be usable from there. Rename it to riscv_cpu_set_misa() and make it public. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 34 +++

Re: [PATCH v2 10/19] target/riscv: remove kvm-stub.c

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 11:16, Daniel Henrique Barboza wrote: This file is not needed for some time now. All the stubs implemented in it (kvm_riscv_reset_vcpu() and kvm_riscv_set_irq()) are wrapped in 'if kvm_enabled()' blocks that the compiler will rip it out in non-KVM builds. We'll also add non-KVM stubs f

Re: [PATCH v2] qdict: Preserve order for iterating qdict elements

2023-09-06 Thread David Hildenbrand
On 04.09.23 18:38, Daniel P. Berrangé wrote: On Sat, Sep 02, 2023 at 05:40:40PM +0800, William Tsai wrote: Changing the structure of qdict so that it can preserve order when iterating qdict. This will fix array_properties as it relies on `len-` prefixed argument to be set first. Resolves: https

[PATCH] subprojects: add wrap file for libblkio

2023-09-06 Thread Paolo Bonzini
This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download. Signed-off-by: Paolo Bonzini --- subprojects/libblkio.wrap | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 subprojects/libblkio.wrap diff --git a/subprojects/libb

Re: PCI Hotplug ACPI device names only 3 characters long

2023-09-06 Thread Marcello Sylverster Bauer
Hi Igor, Hi Michael, On 9/6/23 10:19, Igor Mammedov wrote: On Tue, 5 Sep 2023 16:43:54 -0400 "Michael S. Tsirkin" wrote: On Tue, Sep 05, 2023 at 07:45:12PM +0200, Marcello Sylverster Bauer wrote: Hi Michael, On 9/5/23 18:44, Michael S. Tsirkin wrote: On Tue, Sep 05, 2023 at 05:05:33PM +020

Re: [PATCH v3 4/4] migration/qapi: Drop @MigrationParameter enum

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 12:14:54PM +0200, Philippe Mathieu-Daudé wrote: > On 6/9/23 11:00, Daniel P. Berrangé wrote: > > On Wed, Sep 06, 2023 at 06:42:16AM +0200, Philippe Mathieu-Daudé wrote: > > > On 5/9/23 18:23, Peter Xu wrote: > > > > Drop the enum in qapi because it is never used in QMP APIs.

Re: [PATCH 65/67] ppc/kconfig: make SAM460EX depend on PPC & PIXMAN

2023-09-06 Thread Paolo Bonzini
On Tue, Sep 5, 2023 at 10:07 PM Marc-André Lureau wrote: > Indeed, and it is disabled not by Kconfig but by meson: > system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: > files('ati.c', 'ati_2d.c', 'ati_dbg.c')) It's better to add a "depends on", so that it fails to compile with --disable-pi

[PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Albert Esteve
Add three new vhost-user protocol `VHOST_USER_BACKEND_SHARED_OBJECT_* messages`. These new messages are sent from vhost-user back-ends to interact with the virtio-dmabuf table in order to add or remove themselves as virtio exporters, or lookup for virtio dma-buf shared objects. The action taken in

[PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
This API manages objects (in this iteration, dmabuf fds) that can be shared along different virtio devices, associated to a UUID. The API allows the different devices to add, remove and/or retrieve the objects by simply invoking the public functions that reside in the virtio-dmabuf file. For vhos

[PATCH v6 0/3] Virtio shared dma-buf

2023-09-06 Thread Albert Esteve
v1 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg00598.html v2 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg04530.html v3 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg06126.html v4 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-

[PATCH v6 1/3] uuid: add a hash function

2023-09-06 Thread Albert Esteve
Add hash function to uuid module using the djb2 hash algorithm. Add a couple simple unit tests for the hash function, checking collisions for similar UUIDs. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Albert Esteve --- include/qemu/uuid.h| 2 ++ tests/unit/test-uuid.c | 27

Re: CXL Namespaces of ACPI disappearing in Qemu demo

2023-09-06 Thread Yuquan Wang
Hi, Jonathan On 2023-09-05 22:34, jonathan.cameron wrote: > > As I understand it the distinction is more about the format / contents of > that memory > than how you access them. Yes, RCH DP RCRB includes registers from PCIe Type 1 Config Header and PCIe capabilities and extended capabilities w

Re: [PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 1:15 PM Albert Esteve wrote: > This API manages objects (in this iteration, > dmabuf fds) that can be shared along different > virtio devices, associated to a UUID. > > The API allows the different devices to add, > remove and/or retrieve the objects by simply > invoking th

[PATCH v4 00/11] memory-backend-file related improvements and VM templating support

2023-09-06 Thread David Hildenbrand
If there are no more comments, I'll queue this myself soon. --- This is the result of the previous discussion of: * "[PATCH v2] softmmu/physmem: try opening file readonly before failure in file_ram_open" [1] * "[PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements" [2] Afte

[PATCH v4 01/11] nvdimm: Reject writing label data to ROM instead of crashing QEMU

2023-09-06 Thread David Hildenbrand
Currently, when using a true R/O NVDIMM (ROM memory backend) with a label area, the VM can easily crash QEMU by trying to write to the label area, because the ROM memory is mmap'ed without PROT_WRITE. [root@vm-0 ~]# ndctl disable-region region0 disabled 1 region [root@vm-0 ~]# ndctl ze

[PATCH v4 02/11] softmmu/physmem: Distinguish between file access mode and mmap protection

2023-09-06 Thread David Hildenbrand
There is a difference between how we open a file and how we mmap it, and we want to support writable private mappings of readonly files. Let's define RAM_READONLY and RAM_READONLY_FD flags, to replace the single "readonly" parameter for file-related functions. In memory_region_init_ram_from_fd() a

[PATCH v4 03/11] backends/hostmem-file: Add "rom" property to support VM templating with R/O files

2023-09-06 Thread David Hildenbrand
For now, "share=off,readonly=on" would always result in us opening the file R/O and mmap'ing the opened file MAP_PRIVATE R/O -- effectively turning it into ROM. Especially for VM templating, "share=off" is a common use case. However, that use case is impossible with files that lack write permissio

[PATCH v4 04/11] softmmu/physmem: Remap with proper protection in qemu_ram_remap()

2023-09-06 Thread David Hildenbrand
Let's remap with the proper protection that we can derive from RAM_READONLY. Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand --- softmmu/physmem.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/softmmu/physmem.c b/softm

[PATCH v4 06/11] softmmu/physmem: Fail creation of new files in file_ram_open() with readonly=true

2023-09-06 Thread David Hildenbrand
Currently, if a file does not exist yet, file_ram_open() will create new empty file and open it writable. However, it even does that when readonly=true was specified. Specifying O_RDONLY instead to create a new readonly file would theoretically work, however, ftruncate() will refuse to resize the

[PATCH v4 09/11] docs: Start documenting VM templating

2023-09-06 Thread David Hildenbrand
Let's add some details about VM templating, focusing on the VM memory configuration only. There is much more to VM templating (VM state? block devices?), but I leave that as future work. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand --- MAINTAINERS |

[PATCH v4 05/11] softmmu/physmem: Bail out early in ram_block_discard_range() with readonly files

2023-09-06 Thread David Hildenbrand
fallocate() will fail, let's print a nicer error message. Suggested-by: Peter Xu Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- softmmu/physmem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 88482bd32a..c520c2ac55 10064

[PATCH v4 07/11] softmmu/physmem: Never return directories from file_ram_open()

2023-09-06 Thread David Hildenbrand
open() does not fail on directories when opening them readonly (O_RDONLY). Currently, we succeed opening such directories and fail later during mmap(), resulting in a misleading error message. $ ./qemu-system-x86_64 \ -object memory-backend-file,id=ram0,mem-path=tmp,readonly=true,size=1g qem

[PATCH v4 08/11] docs: Don't mention "-mem-path" in multi-process.rst

2023-09-06 Thread David Hildenbrand
"-mem-path" corresponds to "memory-backend-file,share=off" and, therefore, creates a private COW mapping of the file. For multi-proces QEMU, we need proper shared file-backed memory. Let's make that clearer. Signed-off-by: David Hildenbrand --- docs/devel/multi-process.rst | 5 +++-- 1 file cha

[PATCH v4 10/11] softmmu/physmem: Hint that "readonly=on, rom=off" exists when opening file R/W for private mapping fails

2023-09-06 Thread David Hildenbrand
It's easy to miss that memory-backend-file with "share=off" (default) will always try opening the file R/W as default, and fail if we don't have write permissions to the file. In that case, the user has to explicit specify "readonly=on,rom=off" to get usable RAM, for example, for VM templating. L

[PATCH v4 11/11] machine: Improve error message when using default RAM backend id

2023-09-06 Thread David Hildenbrand
For migration purposes, users might want to reuse the default RAM backend id, but specify a different memory backend. For example, to reuse "pc.ram" on q35, one has to set -machine q35,memory-backend=pc.ram Only then, can a memory backend with the id "pc.ram" be created manually. Let's improv

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

2023-09-06 Thread Nina Schoetterl-Glausch
On Wed, 2023-09-06 at 10:21 +0200, Thomas Huth wrote: > On 05/09/2023 17.25, Nina Schoetterl-Glausch wrote: > > On Tue, 2023-09-05 at 15:26 +0200, Thomas Huth wrote: > > > On 01/09/2023 17.57, Nina Schoetterl-Glausch wrote: > > > > From: Pierre Morel > > > > > > > > On interception of STSI(15.1.x

Re: [PATCH v2] qdict: Preserve order for iterating qdict elements

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 12:25:30PM +0200, David Hildenbrand wrote: > On 04.09.23 18:38, Daniel P. Berrangé wrote: > > On Sat, Sep 02, 2023 at 05:40:40PM +0800, William Tsai wrote: > > > Changing the structure of qdict so that it can preserve order when > > > iterating qdict. This will fix array_pro

Re: [PATCH] s390x: do a subsystem reset before the unprotect on reboot

2023-09-06 Thread Viktor Mihajlovski
On Fri, 2023-09-01 at 11:48 +, Janosch Frank wrote: > Bound APQNs have to be reset before tearing down the secure config via > s390_machine_unprotect(). Otherwise the Ultravisor will return a error > code. > > So let's do a subsystem_reset() which includes a AP reset before the > unprotect cal

Re: [PATCH 5/5] cxl/vendor: SK hynix Niagara Multi-Headed SLD Device

2023-09-06 Thread Jonathan Cameron via
On Thu, 31 Aug 2023 21:29:14 -0400 Gregory Price wrote: > Create a new device to emulate the SK hynix Niagara MHSLD platform. > > This device has custom CCI commands that allow for applying isolation > to each memory block between hosts. This enables an early form of > dynamic capacity, whereby

[PATCH] virtio-gpu/win32: set the destroy function on load

2023-09-06 Thread marcandre . lureau
From: Marc-André Lureau Don't forget to unmap the resource memory. Fixes: commit 9462ff469 ("virtio-gpu/win32: allocate shareable 2d resources/images") Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/displ

  1   2   3   >