Re: [PATCH trivial] qemu-img: factor out parse_output_format() and use it in the code

2024-02-09 Thread Michael Tokarev
07.02.2024 20:52, Michael Tokarev : Use common code and simplify error message I've sent this as part of qemu-img --help/options refactoring series, done in that context so this path does not make sense anymore. /mjt

RE: [RFC PATCH 5/5] cxl/core: add poison injection event handler

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > Currently driver only trace cxl events, poison injection on cxl memdev > is silent. OS needs to be notified then it could handle poison range > in time. Per CXL spec, the device error event could be signaled through > FW-First and OS-First methods. > > So, add poison event

RE: [RFC PATCH 4/5] cxl/core: add report option for cxl_mem_get_poison()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > When a poison event is received, driver uses GET_POISON_LIST command > to get the poison list. Now driver has cxl_mem_get_poison(), so > reuse it and add a parameter 'bool report', report poison record to MCE > if set true. If the memory error record has the poison event,

RE: [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > If poison is detected(reported from cxl memdev), OS should be notified to > handle it. Introduce this function: > 1. translate DPA to HPA; > 2. construct a MCE instance; (TODO: more details need to be filled) > 3. log it into MCE event queue; > > After that, MCE

RE: [RFC PATCH 2/5] cxl/core: introduce cxl_memdev_dpa_to_hpa()

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > When a memdev is assigned to a region, its Device Physical Address will be > mapped to Host Physical Address. Introduce this helper function to > translate HPA from a given memdev and its DPA. > > Signed-off-by: Shiyang Ruan > --- > drivers/cxl/core/memdev.c | 12

RE: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks

2024-02-09 Thread Dan Williams
Shiyang Ruan wrote: > The length of Physical Address in General Media Event Record/DRAM Event > Record is 64-bit, so the field mask should be defined as such length. Can you include this user visible side-effect of this change. Looks like this could cause usages of CXL_DPA_FLAGS_MASK to return an

Re: [PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it

2024-02-09 Thread Mark Cave-Ayland
On 09/02/2024 11:37, Peter Maydell wrote: On Thu, 8 Feb 2024 at 18:14, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v1 00/15] libvhost-user: support more memslots and cleanup memslot handling code

2024-02-09 Thread David Hildenbrand
On 07.02.24 12:40, Stefano Garzarella wrote: On Fri, Feb 02, 2024 at 10:53:17PM +0100, David Hildenbrand wrote: This series adds support for more memslots (509) to libvhost-user, to make it fully compatible with virtio-mem that uses up to 256 memslots accross all memory devices in

Re: [PATCH 00/23] qemu-img: refersh options and --help handling

2024-02-09 Thread Michael Tokarev
10.02.2024 00:22, Michael Tokarev wrote: Quite big patchset implementing normal, readable qemu-img --help (and qemu-img COMMAND --help) output with readable descriptions, and adding many long options in the process. ... I forgot to run checkpatch.pl - minor edits, the result is at

Re: [PATCH v3 11/11] hw/sparc64/cpu: Initialize GPIO before realizing CPU devices

2024-02-09 Thread Mark Cave-Ayland
On 09/02/2024 11:34, Peter Maydell wrote: On Thu, 8 Feb 2024 at 18:14, Philippe Mathieu-Daudé wrote: Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 4 +++- 1 file

[PATCH] i386: xen: fix compilation --without-default-devices

2024-02-09 Thread Paolo Bonzini
The xenpv machine type requires XEN_BUS, so select it. Signed-off-by: Paolo Bonzini --- accel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/Kconfig b/accel/Kconfig index a30cf2eb483..794e0d18d21 100644 --- a/accel/Kconfig +++ b/accel/Kconfig @@ -16,3 +16,4 @@ config KVM

Re: [PATCH v3 11/11] hw/sparc64/cpu: Initialize GPIO before realizing CPU devices

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sparc64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v3 10/11] hw/sparc/leon3: Initialize GPIO before realizing CPU devices

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: Inline cpu_create() in order to call qdev_init_gpio_in_named_with_opaque() before the CPU is realized. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 11/23] qemu-img: allow specifying -f fmt for snapshot subcommand

