Re: [PATCH v5 1/4] x86: return modified setup_data only if read as memory, not as file

2022-09-22 Thread Paolo Bonzini
On Wed, 21 Sep 2022 11:31:31 +0200, Jason A. Donenfeld wrote: > If setup_data is being read into a specific memory location, then > generally the setup_data address parameter is read first, so that the > caller knows where to read it into. In that case, we should return > setup_data containing the

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: > Ease of use matters, too. When sticking to the rule leads to awkward > code, we should stop and think. Should we deviate from the rule? Or > can we avoid that by tweaking the interface? > > Philippe's proposed interface

[PATCH 03/26] qcow2: remove incorrect coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
This is incorrect because qcow2_mark_clean() calls qcow2_flush_caches(). qcow2_mark_clean() is called from non-coroutine context in qcow2_inactivate() and qcow2_amend_options(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 4 ++--

[PATCH 07/26] blkverify: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/blkverify.c | 2 +- 1 file changed, 1

[PATCH 08/26] file-posix: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/file-posix.c | 2 +- 1 file changed, 1

Re: [PATCH v3] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Gerd Hoffmann
On Thu, Sep 22, 2022 at 04:55:16AM -0400, Michael S. Tsirkin wrote: > On Thu, Sep 22, 2022 at 10:43:56AM +0200, Gerd Hoffmann wrote: > > In case phys bits are functional and can be used by the guest (aka > > host-phys-bits=on) add a fw_cfg file carrying the value. This can > > be used by the

Re: [PATCH] watchdog: remove -watchdog option

2022-09-22 Thread Thomas Huth
On 22/09/2022 11.29, Paolo Bonzini wrote: This was deprecated in 6.2 and is ready to go. It removes quite a bit of code that handled the registration of watchdog models. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 5 docs/about/removed-features.rst | 5

Re: [PATCH v2] hw/ide/piix: Ignore writes of hardwired PCI command register bits

2022-09-22 Thread Michael S. Tsirkin
On Tue, Sep 06, 2022 at 10:23:57AM -0400, Michael S. Tsirkin wrote: > On Thu, Jun 02, 2022 at 08:47:31PM +, Lev Kujawski wrote: > > One method to enable PCI bus mastering for IDE controllers, often used > > by x86 firmware, is to write 0x7 to the PCI command register. Neither > > the PIIX3

Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C

2022-09-22 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > The has_FOO for pointer-valued FOO are redundant, except for arrays. > They are also a nuisance to work with. Recent commit "qapi: Start to > elide redundant has_FOO in generated C" provided the means to elide > them step by step. This is the step

Re: [PATCH v7 04/14] hw/ppc: set machine->fdt in ppce500_load_device_tree()

2022-09-22 Thread Philippe Mathieu-Daudé via
+David/Peter On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the e500 machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Claudio Fontana writes: > On 9/21/22 14:16, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 16/9/22 11:27, Markus Armbruster wrote: Claudio Fontana writes: > improve error handling during module load, by changing: > > bool module_load_one(const char

[PATCH 2/3] hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b.

2022-09-22 Thread Tommy Wu
Create the AON device when we realize the sifive_e machine. This patch only implemented the functionality of the watchdog timer, not all the functionality of the AON device. Signed-off-by: Tommy Wu --- hw/riscv/Kconfig| 1 + hw/riscv/sifive_e.c | 5 +++--

[PATCH 01/26] block/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine context

2022-09-22 Thread Paolo Bonzini
nvme_get_free_req has very difference semantics when called in coroutine context (where it waits) and in non-coroutine context (where it doesn't). Split the two cases to make it clear what is being requested. Cc: qemu-bl...@nongnu.org Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini ---

[PATCH 25/26] migration: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi Reviewed-by:

[PATCH 17/26] qed: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 18/26] quorum: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/quorum.c | 35 ++- 1 file

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 11:20:07AM +0200, Claudio Fontana wrote: > On 9/22/22 10:28, Daniel P. Berrangé wrote: > > > >> Another interface that does: return -1 for error, 0 for module not found > >> (no error), and 1 for loaded. > > > > IMHO this pattern is generally easier to understand when

Re: [PATCH v2 35/39] tests/qtest: migration-test: Skip running some TLS cases for win32

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 10:47:26AM +0800, Bin Meng wrote: > On Thu, Sep 22, 2022 at 1:23 AM Daniel P. Berrangé > wrote: > > > > On Wed, Sep 21, 2022 at 05:51:33PM +0100, Dr. David Alan Gilbert wrote: > > > * Bin Meng (bmeng...@gmail.com) wrote: > > > > From: Bin Meng > > > > > > > > Some

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 09:34:41AM +0800, Jason Wang wrote: > On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > wrote: > > > > If I read your response on the other thread correctly, this change is > > intended > > > > to prioritize the MAC address exposed by DPDK over the one provided by the > >

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: >> Ease of use matters, too. When sticking to the rule leads to awkward >> code, we should stop and think. Should we deviate from the rule? Or >> can we avoid that by tweaking the interface? >> >>

Re: [PATCH v7 03/14] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for all nios2 machines that uses nios2_load_dtb(). Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Daniel Henrique Barboza --- hw/nios2/boot.c | 8 +++- hw/nios2/meson.build | 2

Re: [PATCH v3] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:43:56AM +0200, Gerd Hoffmann wrote: > In case phys bits are functional and can be used by the guest (aka > host-phys-bits=on) add a fw_cfg file carrying the value. This can > be used by the guest firmware for address space configuration. > > This is only enabled for

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-09-22 Thread Michal Prívozník
On 9/21/22 16:54, David Hildenbrand wrote: > On 21.09.22 16:44, Michal Prívozník wrote: >> On 7/21/22 14:07, David Hildenbrand wrote: >>> >> >> Ping? Is there any plan how to move forward? I have libvirt patches >> ready to consume this and I'd like to prune my old local branches :-) > > Heh, I

[PATCH] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-22 Thread Bernhard Beschow
SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is registered as a machine. Fixes: 0869490b1c

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-22 Thread B
Am 21. September 2022 04:55:02 UTC schrieb Markus Armbruster : >Bernhard Beschow writes: > >> Am 20. September 2022 11:36:47 UTC schrieb Markus Armbruster >> : >>>Alistair Francis writes: >>> On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: > > SiFiveEState inherits

[PATCH 02/26] block: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Paolo Bonzini --- block.c | 6 +++--- block/block-backend.c | 10 +- block/io.c|

[PATCH 10/26] nbd: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/nbd.c | 10 +- 1 file changed, 5

[PATCH 24/26] 9p: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Acked-by: Greg Kurz Reviewed-by: Alberto Faria Signed-off-by: Paolo

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 11:38, Markus Armbruster wrote: > Daniel P. Berrangé writes: > >> On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: >>> Ease of use matters, too. When sticking to the rule leads to awkward >>> code, we should stop and think. Should we deviate from the rule? Or >>>

[PATCH 23/26] raw-format: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/raw-format.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Wed, Sep 21, 2022 at 07:23:12PM +0100, Alex Bennée wrote: >> >> chenh writes: >> >> > From: Hao Chen >> > >> > When use dpdk-vdpa tests vdpa device. You need to specify the mac address >> > to >> > start the virtual machine through libvirt or qemu, but

Re: [PATCH v8 13/14] net: stream: move to QIO

2022-09-22 Thread Markus Armbruster
Laurent Vivier writes: > On 9/21/22 16:58, Markus Armbruster wrote: >> Laurent Vivier writes: >> >>> Use QIOChannel, QIOChannelSocket and QIONetListener. >>> >>> Signed-off-by: Laurent Vivier >>> --- >> [...] >> >>> diff --git a/qemu-options.hx b/qemu-options.hx >>> index

Re: [PATCH v7 14/14] qmp/hmp, device_tree.c: introduce dumpdtb

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text dts format using 'dtc'. There's nothing particularly sophisticated

Re: [PATCH] qga: fix possible memory leak

2022-09-22 Thread Konstantin Kostiuk
On Wed, Sep 21, 2022 at 5:53 PM Markus Armbruster wrote: > luzhipeng writes: > > > From: lu zhipeng > > > > Signed-off-by: lu zhipeng > > --- > > qga/main.c | 19 ++- > > 1 file changed, 14 insertions(+), 5 deletions(-) > > > > diff --git a/qga/main.c b/qga/main.c > > index

Re: [PATCH v7 00/14] QMP/HMP: introduce 'dumpdtb'

2022-09-22 Thread Daniel Henrique Barboza
Ping We're missing just patch 14/14. I'll leave non-acked patches behind and, if no one is strongly against it, I'll push both the dumpdtb implementation and the ppc parts via the ppc tree. Alistair, I can also push the riscv bits through the ppc tree if it's easier for you. Thanks, Daniel

[PATCH 20/26] vmdk: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/vmdk.c | 20 ++-- 1 file changed, 10

[PATCH 04/26] nbd: remove incorrect coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
nbd_co_establish_connection_cancel() cancels a coroutine but is not called from coroutine context itself, for example in nbd_cancel_in_flight() and in timer callbacks reconnect_delay_timer_cb() and open_timer_cb(). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini

[PATCH 11/26] nfs: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 09/26] iscsi: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/iscsi.c | 2 +- 1 file changed, 1

[PATCH 05/26] coroutine: remove incorrect coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
qemu_coroutine_get_aio_context inspects a coroutine, but it does not have to be called from the coroutine itself (or from any coroutine). Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 2 +- util/qemu-coroutine.c| 2 +- 2

[PATCH 15/26] copy-before-write: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/copy-before-write.c | 8 1 file changed, 4

[PATCH] watchdog: remove -watchdog option

2022-09-22 Thread Paolo Bonzini
This was deprecated in 6.2 and is ready to go. It removes quite a bit of code that handled the registration of watchdog models. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 5 docs/about/removed-features.rst | 5 hw/watchdog/sbsa_gwdt.c | 6 -

[PATCH 13/26] parallels: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/parallels.c | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: [PATCH v7 10/14] hw/ppc: set machine->fdt in spapr machine

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce a QMP/HMP command to dump the FDT, which will rely on setting machine->fdt properly to work

[PATCH 06/26] blkdebug: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/blkdebug.c | 14 +++--- 1 file

[PATCH 12/26] nvme: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/nvme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 10:28, Daniel P. Berrangé wrote: > On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: >> Ease of use matters, too. When sticking to the rule leads to awkward >> code, we should stop and think. Should we deviate from the rule? Or >> can we avoid that by tweaking the

Re: [PATCH v3] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:43:56AM +0200, Gerd Hoffmann wrote: > In case phys bits are functional and can be used by the guest (aka > host-phys-bits=on) add a fw_cfg file carrying the value. This can > be used by the guest firmware for address space configuration. > > This is only enabled for

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:02:56AM +0100, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Wed, Sep 21, 2022 at 07:23:12PM +0100, Alex Bennée wrote: > >> > >> chenh writes: > >> > >> > From: Hao Chen > >> > > >> > When use dpdk-vdpa tests vdpa device. You need to specify the mac

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 11:21, Claudio Fontana wrote: > On 9/22/22 11:20, Claudio Fontana wrote: >> On 9/22/22 10:28, Daniel P. Berrangé wrote: >>> On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: Ease of use matters, too. When sticking to the rule leads to awkward code, we should

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 11:34:22AM +0200, Claudio Fontana wrote: > On 9/22/22 11:31, Daniel P. Berrangé wrote: > > On Thu, Sep 22, 2022 at 11:20:07AM +0200, Claudio Fontana wrote: > >> On 9/22/22 10:28, Daniel P. Berrangé wrote: > >>> > Another interface that does: return -1 for error, 0 for

Re: [PULL 00/12] Publish1 patches

2022-09-22 Thread Peter Maydell
On Wed, 21 Sept 2022 at 00:00, Helge Deller wrote: > > The following changes since commit 621da7789083b80d6f1ff1c0fb499334007b4f51: > > Update version for v7.1.0 release (2022-08-30 09:40:11 -0700) > > are available in the Git repository at: > > https://github.com/hdeller/qemu-hppa.git

Re: [PATCH v2 00/66] target/arm: Implement FEAT_HAFDBS

2022-09-22 Thread Peter Maydell
On Mon, 22 Aug 2022 at 16:28, Richard Henderson wrote: > > This is a major reorg to arm page table walking. While the result > here is "merely" Hardware-assited Access Flag and Dirty Bit Setting > (HAFDBS), the ultimate goal is the Realm Management Extension (RME). > RME "recommends" that HAFDBS

Re: [PATCH v7 12/14] hw/riscv: set machine->fdt in spike_board_init()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for the 'dumpdtb' QMP/HMP command for the spike machine. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/spike.c | 6 ++ 1

[PATCH v3] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Gerd Hoffmann
In case phys bits are functional and can be used by the guest (aka host-phys-bits=on) add a fw_cfg file carrying the value. This can be used by the guest firmware for address space configuration. This is only enabled for 7.2+ machine types for live migration compatibility reasons.

[PATCH v3 00/26] block: fix coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
As discussed at KVM Forum 2022, I am reposting this series to add more coroutine_fn annotations. Fixing the annotations enables static analysis of which functions are coroutine-only and which are mixed (coroutine/non-coroutine). A lot of the patches are similar to the ones that Marc-André Lureau

[PATCH 19/26] throttle: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 14/26] qcow2: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/qcow2-cluster.c | 18 +- block/qcow2-refcount.c

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 11:31, Daniel P. Berrangé wrote: > On Thu, Sep 22, 2022 at 11:20:07AM +0200, Claudio Fontana wrote: >> On 9/22/22 10:28, Daniel P. Berrangé wrote: >>> Another interface that does: return -1 for error, 0 for module not found (no error), and 1 for loaded. >>> >>> IMHO this

