Re: [PATCH] docs/system/s390x: Document the "loadparm" machine property

2022-11-14 Thread Claudio Imbrenda
> > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2128235 > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > docs/system/s390x/bootdevices.rst | 26 ++ > 1 file changed, 26 insertions(+) > > diff --git a/docs/system/s390x/bootdevices.rst &g

[PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-03 Thread Claudio Imbrenda
";> Signed-off-by: Claudio Imbrenda --- include/qemu/osdep.h | 2 ++ os-posix.c | 5 qemu-options.hx | 17 ++ util/osdep.c | 55 4 files changed, 79 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-03 Thread Claudio Imbrenda
On Wed, 3 Aug 2022 18:34:45 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-04 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 09:29:39 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Berrangé wrote: > > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > > This patch adds support for asynchronously tearing down a VM on Linux.

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:41:01 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 04:49:29PM +0200, Claudio Imbrenda wrote: > > On Thu, 4 Aug 2022 09:29:39 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Be

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:56:34 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:58:34 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 09:20:59AM +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 07:56:49AM +0200, Claudio Imbrenda wrote: > > > On Wed, 3 Aug 2022 18:34:45 +0100 > > > Daniel P. Berrangé

[PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-08 Thread Claudio Imbrenda
u directly: http://libvirt.org/schemas/domain/qemu/1.0";> More advanced interfaces like pidfd or close_range have intentionally been avoided in order to be more compatible with older kernels. Signed-off-by: Claudio Imbrenda --- include/qemu/async-teardown.h | 22

Re: [PATCH v2 3/3] util/mmap-alloc: Remove qemu_mempath_getpagesize()

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:20 +0200 Thomas Huth wrote: > The last user of this function has just been removed, so we can > drop this function now, too. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > include/qemu/mmap-alloc.h | 2 -- > util/mmap

Re: [PATCH v2 0/3] Fix hugepages with memfd on s390x and clean up related code

2022-08-10 Thread Claudio Imbrenda
On Wed, 10 Aug 2022 14:57:17 +0200 Thomas Huth wrote: > The first patch fixes the problem that hugepages cannot be used via > the "memory-backend-memfd" object on s390x. The second and third patch > are some clean-ups that can be done after generalizing the code in the > first patch. thanks for

Re: [PATCH v2 1/3] backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize()

2022-08-10 Thread Claudio Imbrenda
ps://bugzilla.redhat.com/show_bug.cgi?id=2116496 > Suggested-by: David Hildenbrand > Signed-off-by: Thomas Huth more removed lines than added, I like it Reviewed-by: Claudio Imbrenda > --- > backends/hostmem.c | 14 ++ > 1 file changed, 2 insertions(+), 12 delet

Re: [PATCH v2 2/3] softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions

2022-08-10 Thread Claudio Imbrenda
on all host architectures. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > softmmu/physmem.c | 17 - > 1 file changed, 17 deletions(-) > > diff --git a/softmmu/physmem.c b/softmmu/physmem.c > index dc3c3e5f2e..50231bab30 1006

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Claudio Imbrenda
own.c > > > > diff --git a/include/qemu/async-teardown.h b/include/qemu/async-teardown.h > > new file mode 100644 > > index 00..092e7a37e7 > > --- /dev/null > > +++ b/include/qemu/async-teardown.h > > @@ -0,0 +1,22 @@ > > +/* > > + * A

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-11 Thread Claudio Imbrenda
On Thu, 11 Aug 2022 13:27:44 +0100 Daniel P. Berrangé wrote: > On Tue, Aug 09, 2022 at 08:40:24AM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-12 Thread Claudio Imbrenda
On Thu, 11 Aug 2022 23:05:52 -0300 Murilo Opsfelder Araújo wrote: > On 8/11/22 11:02, Daniel P. Berrangé wrote: > [...] > >>> Hmm, I was hoping you could just use SIGKILL to guarantee that this > >>> gets killed off. Is SIGKILL delivered too soon to allow for the > >>> main QEMU process to have

Re: [PATCH v3 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-12 Thread Claudio Imbrenda
On Fri, 12 Aug 2022 08:38:59 -0300 Murilo Opsfelder Araújo wrote: > On 8/12/22 04:26, Claudio Imbrenda wrote: > > On Thu, 11 Aug 2022 23:05:52 -0300 > > Murilo Opsfelder Araújo wrote: > > > >> On 8/11/22 11:02, Daniel P. Berrangé wrote: > >> [...] &

[PATCH v4 1/1] os-posix: asynchronous teardown for shutdown on Linux

2022-08-12 Thread Claudio Imbrenda
th libvirt by adding the following to the XML domain definition to pass the parameter to qemu directly: http://libvirt.org/schemas/domain/qemu/1.0";> Signed-off-by: Claudio Imbrenda Reviewed-by: Murilo Opsfelder Araujo Tested-by: Murilo Opsfelder Araujo --- include/qemu/asyn

[PATCH v1 1/1] pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

2019-11-28 Thread Claudio Imbrenda
Info") Signed-off-by: Claudio Imbrenda --- pc-bios/s390-ccw/sclp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/sclp.c b/pc-bios/s390-ccw/sclp.c index c0223fa..7251f9a 100644 --- a/pc-bios/s390-ccw/sclp.c +++ b/pc-bios/s390-ccw/sclp.c @@ -

Re: [PATCH v1 1/1] pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

2019-11-28 Thread Claudio Imbrenda
On Thu, 28 Nov 2019 13:33:57 +0100 Claudio Imbrenda wrote: [...] > Signed-off-by: Claudio Imbrenda I forgot this: Reported-by: Marc Hartmayer [...] please add the reported-by when merging :)

Re: [PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-17 Thread Claudio Imbrenda
On Tue, 17 Jan 2023 09:53:46 +0100 Thomas Huth wrote: [...] > > +static void *s390_pv_do_unprot_async_fn(void *p) > > +{ > > + s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL); > > + return NULL; > > +} > > + > > +bool s390_pv_vm_try_disable_async(void) > > +{ > > +QemuThread *t;

[PATCH v3 0/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
the new teardown option v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Claudio Imbrenda (1): util/async-teardown: wire up query-command-line-options os-posix.c| 14 ++ qemu-options.hx | 35 --- util/async-tear

[PATCH v3 1/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
wiring up the commandline option so that it appears in the output of query-command-line-options. Reported-by: Boris Fiuczynski Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda --- os-posix.c| 14 ++ qemu-

Re: [PATCH v3 1/1] util/async-teardown: wire up query-command-line-options

2023-03-24 Thread Claudio Imbrenda
On Fri, 24 Mar 2023 18:56:06 +0100 Thomas Huth wrote: > On 24/03/2023 18.45, Claudio Imbrenda wrote: > > The recently introduced -async-teardown commandline option was not > > wired up properly and did not show up in the output of the QMP command > > query-command-line-opt

[PATCH v4 1/1] util/async-teardown: wire up query-command-line-options

2023-03-27 Thread Claudio Imbrenda
Signed-off-by: Claudio Imbrenda --- os-posix.c| 15 +-- qemu-options.hx | 33 +++-- util/async-teardown.c | 21 + 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/os-posix.c b/os-posix.c index

[PATCH v4 0/1] util/async-teardown: wire up query-command-line-options

2023-03-27 Thread Claudio Imbrenda
nts to the new teardown option v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Claudio Imbrenda (1): util/async-teardown: wire up query-command-line-options os-posix.c| 15 +-- qemu-options.hx | 33 +++-- u

[PATCH v5 1/1] util/async-teardown: wire up query-command-line-options

2023-03-27 Thread Claudio Imbrenda
t was introduced only in the previous version and it had no users, since it was not visible in the query-command-line-options QMP command. Drop it. Reported-by: Boris Fiuczynski Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda

[PATCH v5 0/1] util/async-teardown: appear in query-command-line-options

2023-03-27 Thread Claudio Imbrenda
as] v2->v3 * add a new teardown option with an async parameter [Markus] * reworded documentation of existing -async-teardown option so that it points to the new teardown option v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Claudio Imbrenda (1): util/async-teardo

[PATCH v1 1/1] s390x/pv: Fix spurious warning with asynchronous teardown

2023-05-09 Thread Claudio Imbrenda
pointless overhead; normal teardown is fast enough for small VMs. Reported-by: Marc Hartmayer Fixes: c3a073c610 ("s390x/pv: Add support for asynchronous teardown for reboot") Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

Re: [PATCH v1 1/1] s390x/pv: Fix spurious warning with asynchronous teardown

2023-05-10 Thread Claudio Imbrenda
On Wed, 10 May 2023 08:47:08 +0200 Thomas Huth wrote: > On 09/05/2023 18.27, Claudio Imbrenda wrote: > > When rebooting a small VM using asynchronous teardown, a spurious > > warning is emitted when the KVM_PV_ASYNC_CLEANUP_PREPARE ioctl fails. > > Why does the _PREPARE f

[PATCH v2 1/1] s390x/pv: Fix spurious warning with asynchronous teardown

2023-05-10 Thread Claudio Imbrenda
us teardown for reboot") Link: https://lore.kernel.org/all/20230421085036.52511-2-imbre...@linux.ibm.com/ Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 10 -- hw/s390x/s390-virtio-ccw.c | 2 +- include/hw/s390x/pv.h | 2 +- 3 files changed, 10 insertions(+),

[PATCH v2 0/1] s390x/pv: Fix spurious warning with asynchronous teardown

2023-05-10 Thread Claudio Imbrenda
hine state to s390_pv_vm_try_disable_async instead of using qdev_get_machine() [thomas] * Update and improve patch description and comments Claudio Imbrenda (1): s390x/pv: Fix spurious warning with asynchronous teardown hw/s390x/pv.c | 10 -- hw/s390x/s390-virtio-ccw.c | 2 +- inc

[PATCH v6 0/1] util/async-teardown: appear in query-command-line-options

2023-04-28 Thread Claudio Imbrenda
mediately instead of returning an error [thomas] v2->v3 * add a new teardown option with an async parameter [Markus] * reworded documentation of existing -async-teardown option so that it points to the new teardown option v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Clau

[PATCH v6 1/1] util/async-teardown: wire up query-command-line-options

2023-04-28 Thread Claudio Imbrenda
ot;os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda --- docs/about/deprecated.rst | 5 + os-posix.c| 15 +++ qemu-options.hx | 34 +++--- util/async-teardown.c | 21 ++

Re: [PATCH v6 1/1] util/async-teardown: wire up query-command-line-options

2023-04-28 Thread Claudio Imbrenda
On Fri, 28 Apr 2023 14:16:42 +0200 Thomas Huth wrote: > On 28/04/2023 13.12, Claudio Imbrenda wrote: > > Add new -run-with option with an async-teardown=on|off parameter. It is > > visible in the output of query-command-line-options QMP command, so it > > can be discovere

[PATCH v7 0/1] util/async-teardown: appear in query-command-line-options

2023-05-05 Thread Claudio Imbrenda
tion so that it points to the new teardown option v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Claudio Imbrenda (1): util/async-teardown: wire up query-command-line-options docs/about/deprecated.rst | 5 + os-posix.c| 13 + qemu-options

[PATCH v7 1/1] util/async-teardown: wire up query-command-line-options

2023-05-05 Thread Claudio Imbrenda
ot;os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda --- docs/about/deprecated.rst | 5 + os-posix.c| 13 + qemu-options.hx | 34 +++--- util/async-teardown.c | 21 ++

[PATCH v1 1/1] util/async-teardown: wire up query-command-line-options

2023-03-20 Thread Claudio Imbrenda
wiring up the commandline option so that it appears in the output of query-command-line-options. Reported-by: Boris Fiuczynski Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda --- util/async-teardown.c | 18 ++ 1 fi

Re: [PATCH v1 1/1] util/async-teardown: wire up query-command-line-options

2023-03-20 Thread Claudio Imbrenda
On Mon, 20 Mar 2023 09:56:05 +0100 Thomas Huth wrote: > On 20/03/2023 08.48, Claudio Imbrenda wrote: > > The recently introduced -async-teardown commandline option was not > > wired up properly and did not show up in the output of the QMP command > > query-command-line-opt

[PATCH v2 1/1] util/async-teardown: wire up query-command-line-options

2023-03-20 Thread Claudio Imbrenda
wiring up the commandline option so that it appears in the output of query-command-line-options. Reported-by: Boris Fiuczynski Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda --- util/async-teardown.c | 17 + 1 fi

[PATCH v2 0/1] util/async-teardown: wire up query-command-line-options

2023-03-20 Thread Claudio Imbrenda
wiring up the commandline option so that it appears in the output of query-command-line-options. v1->v2 * remove the unneeded .implied_opt_name initializer [Thomas] Claudio Imbrenda (1): util/async-teardown: wire up query-command-line-options util/async-teardown.c | 17 + 1 f

Re: [PATCH v2 1/1] util/async-teardown: wire up query-command-line-options

2023-03-20 Thread Claudio Imbrenda
On Mon, 20 Mar 2023 17:05:07 +0100 Markus Armbruster wrote: > Thomas Huth writes: > > > On 20/03/2023 16.31, Markus Armbruster wrote: > >> Claudio Imbrenda writes: > >> > >>> The recently introduced -async-teardown commandline option was not >

[PATCH v3 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-02-14 Thread Claudio Imbrenda
considerably speeds up the reboot of a protected VM; for large VMs especially, it could take a long time to perform a reboot with the traditional synchronous teardown, while with this patch it is almost immediate. Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 28

[PATCH v3 1/2] Linux header update

2023-02-14 Thread Claudio Imbrenda
Update kvm.h Linux header with these commits: 8c516b25d6e9 ("KVM: s390: pv: add KVM_CAP_S390_PROTECTED_ASYNC_DISABLE") fb491d5500a7 ("KVM: s390: pv: asynchronous destroy for reboot") Signed-off-by: Claudio Imbrenda --- linux-headers/linux/kvm.h | 3 +++ 1 file changed, 3

[PATCH v3 0/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-02-14 Thread Claudio Imbrenda
ame of the thread directly * make the name of the thread more understandable Claudio Imbrenda (2): Linux header update s390x/pv: Add support for asynchronous teardown for reboot hw/s390x/pv.c | 28 hw/s390x/s390-virtio-ccw.c | 5 - include/hw/s390

[PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2022-12-22 Thread Claudio Imbrenda
considerably speeds up the reboot of a protected VM; for large VMs especially, it could take a long time to perform a reboot with the traditional synchronous teardown, while with this patch it is almost immediate. Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 28

[PATCH v1 0/2] s390x/pv: Add support for asynchronous teardown for reboot

2022-12-22 Thread Claudio Imbrenda
teardown, the rebooted guest will be able to continue immediately, while a background thread actually performs the necessary cleanup. Claudio Imbrenda (2): Linux header update s390x/pv: Add support for asynchronous teardown for reboot hw/s390x/pv.c | 28

[PATCH v1 1/2] Linux header update

2022-12-22 Thread Claudio Imbrenda
Signed-off-by: Claudio Imbrenda --- linux-headers/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ebdafa576d..122b273433 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1175,6 +1175,7

Re: [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-03 Thread Claudio Imbrenda
On Tue, 3 Jan 2023 12:27:32 +0100 Thomas Huth wrote: > On 22/12/2022 16.04, Claudio Imbrenda wrote: > > This patch adds support for the asynchronous teardown for reboot for > > protected VMs. > [...] > > +bool s390_pv_vm_try_disable_async(void) > > +{ > > +

Re: [PATCH 2/5] s390x/pv: Implement CGS check handler

2023-01-05 Thread Claudio Imbrenda
On Thu, 5 Jan 2023 12:42:54 +0100 Thomas Huth wrote: > On 04/01/2023 12.51, Cédric Le Goater wrote: > > From: Cédric Le Goater > > > > When a protected VM is started with the maximum number of CPUs (248), > > the service call providing information on the CPUs requires more > > buffer space than

Re: [PATCH 4/5] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-05 Thread Claudio Imbrenda
On Wed, 4 Jan 2023 12:51:10 +0100 Cédric Le Goater wrote: > From: Cédric Le Goater > > If a secure kernel is started in a non-protected VM, the OS will hang > during boot without giving a proper error message to the user. > > Perform the checks on Confidential Guest support at runtime with an

[PATCH v2 1/2] Linux header update

2023-01-05 Thread Claudio Imbrenda
Signed-off-by: Claudio Imbrenda --- linux-headers/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ebdafa576d..122b273433 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1175,6 +1175,7

[PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-05 Thread Claudio Imbrenda
considerably speeds up the reboot of a protected VM; for large VMs especially, it could take a long time to perform a reboot with the traditional synchronous teardown, while with this patch it is almost immediate. Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 25

[PATCH v2 0/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-05 Thread Claudio Imbrenda
teardown, the rebooted guest will be able to continue immediately, while a background thread actually performs the necessary cleanup. v1->v2: * remove useless snprintf and pass the name of the thread directly * make the name of the thread more understandable Claudio Imbrenda (2): Linux header upd

[PATCH] s390x/pv: remove semicolon from macro definition

2022-10-10 Thread Claudio Imbrenda
Remove spurious semicolon at the end of the macro s390_pv_cmd Signed-off-by: Claudio Imbrenda --- hw/s390x/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 401b63d6cb..9bcd5d829f 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -45,7

[PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
teardown process will share the same cgroups as qemu, so both memory usage and cpu time will be accounted properly. Signed-off-by: Claudio Imbrenda --- include/qemu/osdep.h | 2 ++ os-posix.c | 3 +++ qemu-options.hx | 17 util/osdep.c | 47

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
On Mon, 6 Dec 2021 11:21:10 + Daniel P. Berrangé wrote: > On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
On Mon, 6 Dec 2021 11:47:55 + Daniel P. Berrangé wrote: > On Mon, Dec 06, 2021 at 12:43:12PM +0100, Claudio Imbrenda wrote: > > On Mon, 6 Dec 2021 11:21:10 + > > Daniel P. Berrangé wrote: > > > > > On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbren

Re: util/async-teardown.c: is it really needed for --disable-system build?

2023-08-14 Thread Claudio Imbrenda
On Sat, 12 Aug 2023 12:48:14 +0300 Michael Tokarev wrote: > 12.08.2023 12:38, Michael Tokarev wrote: > ... > > It smells like, at the very least, os-posix.c should be split. We shouldn't > > include > > a ton of qemu-system functionality (like very specific option parsing) into > > qemu-nbd > >

Re: util/async-teardown.c: is it really needed for --disable-system build?

2023-08-14 Thread Claudio Imbrenda
On Mon, 14 Aug 2023 10:12:35 +0300 Michael Tokarev wrote: > 14.08.2023 10:01, Claudio Imbrenda wrote: > > > I think we could guard the offending item with CONFIG_SOFTMMU for now, > > to immediately fix the issues you raised, and do the refactoring you > > propose

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Claudio Imbrenda
at it, add a proper STACK_SIZE macro for the stack size > instead of using magic numbers (this is also required for the following > patch). > > Reviewed-by: Christian Borntraeger > Reviewed-by: Cédric Le Goater > Signed-off-by: Thomas Huth with Marc's suggest

Re: [PATCH v2 4/4] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-27 Thread Claudio Imbrenda
CK_SIZE - 160 /* Set up stack */ > > /* clear bss */ > -larl%r2,__bss_start > +larl%r2,.bss > larl%r3,_end since we are here, do you have guarantees that _end is always correctly aligned? if so: Reviewed-by: Claudio Imbrenda > slgr%r3,%r2/* get sizeof bss */ > ltgr%r3,%r3/* bss empty? */

Re: [PATCH v2 1/4] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-27 Thread Claudio Imbrenda
390x/ folder already, so let's adjust start.S accordingly. > > Reviewed-by: Cédric Le Goater > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > pc-bios/s390-ccw/start.S | 136 +++ > 1 file changed, 68 insertions(+), 68 del

Re: [PATCH v2 3/4] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-27 Thread Claudio Imbrenda
for aligning it to page > boundaries. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > pc-bios/s390-ccw/s390-ccw.h | 1 - > pc-bios/s390-ccw/main.c | 1 - > pc-bios/s390-ccw/netmain.c | 1 - > pc-bios/s390-ccw/start.S| 6 ++ > 4 files ch

Re: [PATCH] pc-bios/s390-ccw: Get rid of the the __u* types

2023-06-27 Thread Claudio Imbrenda
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers/s390/cio/cio.h?id=cd6b4f27b9bb2a > > So we should get rid of the __u* in the s390-ccw bios now finally, too. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > Ba

Re: [PATCH v3 7/7] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-29 Thread Claudio Imbrenda
On Thu, 29 Jun 2023 12:48:21 +0200 Thomas Huth wrote: > start.S currently cannot be compiled with Clang 16 and binutils 2.40: > > ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for > relocation R_390_PC32DBL > > According to the built-in linker script of ld, the symbol _

Re: [PATCH v3 1/7] s390-ccw: Getting rid of ulong

2023-06-29 Thread Claudio Imbrenda
30510143925.4094-4-quint...@redhat.com> > Reviewed-by: Thomas Huth Reviewed-by: Claudio Imbrenda > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/helper.h| 2 +- > pc-bios/s390-ccw/s390-ccw.h | 7 +++ > pc-bios/s390-ccw/virtio-scsi.h | 2 +- > pc-bi

Re: [PATCH v3 7/7] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-29 Thread Claudio Imbrenda
On Thu, 29 Jun 2023 13:12:26 +0200 Thomas Huth wrote: > On 29/06/2023 12.58, Claudio Imbrenda wrote: > > On Thu, 29 Jun 2023 12:48:21 +0200 > > Thomas Huth wrote: > > > >> start.S currently cannot be compiled with Clang 16 and binutils 2.40: > >> &g

Re: [PATCH] os-posix: Allow 'chroot' via '-run-with' and deprecate the old '-chroot' option

2023-06-30 Thread Claudio Imbrenda
) and that the options become introspectable via QMP this way. > So let's start moving more switches into this option group, starting > with "-chroot" now. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > docs/about/depr

Re: [PATCH v3 5/6] util/async-teardown: Use qemu_close_range() to close fds

2023-06-19 Thread Claudio Imbrenda
On Sat, 17 Jun 2023 13:36:20 +0800 Bin Meng wrote: > From: Zhangjin Wu > > Based on the old close_all_open_fd() of util/async-teardown.c, a new > generic qemu_close_range() has been added in osdep.c. > > Now, let's switch over to use the generic qemu_close_range(). > > Signed-off-by: Zhangjin

Re: [PATCH v3 6/6] net: tap: Use qemu_close_range() to close fds

2023-06-19 Thread Claudio Imbrenda
On Sat, 17 Jun 2023 13:36:21 +0800 Bin Meng wrote: > From: Zhangjin Wu > > Current codes using a brute-force traversal of all file descriptors > do not scale on a system where the maximum number of file descriptors > is set to a very large value (e.g.: in a Docker container of Manjaro > distrib

Re: [PATCH v3 3/6] util/async-teardown: Fall back to close fds one by one

2023-06-19 Thread Claudio Imbrenda
On Sat, 17 Jun 2023 13:36:18 +0800 Bin Meng wrote: > When opening /proc/self/fd fails, current codes just return directly, > but we can fall back to close fds one by one. > > Signed-off-by: Bin Meng > > --- > > (no changes since v2) > > Changes in v2: > - new patch: "util/async-teardown: Fal

Re: [PATCH v3 4/6] util/osdep: Introduce qemu_close_range()

2023-06-19 Thread Claudio Imbrenda
On Sat, 17 Jun 2023 13:36:19 +0800 Bin Meng wrote: > This introduces a new QEMU API qemu_close_range() that closes all > open file descriptors from first to last (included). > > This API will try a more efficient call to close_range(), or walk > through of /proc/self/fd whenever these are possib

Re: [PATCH] MAINTAINERS: Fix a couple s390 paths

2023-10-20 Thread Claudio Imbrenda
On Fri, 20 Oct 2023 16:15:09 +0200 Eric Farman wrote: > These are simple typos, since the directories don't exist but the > files themselves do in hw/s390x/ > > Fixes: 56e3483402 ("MAINTAINERS: split out s390x sections") > Signed-off-by: Eric Farman

Re: [PATCH] target/s390x/kvm/pv: Provide some more useful information if decryption fails

2024-01-09 Thread Claudio Imbrenda
t's provide at least a somewhat nicer hint to the users so that they > are able to figure out what might have gone wrong. > > Buglink: https://issues.redhat.com/browse/RHEL-18212 > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > target/s390x/kvm/p

Re: [PATCH v2] target/s390x/kvm/pv: Provide some more useful information if decryption fails

2024-01-11 Thread Claudio Imbrenda
n *execution with that fixed: Reviewed-by: Claudio Imbrenda > host key. However, if you still (accidentally) do it, you only get a > very user-unfriendly error message that looks like this: > > qemu-system-s390x: KVM PV command 2 (KVM_PV_SET_SEC_PARMS) failed: > header rc 108 rr

Re: [PATCH 3/5] qemu-options: Remove the deprecated -async-teardown option

2024-01-12 Thread Claudio Imbrenda
On Fri, 12 Jan 2024 11:00:57 +0100 Thomas Huth wrote: > It's been marked as deprecated since QEMU 8.1 (and was only available > since QEMU 8.0 anyway), so it should be fine to remove this now. > > Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda > --- > do

Re: [PATCH 2/4] target/s390x/dump: Remove unneeded dump info function pointer init

2023-11-07 Thread Claudio Imbrenda
On Tue, 7 Nov 2023 14:20:46 + Janosch Frank wrote: > dump_state_prepare() now sets the fucntion pointers to NULL so we only > need to touch them if we're going to use them. > > Signed-off-by: Janosch Frank I would merge this and the previous patch > --- > target/s390x/arch_dump.c | 4 --

Re: [PATCH v2 3/3] target/s390x/arch_dump: Add arch cleanup function for PV dumps

2023-11-09 Thread Claudio Imbrenda
for the dump file. > > Let's add a cleanup function that tries to do a dump end. The dump > completion data is discarded but there's no point in writing it to a > file anyway if there's a possibility that other PV dump data is > missing. > > Signed-off-by: Janosch Fr

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2016-10-28 Thread Claudio Imbrenda
On 27/10/16 13:40, Pedro Alves wrote: > I'm not a qemu gdbstub expert, but FYI, seeing this reminded me to push > to gdb's master a (getting old) gdb patch that clarifies how vCont actions > should be interpreted: > > https://sourceware.org/ml/gdb-patches/2016-02/msg00493.html > > It's already l

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2016-10-28 Thread Claudio Imbrenda
On 28/10/16 16:01, Pedro Alves wrote: >> From the new specifications I seem to understand that if I specify a >> default as first action, then no further actions will be considered, >> since it matches all threads? > > Right. ok, that's the way I understand the new specs, which is not how I had u

[Qemu-devel] [PATCH v3 2/2] gdbstub: Fix vCont behaviour

2016-10-28 Thread Claudio Imbrenda
is issued, all VCPUs continue to run, although all but VCPU nr 2 are to be stopped. This patch completely rewrites the vCont parsing code. Please note that this improvement only works in system emulation mode, when in userspace emulation mode the old behaviour is preserved. Signed-off-

[Qemu-devel] [PATCH v3 1/2] move vm_start to cpus.c

2016-10-28 Thread Claudio Imbrenda
from resume_all_vcpus, and add an explicit call to it before each instance of resume_all_vcpus in the code. Signed-off-by: Claudio Imbrenda --- cpus.c | 44 +++- hw/i386/kvmvapic.c | 2 ++ include/sysemu/cpus.h | 1 + in

[Qemu-devel] [PATCH v3 0/2] Qemu: gdbstub: fix vCont

2016-10-28 Thread Claudio Imbrenda
https://sourceware.org/gdb/onlinedocs/gdb/Packets.html v2 -> v3 * removed resume_some_vcpus * cleared up the code and simplified the implementation in light of the clarification in the specification of the vCont packet Claudio Imbrenda (2): move vm_start to cpus.c gdbstub: Fix vCont behavi

Re: [Qemu-devel] [PATCH v3 0/2] Qemu: gdbstub: fix vCont

2016-11-30 Thread Claudio Imbrenda
me in suspense :) thanks! Claudio On 28/10/16 19:15, Claudio Imbrenda wrote: > This small patchset fixes the incorrect behaviour of the vCont command > in the gdb stub. > > The first patch, as suggested be Paolo, refactors some code. The most > visible change is that it moves vm_start

Re: [Qemu-devel] [PATCH for-2.8 2/2] vhost-vsock: add virtio sockets device

2016-09-12 Thread Claudio Imbrenda
On 09/09/16 23:07, Michael S. Tsirkin wrote: [...] > Seems to fail build: > > /scm/qemu/hw/s390x/virtio-ccw.c:1664:4: error: ‘VirtioCcwDevice {aka > struct VirtioCcwDevice}’ has no member named ‘bus_id’ > DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id), > ^ > /scm/qemu/hw/s390x/virtio