2024-02-09 Thread Michael Tokarev
10.02.2024 00:22, Michael Tokarev wrote: For consistency with other commands, and since it already accepts --image-opts, allow specifying -f fmt too. ... -c = getopt_long(argc, argv, ":la:c:d:hqU", +c = getopt_long(argc, argv, ":la:c:d:fhqU",

Re: [PATCH v3 09/11] hw/sparc/leon3: Realize GRLIB IRQ controller before accessing it

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index

Re: [PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index

Re: [PATCH 0/3] system/memory: Trivial fixes

2024-02-09 Thread Michael Tokarev
09.02.2024 18:00, Philippe Mathieu-Daudé : - Include missing "exec/memory.h" - Set machine as parent of io/mem regions Philippe Mathieu-Daudé (3): cpu-target: Include missing 'exec/memory.h' header monitor/target: Include missing 'exec/memory.h' header system/physmem: Assign global

Re: [PATCH v3 06/11] hw/misc/macio: Realize IDE controller before accessing it

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index

Re: [PATCH 09/88] esp: update TC check logic in do_dma_pdma_cb() to check for TC == 0

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:11, Paolo Bonzini wrote: On Thu, Feb 8, 2024 at 10:46 AM Mark Cave-Ayland wrote: On 01/02/2024 11:36, Paolo Bonzini wrote: Il gio 1 feb 2024, 12:25 Mark Cave-Ayland mailto:mark.cave-ayl...@ilande.co.uk>> ha scritto: On 01/02/2024 10:46, Paolo Bonzini wrote: >

Re: [PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge before accessing it

2024-02-09 Thread Mark Cave-Ayland
On 08/02/2024 18:12, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 1a6cd05c61..4eb5477069 100644 ---

[PATCH 08/23] qemu-img: refresh options/--help for "convert" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. convert uses -B for --backing, - why not -b? Signed-off-by: Michael Tokarev --- qemu-img.c | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index

[PATCH 20/23] qemu-img: refresh options/--help for "dd" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9a0cd05d42..db1f80e15d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -5417,6 +5417,8 @@ static int img_dd(const

[PATCH 06/23] qemu-img: refresh options/--help for "commit" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index ad7fa033b1..eabf45c423 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1029,8

[PATCH 21/23] qemu-img: refresh options/--help for "measure" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. Also add -s short option for --size (and remove OPTION_SIZE). --- qemu-img.c | 43 +++ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index db1f80e15d..e2c8855ff5 100644

[PATCH 13/23] qemu-img: refresh options/--help for "snapshot" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index d9dfff2f07..67e6a7797d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3553,9 +3553,15 @@ static int

[PATCH 14/23] qemu-img: refresh options/--help for "rebase" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. Options added: --format, --cache - for the image in question --backing, --backing-format, --backing-cache, --backing-unsafe - for the new backing file (was eg CACHE vs SRC_CACHE, which is unclear). Probably should rename local variables. ---

[PATCH 04/23] qemu-img: refresh options/--help for "check" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 4e962843da..3ae07bfae0 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -792,7 +792,9 @@

[PATCH 18/23] qemu-img: refresh options/--help for "bench" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index f598eba3a8..3be365cd07 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4781,9 +4781,19 @@ static int

[PATCH 01/23] qemu-img: pass current cmd info into command handlers

2024-02-09 Thread Michael Tokarev
In order to be able to give correct --help output, pass current cmd information (img_cmd_t structure) to command handlers and to common error reporting functions. After the change, in case of command-line error, qemu-img will now print: Try 'qemu-img create --help' for more information. Current

[PATCH 22/23] qemu-img: implement short --help, remove global help() function

2024-02-09 Thread Michael Tokarev
now once all individual subcommands has --help support, remove the large unreadable help() thing and replace it with small global --help, which refers to individual command --help for more info. While at it, also line-wrap list of formats after 74 chars. Signed-off-by: Michael Tokarev ---

[PATCH 15/23] qemu-img: resize: do not always eat last argument

2024-02-09 Thread Michael Tokarev
'qemu-img resize --help' does not work, since it wants more arguments. Only eat last option at the beginning if it starts like -N.., and allow getopt() to do its work, and eat it up at the end if not already eaten. This will not allow to mix options and size anyway, but it is better than now.

[PATCH 03/23] qemu-img: factor out parse_output_format() and use it in the code

2024-02-09 Thread Michael Tokarev
Use common code and simplify error message Signed-off-by: Michael Tokarev --- qemu-img.c | 63 -- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7edfc56572..4e962843da 100644 --- a/qemu-img.c +++

[PATCH 19/23] qemu-img: refresh options/--help for "bitmap" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 3be365cd07..9a0cd05d42 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -5103,7 +5103,24 @@ static int img_bitmap(const

[PATCH 17/23] qemu-img: refresh options/--help for "amend" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index e552401074..f598eba3a8 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4493,7 +4493,12 @@ static int img_amend(const

[PATCH 23/23] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-02-09 Thread Michael Tokarev
also add short description to each command and use it in --help Signed-off-by: Michael Tokarev --- qemu-img.c | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index d9c5c6078b..e57076738e 100644 ---

[PATCH 05/23] qemu-img: simplify --repair error message

2024-02-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 3ae07bfae0..ad7fa033b1 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -843,8 +843,8 @@ static int img_check(const img_cmd_t *ccmd, int argc, char

[PATCH 11/23] qemu-img: allow specifying -f fmt for snapshot subcommand

2024-02-09 Thread Michael Tokarev
For consistency with other commands, and since it already accepts --image-opts, allow specifying -f fmt too. Signed-off-by: Michael Tokarev --- docs/tools/qemu-img.rst | 2 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 9 ++--- 3 files changed, 9 insertions(+), 6

[PATCH 07/23] qemu-img: refresh options/--help for "compare" command

2024-02-09 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-img.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index eabf45c423..8f16ee9deb 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1464,9 +1464,17 @@ static int img_compare(const img_cmd_t

[PATCH 16/23] qemu-img: refresh options/--help for "resize" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 929a25a021..e552401074 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4283,7 +4283,9 @@ static int img_resize(const

[PATCH 10/23] qemu-img: refresh options/--help for "map" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. --- qemu-img.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index a1a0ba99f0..5af0b8ec18 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3425,7 +3425,20 @@ static int img_map(const img_cmd_t

[PATCH 00/23] qemu-img: refersh options and --help handling

2024-02-09 Thread Michael Tokarev
Quite big patchset implementing normal, readable qemu-img --help (and qemu-img COMMAND --help) output with readable descriptions, and adding many long options in the process. In the end I stopped using qemu-img-opts.hx in qemu-img.c, perhaps this can be avoided, with only list of commands and

[PATCH 09/23] qemu-img: refresh options/--help for "info" command

2024-02-09 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index d4dafebff9..a1a0ba99f0 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -65,7 +65,6 @@

[PATCH 02/23] qemu-img: refresh options/--help for "create" subcommand

2024-02-09 Thread Michael Tokarev
Add missing long options (eg --format). Create helper function cmd_help() to display command-specific help text, and use it to print --help for 'create' subcommand. Signed-off-by: Michael Tokarev --- qemu-img.c | 45 - 1 file changed, 44

[PATCH 12/23] qemu-img: make -l (list) the default for "snapshot" subcommand

2024-02-09 Thread Michael Tokarev
also remove bdrv_oflags handling (only list can use RO mode) --- qemu-img.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 1e09b78d00..d9dfff2f07 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3541,7 +3541,7 @@ static int

Re: KVM/QEMU Community Call 6th Feb Agenda Items

2024-02-09 Thread Philippe Mathieu-Daudé
On 2/2/24 16:55, Alex Bennée wrote: Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 6/2/2024 14:00 UTC BTW there is a KVM-only community call every weeks on Wednesday: https://lore.kernel.org/lkml/20230522072508.ga326...@chaop.bj.intel.com/T/ Maybe time

Re: KVM/QEMU Community Call 6th Feb Agenda Items (minutes)

2024-02-09 Thread Philippe Mathieu-Daudé
Hi, On 2/2/24 16:55, Alex Bennée wrote: The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 6/2/2024 14:00 UTC As I'll be away Philippe has volunteered to run the meeting. So far we have one agenda item which is to discuss next steps from Markus' post about

Re: [PATCH] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-09 Thread Philippe Mathieu-Daudé
On 9/2/24 20:46, BALATON Zoltan wrote: On Fri, 9 Feb 2024, Helge Deller wrote: On 2/9/24 19:55, Thomas Huth wrote: When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with:   /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in

[PULL 00/10] testing, doc and gdbstub updates

2024-02-09 Thread Alex Bennée
The following changes since commit 5d1fc614413b10dd94858b07a1b2e26b1aa0296c: Merge tag 'migration-staging-pull-request' of https://gitlab.com/peterx/qemu into staging (2024-02-09 11:22:20 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git

[PULL 07/10] gdbstub: Allow specifying a reason in stop packets

2024-02-09 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming syscall catchpoint support needs to send stop packets with an associated reason to GDB. Add an extra parameter to gdb_handlesig() for that, and rename it to gdb_handlesig_reason(). Provide a compatibility wrapper with an old name. Signed-off-by: Ilya

[PULL 01/10] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-02-09 Thread Alex Bennée
From: Fabiano Rosas Avocado needs sqlite3: Failed to load plugin from module "avocado.plugins.journal": ImportError("Module 'sqlite3' is not installed. Use: sudo zypper install python311 to install it") >From 'zypper info python311': "This package supplies rich command line features

[PULL 09/10] gdbstub: Implement catching syscalls

2024-02-09 Thread Alex Bennée
From: Ilya Leoshkevich GDB supports stopping on syscall entry and exit using the "catch syscall" command. It relies on 3 packets, which are currently not supported by QEMU: * qSupported:QCatchSyscalls+ [1] * QCatchSyscalls: [2] * T05syscall_entry: and T05syscall_return: [3] Implement

[PULL 08/10] gdbstub: Add syscall entry/return hooks

2024-02-09 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming syscall catchpoint support needs to get control on syscall entry and return. Provide the necessary hooks for that, which are no-ops for now. Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-4-...@linux.ibm.com> Signed-off-by: Alex Bennée

[PULL 04/10] Revert "hw/elf_ops: Ignore loadable segments with zero size"

2024-02-09 Thread Alex Bennée
This regressed qemu-system-xtensa: TESTtest_load_store on xtensa qemu-system-xtensa: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded

[PULL 10/10] tests/tcg: Add the syscall catchpoint gdbstub test

2024-02-09 Thread Alex Bennée
From: Ilya Leoshkevich Check that adding/removing syscall catchpoints works. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20240202152506.279476-6-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240207163812.3231697-15-alex.ben...@linaro.org> diff --git

[PULL 06/10] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way

2024-02-09 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming syscall catchpoint support needs to send SIGTRAP stop packets to GDB. Being able to compile this support only once for all targets is a good thing, and it requires hiding TARGET_SIGTRAP behind a function call. Signed-off-by: Ilya Leoshkevich Message-Id:

[PULL 05/10] kconfig: use "select" to enable semihosting

2024-02-09 Thread Alex Bennée
From: Paolo Bonzini Just like all other dependencies, these can be expressed in Kconfig files rather than in the default configurations. Signed-off-by: Paolo Bonzini Acked-by: Alistair Francis Reviewed-by: Thomas Huth Message-Id: <20240129115809.1039924-1-pbonz...@redhat.com> Signed-off-by:

[PULL 03/10] configure: run plugin TCG tests again

2024-02-09 Thread Alex Bennée
From: Paolo Bonzini Commit 39fb3cfc28b ("configure: clean up plugin option handling", 2023-10-18) dropped the CONFIG_PLUGIN line from tests/tcg/config-host.mak, due to confusion caused by the shadowing of $config_host_mak. However, TCG tests were still expecting it. Oops. Put it back, in the

Re: [PATCH] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-09 Thread BALATON Zoltan
On Fri, 9 Feb 2024, Helge Deller wrote: On 2/9/24 19:55, Thomas Huth wrote: When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail':

[PULL 02/10] docs: mark CRIS support as deprecated

2024-02-09 Thread Alex Bennée
This might be premature but while streamlining the avocado tests I realised the only tests we have are "check-tcg" ones. The ageing fedora-cris-cross image works well enough for developers but can't be used in CI as we need supported build platforms to build QEMU. Does this mean the writing is on

Re: [PATCH] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-09 Thread Helge Deller
On 2/9/24 19:55, Thomas Huth wrote: When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail': hw/hppa/machine.c:399: undefined

Re: [PATCH v3 9/9] hw/mem/cxl_type3: Add dpa range validation for accesses to dc regions

2024-02-09 Thread fan
On Wed, Jan 24, 2024 at 04:58:15PM +, Jonathan Cameron wrote: > On Tue, 7 Nov 2023 10:07:13 -0800 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > Not all dpa range in the dc regions is valid to access until an extent > DPA ... DC etc > > > covering the range has been added. Add a

[PATCH] hw/i386/kvm/ioapic: Replace magic '24' value by proper definition

2024-02-09 Thread Philippe Mathieu-Daudé
Replace '24' -> KVM_IOAPIC_NUM_PINS. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/kvm/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 409d0c8c76..b96fe84eed 100644 --- a/hw/i386/kvm/ioapic.c +++

Re: [RFC v2 0/5] ARM Nested Virt Support

2024-02-09 Thread Peter Maydell
On Fri, 9 Feb 2024 at 16:00, Eric Auger wrote: > > This series adds ARM Nested Virtualization support in KVM mode. > This is a respin of previous contributions from Miguel [1] and Haibo [2]. > > This was tested with Marc's v11 [3] on Ampere HW with fedora L1 guest and > L2 guests booted without

Re: [RFC v2 3/5] target/arm/kvm: Add helper to detect EL2 when using KVM

2024-02-09 Thread Philippe Mathieu-Daudé
On 9/2/24 16:59, Eric Auger wrote: From: Haibo Xu Introduce query support for KVM_CAP_ARM_EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Richard Henderson --- target/arm/kvm.c | 5 + target/arm/kvm_arm.h | 12 2

[PATCH] hw/hppa/Kconfig: Fix building with "configure --without-default-devices"

2024-02-09 Thread Thomas Huth
When running "configure" with "--without-default-devices", building of qemu-system-hppa currently fails with: /usr/bin/ld: libqemu-hppa-softmmu.fa.p/hw_hppa_machine.c.o: in function `machine_HP_common_init_tail': hw/hppa/machine.c:399: undefined reference to `usb_bus_find' /usr/bin/ld:

Re: [PATCH] kvm: emit GUEST_PANICKED event in case of abnormal KVM exit

2024-02-09 Thread Alex Bennée
Andrey Drobyshev writes: (Add kvm@vger to CC for wider review) > Currently we emit GUEST_PANICKED event in case kvm_vcpu_ioctl() returns > KVM_EXIT_SYSTEM_EVENT with the event type KVM_SYSTEM_EVENT_CRASH. Let's > extend this scenario and emit GUEST_PANICKED in case of an abnormal KVM > exit.

Re: [PATCH v6 0/5] Support message-based DMA in vfio-user server

2024-02-09 Thread Jonathan Cameron via
On Wed, 1 Nov 2023 06:16:06 -0700 Mattias Nissler wrote: > This series adds basic support for message-based DMA in qemu's vfio-user > server. This is useful for cases where the client does not provide file > descriptors for accessing system memory via memory mappings. My motivating use > case

[PATCH] iotests: Make 144 deterministic again

2024-02-09 Thread Kevin Wolf
Since commit effd60c8 changed how QMP commands are processed, the order of the block-commit return value and job events in iotests 144 wasn't fixed and more and caused the test to fail intermittently. Change the test to cache events first and then print them in a predefined order. Waiting three

Re: [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd

2024-02-09 Thread Hanna Czenczek
On 09.02.24 15:38, Michael Tokarev wrote: 02.02.2024 18:31, Hanna Czenczek : Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set ioeventfd during startup") has made virtio_blk_start_ioeventfd() always kick the virtqueue (set the ioeventfd), regardless of whether the BB is

Re: [PATCH 0/2] block: Allow concurrent BB context changes

2024-02-09 Thread Hanna Czenczek
On 09.02.24 15:08, Michael Tokarev wrote: 02.02.2024 17:47, Hanna Czenczek : Hi, Without the AioContext lock, a BB's context may kind of change at any time (unless it has a root node, and I/O requests are pending). That also means that its own context (BlockBackend.ctx) and that of its root

Re: [PATCH 3/3] system/physmem: Assign global system I/O Memory to machine

2024-02-09 Thread Philippe Mathieu-Daudé
(+Markus I forgot to Cc) On 9/2/24 17:06, Peter Maydell wrote: On Fri, 9 Feb 2024 at 15:01, Philippe Mathieu-Daudé wrote: So far there is only one system I/O and one system memory per machine. Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 7 --- 1 file changed, 4

Re: [PATCH 1/3] cpu-target: Include missing 'exec/memory.h' header

2024-02-09 Thread Philippe Mathieu-Daudé
On 9/2/24 17:01, Peter Maydell wrote: On Fri, 9 Feb 2024 at 15:01, Philippe Mathieu-Daudé wrote: Include "exec/memory.h" in order to avoid: cpu-target.c:201:50: error: use of undeclared identifier 'TYPE_MEMORY_REGION' DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION,

Re: [PULL 00/34] Migration staging patches

2024-02-09 Thread Peter Maydell
On Thu, 8 Feb 2024 at 03:05, wrote: > > From: Peter Xu > > The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: > > Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into > staging (2024-02-03 13:31:58 +) > > are available in the Git repository at:

Re: [PATCH 3/3] system/physmem: Assign global system I/O Memory to machine

2024-02-09 Thread Peter Maydell
On Fri, 9 Feb 2024 at 15:01, Philippe Mathieu-Daudé wrote: > > So far there is only one system I/O and one system > memory per machine. > > Signed-off-by: Philippe Mathieu-Daudé > --- > system/physmem.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git

[RFC v2 0/5] ARM Nested Virt Support

2024-02-09 Thread Eric Auger
This series adds ARM Nested Virtualization support in KVM mode. This is a respin of previous contributions from Miguel [1] and Haibo [2]. This was tested with Marc's v11 [3] on Ampere HW with fedora L1 guest and L2 guests booted without EDK2. However it does not work yet with EDK2 but it looks

[RFC v2 4/5] target/arm: Enable feature ARM_FEATURE_EL2 if EL2 is supported

2024-02-09 Thread Eric Auger
From: Haibo Xu KVM_CAP_ARM_EL2 must be supported by the cpu to enable ARM_FEATURE_EL2. In case the host does support NV, expose the feature. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v1 -> v2: - remove isar_feature_aa64_aa32_el2 modif in

Re: [PATCH 2/3] monitor/target: Include missing 'exec/memory.h' header

2024-02-09 Thread Peter Maydell
On Fri, 9 Feb 2024 at 15:02, Philippe Mathieu-Daudé wrote: > > Include "exec/memory.h" in order to avoid: > > monitor/hmp-cmds-target.c:263:10: error: call to undeclared function > 'memory_region_is_ram'; > ISO C99 and later do not support implicit function declarations >

Re: [PATCH 1/3] cpu-target: Include missing 'exec/memory.h' header

2024-02-09 Thread Peter Maydell
On Fri, 9 Feb 2024 at 15:01, Philippe Mathieu-Daudé wrote: > > Include "exec/memory.h" in order to avoid: > > cpu-target.c:201:50: error: use of undeclared identifier > 'TYPE_MEMORY_REGION' > DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION, >

[RFC v2 3/5] target/arm/kvm: Add helper to detect EL2 when using KVM

2024-02-09 Thread Eric Auger
From: Haibo Xu Introduce query support for KVM_CAP_ARM_EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Richard Henderson --- target/arm/kvm.c | 5 + target/arm/kvm_arm.h | 12 2 files changed, 17 insertions(+) diff --git

[RFC v2 5/5] hw/arm/virt: Allow virt extensions with KVM

2024-02-09 Thread Eric Auger
From: Haibo Xu Up to now virt support on guest has been only supported with TCG. Now it becomes feasible to use it with KVM acceleration. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v1 -> v2: - fixed test ordering: virt && ((kvm && !kvm_el2) || hvf)

[RFC v2 1/5] [Placeholder] headers: Partial headers update for NV2 enablement

2024-02-09 Thread Eric Auger
From: Haibo Xu For now let's only import the pieces needed to run NV on KVM. Later on this will be replaced by a standard and comprehensive linux header update using scripts/update-linux-headers.sh. For now the changes are taken from https://github.com/eauger/linux/tree/nv-6.8-nv2-v11

[RFC v2 2/5] hw/arm: Allow setting KVM vGIC maintenance IRQ

2024-02-09 Thread Eric Auger
From: Haibo Xu Allow virt arm machine to set the intid for the KVM GIC maintenance interrupt. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v1 -> v2: - [Miguel] replaced the has_virt_extensions by the maintenance irq intid property. [Eric] restored

Re: [RFC PATCH 0/7] hw/qdev: Split 'wiring' phase from 'realize'

2024-02-09 Thread Bernhard Beschow
Am 9. Februar 2024 12:32:18 UTC schrieb "Philippe Mathieu-Daudé" : >Hi, > >Various issues related to implementing dynamic machines have >been documented in [1]. > >We are trying to understand what means "a qdev is realized". >One explanation was "the device is guest visible"; however >many

Re: [PATCH v2 0/1] target: New binary to prototype heterogeneous machines

2024-02-09 Thread Philippe Mathieu-Daudé
On 9/2/24 16:29, Philippe Mathieu-Daudé wrote: This binary will be use to rework QEMU startup code, paving the way toward dynamic machines. It might also allow experimenting with multiple TCG target frontends and possibly prototyping concurrent HW/SW accelerations. v1:

[PATCH v2 1/1] target: Add system emulation aiming to target any architecture

2024-02-09 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add the 'any'-architecture target. - Only consider 64-bit targets - Do not use any hardware accelerator (except qtest) - For architecture constants, use: . max of supported targets phys/virt address space . max of supported targets MMU modes . min of supported

[PATCH v2 0/1] target: New binary to prototype heterogeneous machines

2024-02-09 Thread Philippe Mathieu-Daudé
Almost 2 years later we got hundreds of cleanups patches merged, so we can get this patch in. Building the 'any' target has to be explictly requested in ./configure target-list argument. This binary will be use to rework QEMU startup code, paving the way toward dynamic machines. It might also

[PATCH 3/3] system/physmem: Assign global system I/O Memory to machine

2024-02-09 Thread Philippe Mathieu-Daudé
So far there is only one system I/O and one system memory per machine. Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 5e66d9ae36..50947a374e 100644 ---

[PATCH 2/3] monitor/target: Include missing 'exec/memory.h' header

2024-02-09 Thread Philippe Mathieu-Daudé
Include "exec/memory.h" in order to avoid: monitor/hmp-cmds-target.c:263:10: error: call to undeclared function 'memory_region_is_ram'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (!memory_region_is_ram(mrs.mr) &&

[PATCH 1/3] cpu-target: Include missing 'exec/memory.h' header

2024-02-09 Thread Philippe Mathieu-Daudé
Include "exec/memory.h" in order to avoid: cpu-target.c:201:50: error: use of undeclared identifier 'TYPE_MEMORY_REGION' DEFINE_PROP_LINK("memory", CPUState, memory, TYPE_MEMORY_REGION, ^ Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 0/3] system/memory: Trivial fixes

2024-02-09 Thread Philippe Mathieu-Daudé
- Include missing "exec/memory.h" - Set machine as parent of io/mem regions Philippe Mathieu-Daudé (3): cpu-target: Include missing 'exec/memory.h' header monitor/target: Include missing 'exec/memory.h' header system/physmem: Assign global system I/O Memory to machine cpu-target.c

Re: [PATCH v2 3/3] virtio-blk: Use ioeventfd_attach in start_ioeventfd

2024-02-09 Thread Michael Tokarev
02.02.2024 18:31, Hanna Czenczek : Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set ioeventfd during startup") has made virtio_blk_start_ioeventfd() always kick the virtqueue (set the ioeventfd), regardless of whether the BB is drained. That is no longer necessary,

Re: [PATCH 0/2] block: Allow concurrent BB context changes

2024-02-09 Thread Michael Tokarev
02.02.2024 17:47, Hanna Czenczek : Hi, Without the AioContext lock, a BB's context may kind of change at any time (unless it has a root node, and I/O requests are pending). That also means that its own context (BlockBackend.ctx) and that of its root node can differ sometimes (while the context

[PULL 17/17] tests: Add case for LUKS volume with detached header

2024-02-09 Thread Daniel P . Berrangé
From: Hyman Huang Also, add a section to the MAINTAINERS file for detached LUKS header, it only has a test case in it currently. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé Signed-off-by: Daniel P. Berrangé --- MAINTAINERS | 5 +

[PULL 02/17] crypto: Introduce SM4 symmetric cipher algorithm

2024-02-09 Thread Daniel P . Berrangé
From: Hyman Huang Introduce the SM4 cipher algorithms (OSCCA GB/T 32907-2016). SM4 (GBT.32907-2016) is a cryptographic standard issued by the Organization of State Commercial Administration of China (OSCCA) as an authorized cryptographic algorithms for the use within China. Detect the SM4

[PULL 09/17] chardev: close QIOChannel before unref'ing

2024-02-09 Thread Daniel P . Berrangé
The chardev socket backend will unref the QIOChannel object while it is still potentially open. When using TLS there could be a pending TLS handshake taking place. If the channel is left open then when the TLS handshake callback runs, it can end up accessing free'd memory in the

[PULL 03/17] qemu_init: increase NOFILE soft limit on POSIX

2024-02-09 Thread Daniel P . Berrangé
From: Fiona Ebner In many configurations, e.g. multiple vNICs with multiple queues or with many Ceph OSDs, the default soft limit of 1024 is not enough. QEMU is supposed to work fine with file descriptors >= 1024 and does not use select() on POSIX. Bump the soft limit to the allowed hard limit

[PULL 15/17] block: Support detached LUKS header creation using qemu-img

2024-02-09 Thread Daniel P . Berrangé
From: Hyman Huang Even though a LUKS header might be created with cryptsetup, qemu-img should be enhanced to accommodate it as well. Add the 'detached-header' option to specify the creation of a detached LUKS header. This is how it is used: $ qemu-img create --object secret,id=sec0,data=abc123

[PULL 07/17] docs: fix highlighting of CPU ABI header rows

2024-02-09 Thread Daniel P . Berrangé
The 'header-rows' directive indicates how many rows in the generated table are to be highlighted as headers. We only have one such row in the CSV file included. This removes the accident bold highlighting of the 'i486' CPU model. Signed-off-by: Daniel P. Berrangé ---

[PULL 16/17] crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS

2024-02-09 Thread Daniel P . Berrangé
From: Hyman Huang When querying the LUKS disk with the qemu-img tool or other APIs, add information about whether the LUKS header is detached. Additionally, update the test case with the appropriate modification. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé Signed-off-by:

[PULL 13/17] crypto: Modify the qcrypto_block_create to support creation flags

2024-02-09 Thread Daniel P . Berrangé
From: Hyman Huang Expand the signature of qcrypto_block_create to enable the formation of LUKS volumes with detachable headers. To accomplish that, introduce QCryptoBlockCreateFlags to instruct the creation process to set the payload_offset_sector to 0. Signed-off-by: Hyman Huang Reviewed-by:

  1   2   3   >