Re: [PATCH v8 13/14] net: stream: move to QIO

2022-09-22 Thread Laurent Vivier
On 9/21/22 16:58, Markus Armbruster wrote: Laurent Vivier writes: Use QIOChannel, QIOChannelSocket and QIONetListener. Signed-off-by: Laurent Vivier --- [...] diff --git a/qemu-options.hx b/qemu-options.hx index ee2436ae14a7..a0b5b70c80cb 100644 --- a/qemu-options.hx +++

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 11:20, Claudio Fontana wrote: > On 9/22/22 10:28, Daniel P. Berrangé wrote: >> On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: >>> Ease of use matters, too. When sticking to the rule leads to awkward >>> code, we should stop and think. Should we deviate from the

[PATCH 22/26] coroutine-lock: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- util/qemu-coroutine-lock.c | 14 +++--- 1 file changed, 7

Re: [PATCH] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-22 Thread Frank Chang
Hi Bernhard, I think there's already a similar patch for this bug fix: https://www.mail-archive.com/qemu-devel@nongnu.org/msg905424.html Regards, Frank Chang On Thu, Sep 22, 2022 at 3:53 PM Bernhard Beschow wrote: > SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to >

[PATCH 3/3] tests/qtest: sifive-e-aon-watchdog-test.c : Add QTest of watchdog of sifive_e