[Qemu-devel] a small issue with VSOCK

2016-11-15 Thread Claudio Imbrenda
wanted to raise the issue here, so that you are now aware of it, and can maybe fix it in the future. best regards, Claudio Imbrenda

[Qemu-devel] [PATCH v1 0/2] Qemu: gdbstub: fix vCont and single-step

2016-10-10 Thread Claudio Imbrenda
(single-step) commands to behave like c (continue) commands. Claudio Imbrenda (2): gdbstub: Fix single-step gdbstub: Fix vCont behaviour gdbstub.c | 189 +- kvm-all.c | 1 + 2 files changed, 151 insertions(+), 39 deletions(-) -- 1.9.1

[Qemu-devel] [PATCH v1 1/2] gdbstub: Fix single-step

2016-10-10 Thread Claudio Imbrenda
Commit e0eeb4a21a3ca4b296220ce4449d8acef9de9049 introduced a bug that causes single-step in the gdbstub to not work, at least in kvm. CPUs that are supposed to single-step will instead run normally. This small patch fixes the problem. (tested on s390x) Signed-off-by: Claudio Imbrenda --- kvm

[Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-10 Thread Claudio Imbrenda
is issued, all VCPUs continue to run, although all but VCPU nr 2 are to be stopped. This patch: * adds an additional helper function to selectively restart only some CPUs * completely rewrites the vCont parsing code Signed-off-by: Claudio Imbrenda

Re: [Qemu-devel] [PATCH] kvm-all: don't use stale dbg_data->cpu

2016-10-11 Thread Claudio Imbrenda
Tested-by: Claudio Imbrenda On 10/10/16 17:46, Alex Bennée wrote: > The changes to run_on_cpu and friends mean that all helpers are passed > the CPUState of vCPU they are running on. The conversion missed the > field in commit e0eeb4a21a3ca4b296220ce4449d8acef9de9049 which > int

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr

2016-10-11 Thread Claudio Imbrenda
Hi, I noticed that this patch kills the Qemu monitor for me. If I start a text-mode guest with -nographic, then I can't switch to the monitor any longer with Ctrl+a c . The guest works otherwise, e.g. I can login from the console. Tested on s390, but I think it's a more general issue, since the p

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-12 Thread Claudio Imbrenda
On 12/10/16 15:15, David Hildenbrand wrote: >>> +for (cx = 0; ccpus && ccpus[cx]; cx++) { >>> +cpu_single_step(cpu, 0); > > This looks suspicious why? we set all cpus to single step, since that is the default, and then we clear the single-step property from all CPUs th

[Qemu-devel] [PATCH v2 0/2] Qemu: gdbstub: fix vCont

2016-10-14 Thread Claudio Imbrenda
should be restarted except the first, and when a vCont;s:1 is received, the first CPU should be stepped without restarting the others. With this patchset Qemu now behaves as expected. See here for reference material about the packets: https://sourceware.org/gdb/onlinedocs/gdb/Packets.html Claudio

[Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2016-10-14 Thread Claudio Imbrenda
userspace emulation mode the old behaviour is preserved. Signed-off-by: Claudio Imbrenda --- gdbstub.c | 226 +- 1 file changed, 179 insertions(+), 47 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index ecea8c4..ea42afa 100644 -

[Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2016-10-14 Thread Claudio Imbrenda
from resume_all_vcpus, and add an explicit call to it before each instance of resume_all_vcpus in the code. * adds resume_some_vcpus, to selectively restart only some CPUs. Signed-off-by: Claudio Imbrenda --- cpus.c | 61 +- hw

Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: rename cpu_index -> cpu_gdb_index

2017-06-01 Thread Claudio Imbrenda
s); > > -static inline int cpu_index(CPUState *cpu) > +/* Return the GDB index for a given vCPU state. > + * > + * For user mode this is simply the thread id. In system mode GDB > + * numbers CPUs from 1 as 0 is reserved as an "any cpu" index. > + */ > +static inline int cpu_gdb_index(CPUState *cpu) > { > #if defined(CONFIG_USER_ONLY) > return cpu->host_tid; I like this solution Reviewed-by: Claudio Imbrenda

Re: [Qemu-devel] [PATCH v2 3/4] qom/cpu: remove host_tid field

2017-06-01 Thread Claudio Imbrenda
he benefit of dropping the broken @host_tid :) I agree with this > > Signed-off-by: Alex Bennée > > --- > > In any case. > > Reviewed-by: Greg Kurz and me too Reviewed-by: Claudio Imbrenda > > gdbstub.c | 15 +++ > > include/exec/gdb

Re: [Qemu-devel] [PATCH v2 4/4] gdbstub: don't fail on vCont; C04:0; c packets

2017-06-01 Thread Claudio Imbrenda
cpu = find_cpu(idx); > /* invalid CPU/thread specified */ > -if (!idx || !cpu) { > +if (!cpu) { > res = -EINVAL; > goto out; > } > + > /* only use if no previous match occourred */ > if (newstates[cpu->cpu_index] == 1) { > newstates[cpu->cpu_index] = cur_action; Reviewed-by: Claudio Imbrenda

[Qemu-devel] [PATCH v6 0/2] Qemu: gdbstub: fix vCont

2017-01-26 Thread Claudio Imbrenda
.0-rc2, no changes needed v2 -> v3 * removed resume_some_vcpus * cleared up the code and simplified the implementation in light of the clarification in the specification of the vCont packet Claudio Imbrenda (2): move vm_start to cpus.c gdbstub: Fix vCont behaviour cpus.c

[Qemu-devel] [PATCH v6 1/2] move vm_start to cpus.c

2017-01-26 Thread Claudio Imbrenda
from resume_all_vcpus, and add an explicit call to it before each instance of resume_all_vcpus in the code. Signed-off-by: Claudio Imbrenda --- cpus.c | 42 ++ include/sysemu/sysemu.h | 2 ++ vl.c

  1   2   3   >