2022-09-22 Thread Tommy Wu
Add some simple tests of the watchdog timer in the always-on domain device of HiFive 1 rev b. Signed-off-by: Tommy Wu --- tests/qtest/meson.build | 3 + tests/qtest/sifive-e-aon-watchdog-test.c | 400 +++ 2 files changed, 403 insertions(+) create mode

[PATCH 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2022-09-22 Thread Tommy Wu
The watchdog timer is in the always-on domain device of HiFive 1 rev b, so this patch added the AON device to the sifive_e machine. This patch only implemented the functionality of the watchdog timer. Signed-off-by: Tommy Wu --- hw/misc/Kconfig| 3 + hw/misc/meson.build

[PATCH 26/26] test-coroutine: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
From: Marc-André Lureau Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini ---

[PATCH 16/26] curl: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 21/26] job: add missing coroutine_fn annotations

2022-09-22 Thread Paolo Bonzini
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Reviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini --- include/qemu/job.h | 2 +- job.c | 2 +- 2 files changed,

Re: [PATCH v3] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:37:10AM +0200, Gerd Hoffmann wrote: > On Thu, Sep 22, 2022 at 04:55:16AM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 10:43:56AM +0200, Gerd Hoffmann wrote: > > > In case phys bits are functional and can be used by the guest (aka > > > host-phys-bits=on)

Re: [PATCH v7 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Setting machine->fdt requires a MachineState pointer to be used inside sam460ex_load_device_tree(). Let's change the function to receive this pointer from the caller.

Re: [PATCH v7 11/14] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-09-22 Thread Philippe Mathieu-Daudé via
On 8/9/22 21:40, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/sifive_u.c | 3 +++ 1

Re: [PATCH] include/hw/riscv/sifive_e.h: Fix the type of parent_obj of SiFiveEState.

2022-09-22 Thread Tommy Wu
To the maintainers: Thank Alistair and Jim for the review. Bernhard Beschow sent the same patch : https://lists.gnu.org/archive/html/qemu-riscv/2022-09/msg00126.html It seems that this simple patch is helpful. Could you help us to merge this patch? Thanks for your great help! Regards, Tommy Wu

[PATCH 0/3] Implement the watchdog timer of HiFive 1 rev b.

2022-09-22 Thread Tommy Wu
The HiFive 1 rev b includes a watchdog module based on a 32-bit counter. The watchdog timer is in the always-on domain device of HiFive 1 rev b, so this patch added the AON device to the sifive_e machine. This patch only implemented the functionality of the watchdog timer, not all the

[PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Gerd Hoffmann
In case phys bits are functional and can be used by the guest (aka host-phys-bits=on) add a fw_cfg file carrying the value. This can be used by the guest firmware for address space configuration. The value in the etc/phys-bits fw_cfg file should be identical to the phys bits value published via

[PATCH v4 2/5] acpi/ssdt: Fix aml_or() and aml_and() in if clause

2022-09-22 Thread Robert Hoo
In If condition, using bitwise and/or, rather than logical and/or. The result change in AML code: If (((Local6 == Zero) | (Arg0 != Local0))) ==> If (((Local6 == Zero) || (Arg0 != Local0))) If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One))) ==> If (((ObjectType (Arg3) == 0x04) &&

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 12:14:54PM +0200, Gerd Hoffmann wrote: > In case phys bits are functional and can be used by the guest (aka > host-phys-bits=on) add a fw_cfg file carrying the value. This can > be used by the guest firmware for address space configuration. > > The value in the

Re: [PATCH v8 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread David Hildenbrand
On 21.09.22 12:07, Jason A. Donenfeld wrote: In order to fully support MSA_EXT_5, we have to support the SHA-512 special instructions. So implement those. The implementation began as something TweetNacl-like, and then was adjusted to be useful here. It's not very beautiful, but it is quite

RE: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-22 Thread Wang, Wei W
On Thursday, September 22, 2022 5:11 AM, Andy Lutomirski wrote: > To: Christopherson,, Sean ; David Hildenbrand > > Cc: Chao Peng ; kvm list > ; Linux Kernel Mailing List > ; linux...@kvack.org; > linux-fsde...@vger.kernel.org; Linux API ; > linux-...@vger.kernel.org; qemu-devel@nongnu.org; Paolo

[PATCH v3 1/4] scripts/ci/setup: ninja missing from build-environment

2022-09-22 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36 Signed-off-by: Lucas Mateus Castro (alqotel) --- scripts/ci/setup/build-environment.yml | 1 + 1 file changed,

[PATCH v1 1/9] hw: encode accessing CPU index in MemTxAttrs

2022-09-22 Thread Alex Bennée
We currently have hacks across the hw/ to reference current_cpu to work out what the current accessing CPU is. This breaks in some cases including using gdbstub to access HW state. As we have MemTxAttrs to describe details about the access lets extend it to mention if this is a CPU access and

Re: [PATCH 0/4] Only generate cluster node in PPTT when specified

2022-09-22 Thread Jonathan Cameron via
On Thu, 22 Sep 2022 21:11:39 +0800 Yicong Yang wrote: > From: Yicong Yang > > This series mainly change the policy for building a cluster topology node > in PPTT. Previously we'll always build a cluster node in PPTT without > asking the user, after this set the cluster node will be built only

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Daniel P . Berrangé
On Thu, Sep 22, 2022 at 03:34:42PM +0200, Philippe Mathieu-Daudé wrote: > On Thu, Sep 22, 2022 at 3:20 PM Markus Armbruster wrote: > > > > Claudio Fontana writes: > > > > [...] > > > > > I think it would be better to completely make the return value separate > > > from the Error, > > > and

Re: [PATCH v4 9/9] target/arm: Enable TARGET_TB_PCREL

2022-09-22 Thread Peter Maydell
On Tue, 6 Sept 2022 at 11:31, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/cpu-param.h | 2 ++ > target/arm/translate.h | 6 > target/arm/cpu.c | 23 +++--- > target/arm/translate-a64.c | 37 ++- >

Re: [RFC PATCH v2 0/3] Initial PECI bus support

2022-09-22 Thread Peter Maydell
On Tue, 13 Sept 2022 at 19:26, Titus Rwantare wrote: > A lot of the registers are hard coded, see hw/peci/peci-client.c. I'd like to > gauge interest in what potential users would like to be adjustable at runtime. > I've not written QEMU models that read config files at runtime, something I'd >

Re: [PATCH] hw/net: npcm7xx_emc: set MAC in register space

2022-09-22 Thread Peter Maydell
On Thu, 22 Sept 2022 at 00:47, Patrick Venture wrote: > > The MAC address set from Qemu wasn't being saved into the register space. > > Reviewed-by: Hao Wu > Signed-off-by: Patrick Venture > @@ -112,6 +115,18 @@ static void emc_reset(NPCM7xxEMCState *emc) > > emc->tx_active = false; >

[PATCH 3/5] qga: Add UFS freeze/thaw support for FreeBSD

2022-09-22 Thread Alexander Ivanov
UFS supports FS freezing through ioctl UFSSUSPEND on /dev/ufssuspend. Freezed FS can be thawed by closing /dev/ufssuspend file descriptior. Use getmntinfo to get a list of mounted FS. Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c| 109 +++---

[PATCH v1 0/9] MemTxAttrs cpu_index and gdbstub/next

2022-09-22 Thread Alex Bennée
Hi, This is v2 of the MexTxAttrs update alongside the current state of gdbstub/next (as fixing current_cpu from gdbstub was the original motivation). This includes a little re-factoring to split of the growing gdbstub.c core into smaller discreet units. The first aim of the re-factoring it to

Re: [PATCH] try to find out which cluster allocated in qcow2

2022-09-22 Thread Kevin Wolf
Am 21.09.2022 um 09:57 hat songlinfeng geschrieben: > In our project,we want to full backup a disk only allocated area,but > qmp block-dity-block-add can create a bitmap with all zero,so we can't > find out which cluster is allocated.in qcow2,I think l2_table can help > me find out which cluster

Re: [PATCH v4 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc

2022-09-22 Thread Peter Maydell
On Tue, 6 Sept 2022 at 11:13, Richard Henderson wrote: > > In preparation for TARGET_TB_PCREL, reduce reliance on > absolute values by passing in pc difference. > > Signed-off-by: Richard Henderson > --- > @@ -263,14 +263,14 @@ static inline int curr_insn_len(DisasContext *s) > > #ifdef

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Claudio Fontana writes: > On 9/22/22 15:20, Markus Armbruster wrote: >> Claudio Fontana writes: >> >> [...] >> >>> I think it would be better to completely make the return value separate >>> from the Error, >>> and really treat Error as an exception and not mix it up with the regular >>>

Re: [PATCH] qemu-img: Wean documentation and help output off '?' for help

2022-09-22 Thread Kevin Wolf
Am 08.09.2022 um 15:08 hat Markus Armbruster geschrieben: > '?' for help is deprecated since commit c8057f951d "Support 'help' as > a synonym for '?' in command line options", v1.2.0. We neglected to > update output of qemu-img --help and the manual. Do that now. > > Signed-off-by: Markus

Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-22 Thread Peter Maydell
On Wed, 21 Sept 2022 at 14:22, Igor Mammedov wrote: > > On Tue, 20 Sep 2022 14:15:36 +0100 > Peter Maydell wrote: > > > On Wed, 24 Aug 2022 at 16:04, Igor Mammedov wrote: > > > > > > On Tue, 16 Aug 2022 17:49:57 +0800 > > > Keqian Zhu wrote: > > > > > > > Setup an ARM virtual machine of

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 14:33, Daniel P. Berrangé wrote: > On Thu, Sep 22, 2022 at 02:30:35PM +0200, Claudio Fontana wrote: >> On 9/22/22 12:37, Daniel P. Berrangé wrote: >>> On Thu, Sep 22, 2022 at 11:34:22AM +0200, Claudio Fontana wrote: On 9/22/22 11:31, Daniel P. Berrangé wrote: > On Thu, Sep 22,

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Claudio Fontana writes: > On 9/22/22 11:38, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >>> On Thu, Sep 22, 2022 at 08:07:43AM +0200, Markus Armbruster wrote: Ease of use matters, too. When sticking to the rule leads to awkward code, we should stop and think. Should

[PATCH v4 5/5] test/acpi/bios-tables-test: SSDT: update golden master binaries

2022-09-22 Thread Robert Hoo
And empty bios-tables-test-allowed-diff.h. Diff of ASL form, from qtest testlog.txt: --- /tmp/asl-RFWZS1.dsl 2022-09-22 18:25:06.191519589 +0800 +++ /tmp/asl-B1ZZS1.dsl 2022-09-22 18:25:06.187519182 +0800 @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler

Re: [PATCH 14/27] qapi migration: Elide redundant has_FOO in generated C

2022-09-22 Thread Philippe Mathieu-Daudé via
On Thu, Sep 15, 2022 at 10:52 PM Markus Armbruster wrote: > > The has_FOO for pointer-valued FOO are redundant, except for arrays. > They are also a nuisance to work with. Recent commit "qapi: Start to > elide redundant has_FOO in generated C" provided the means to elide > them step by step.

Re: [PATCH 5/7] configure: Remove use of backtick `...` syntax

2022-09-22 Thread Peter Maydell
On Tue, 30 Aug 2022 at 13:13, Philippe Mathieu-Daudé wrote: > > On 25/8/22 17:07, Peter Maydell wrote: > > There's only one place in configure where we use `...` to execute a > > command and capture the result. Switch to $() to match the rest of > > the script. This silences a shellcheck

[PATCH 5/5] qga: Add support for user password settinng in FreeeBSD

2022-09-22 Thread Alexander Ivanov
Move qmp_guest_set_user_password() to commands-posix.c under (__linux__ or __FreeBSD) condition. Add command and arguments for password setting in FreeBSD. Signed-off-by: Alexander Ivanov --- qga/commands-bsd.c | 8 --- qga/commands-linux.c | 105 --

[PATCH 0/5] qga: Add FreeBSD support

2022-09-22 Thread Alexander Ivanov via
Add freeze/thaw, shutdown/halt/reboot and password setting support for FreeBSD. Alexander Ivanov (5): qga: Move Linux-specific commands code to separate file qga: Add initial FreeBSD support qga: Add UFS freeze/thaw support for FreeBSD qga: Add shutdown/halt/reboot support for FreeBSD

[PATCH v3 2/4] scripts/ci/setup: Fix libxen requirements

2022-09-22 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" XEN hypervisor is only available in ARM and x86, but the yaml only checked if the architecture is different from s390x, changed it to a more accurate test. Tested this change on a Ubuntu 20.04 ppc64le. Signed-off-by: Lucas Mateus Castro (alqotel)

  1   2   3   4   >