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
> ---
> docs/ab
certain
*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 rrc
rovide 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/pv.c | 20 +
he 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 Frank
Reviewed-by: C
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
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
Revi
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
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
>
) 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/deprecate
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
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
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
>
> 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
ing 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 changed, 6 i
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 deletion
ZE - 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? */
t, 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 suggestion applie
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
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:
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
>
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:
machine 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
ronous 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(+),
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
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
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 ++
rdown 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-teardown: wire up query-command-line-options
docs/about/deprecated.rst | 5 +
os-posix.c| 13 +
qemu-options
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
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 ++
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
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-teardown: w
, but it 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
---
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
os-posix.c| 15 +--
qemu-options.hx | 33 +++--
u
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
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-lin
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-
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| 14 ++
qemu-options.hx | 35 ---
util/async-tear
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
&
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
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
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-lin
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
e name 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
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
.
This 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
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
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
.
This 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
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
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
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
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)
> > +{
> > +
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
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
.
This 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
>
> 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
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
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/async-tea
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:
> >> [...]
&
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
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 fat
; 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 @@
> > +/*
> > + * Asynchronous teardo
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
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
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
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
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 +
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
> > >
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 fat
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
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.
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 fat
ned-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/osde
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
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 fat
.
The 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
let's not do anything in case the prefix doesn't change.
also looks like a good idea
Reviewed-by: Claudio Imbrenda
> Cc: Richard Henderson
> Cc: David Hildenbrand
> Cc: Cornelia Huck
> Cc: Thomas Huth
> Cc: Claudio Imbrenda
> Cc: qemu-s3...@nongnu.org
> Signed-off-by: Da
e. The alternative would be to allocate a static 4K for
> > > the work_sccb.
> >
> > I had someone take a look at the patch for PV and was told
> > everything looks sane. Since the patches have already been applied,
> > it seems like it's too late to add a reviewed-
On Tue, 4 Aug 2020 15:24:09 +0200
Thomas Huth wrote:
> On 03/08/2020 10.46, Claudio Imbrenda wrote:
> > On Tue, 28 Jul 2020 20:37:31 +0200
> > Thomas Huth wrote:
> >
> >> Move the code to a separate function to be able to re-use it from a
> >> dif
On Tue, 28 Jul 2020 20:37:31 +0200
Thomas Huth wrote:
> Move the code to a separate function to be able to re-use it from a
> different spot later.
>
> Signed-off-by: Thomas Huth
> ---
> pc-bios/s390-ccw/main.c | 99
> - 1 file changed, 57
>
On Tue, 28 Jul 2020 20:37:33 +0200
Thomas Huth wrote:
> If no boot device has been specified (via "bootindex=..."), the
> s390-ccw bios scans through all devices to find a bootable device.
maybe a better title for the patch is "scan through all devices if no
boot device specified" then, since
> +
> +int main(void)
> +{
> +sclp_setup();
> +css_setup();
> +boot_setup();
> +find_boot_device();
> +enable_subchannel(blk_schid);
> +ipl_boot_device();
>
> panic("Failed to load OS from hard disk\n");
> return 0; /* make compiler happy */
Reviewed-by: Claudio Imbrenda
ct-aliasing
> -fno-asynchronous-unwind-tables QEMU_CFLAGS += $(call cc-option,
> $(QEMU_CFLAGS), -fno-stack-protector) +QEMU_CFLAGS += -msoft-float
> -march=z900 +QEMU_CFLAGS += -std=gnu99
> LDFLAGS += -Wl,-pie -nostdlib
>
> build-all: s390-ccw.img s390-netboot.img
Reviewed-by: Claudio Imbrenda
On Fri, 10 Jul 2020 17:12:36 +0200
David Hildenbrand wrote:
> Let's implement diag260 - "Access Certain Virtual Machine
> Information", used under z/VM to expose the storage configuration
> (especially, layout of storage extends and thereby holes). For now,
> the returned information is
On Tue, 9 Jun 2020 11:41:30 +0200
Halil Pasic wrote:
[...]
> I don't know. Janosch could answer that, but he is on vacation. Adding
> Claudio maybe he can answer. My understanding is, that while it might
> be possible, it is ugly at best. The ability to do a transition is
> indicated by a CPU
On Wed, 18 Mar 2020 10:30:32 -0400
Janosch Frank wrote:
> They are part of the IPL process, so let's put them into the ipl
> header.
>
> Signed-off-by: Janosch Frank
Reviewed-by: Claudio Imbrenda
> ---
> hw/s390x/ipl.h | 11 +++
> target/s390x/diag.c
On Fri, 13 Mar 2020 15:21:07 +0100
Janosch Frank wrote:
> On 3/13/20 1:57 PM, Claudio Imbrenda wrote:
> > On Wed, 11 Mar 2020 09:21:45 -0400
> > Janosch Frank wrote:
> >
> >> Handling of CPU reset and setting of the IPL psw from guest
> >> storage a
On Fri, 13 Mar 2020 15:21:07 +0100
Janosch Frank wrote:
> On 3/13/20 1:57 PM, Claudio Imbrenda wrote:
> > On Wed, 11 Mar 2020 09:21:45 -0400
> > Janosch Frank wrote:
> >
> >> Handling of CPU reset and setting of the IPL psw from guest
> >> storage a
n't need HW
> support */ set_bit(S390_FEAT_ZPCI, model->features);
> set_bit(S390_FEAT_ADAPTER_EVENT_NOTIFICATION, model->features);
Reviewed-by: Claudio Imbrenda
error_free_or_abort(_mig_blocker);
> return rc;
> @@ -345,6 +349,7 @@ static int
> s390_machine_protect(S390CcwMachineState *ms) /* Create SE VM */
> rc = s390_pv_vm_enable();
> if (rc) {
> +qemu_balloon_inhibit(false);
> error_report_err(local_err);
> migrate_del_blocker(pv_mig_blocker);
> error_free_or_abort(_mig_blocker);
looks straightforward
Reviewed-by: Claudio Imbrenda
On Wed, 11 Mar 2020 09:21:45 -0400
Janosch Frank wrote:
> Handling of CPU reset and setting of the IPL psw from guest storage at
> offset 0 is done by a Ultravisor call. Let's only fetch it if
> necessary.
>
> Signed-off-by: Janosch Frank
> Reviewed-by: Thomas Huth
> Reviewed-by: David
+return rc;
> +}
> +
> /* Create SE VM */
> rc = s390_pv_vm_enable();
> if (rc) {
> +error_report_err(local_err);
> +migrate_del_blocker(pv_mig_blocker);
> +error_free_or_abort(_mig_blocker);
> return rc;
> }
>
looks rather straightforward
Reviewed-by: Claudio Imbrenda
(long)cs->kvm_run->psw_addr);
> switch (icpt_code) {
> case ICPT_INSTRUCTION:
> +case ICPT_PV_INSTR:
> +case ICPT_PV_INSTR_NOTIFICATION:
> r = handle_instruction(cpu, run);
> break;
> case ICPT_PROGRAM:
very straightforward
Reviewed-by: Claudio Imbrenda
On Wed, 11 Mar 2020 09:21:48 -0400
Janosch Frank wrote:
> For protected guests, we need to put the IO emulation results into the
> SIDA, so SIE will write them into the guest at the next entry.
>
> Signed-off-by: Janosch Frank
> ---
> target/s390x/ioinst.c | 87
>
r,
> bool store_arch) hwaddr len = sizeof(*sa);
> int i;
>
> +/* Storing will occur on next SIE entry for protected VMs */
> +if (s390_is_pv()) {
> + return 0;
> +}
> +
> sa = cpu_physical_memory_map(addr, , true);
> if (!sa) {
> return -EFAULT;
Reviewed-by: Claudio Imbrenda
; +int ret;
> +
> + if (kvm_enabled()) {
> +ret = kvm_s390_mem_op_pv(cpu, offset, hostbuf, len,
> is_write);
> +} else {
> +/* Protected Virtualization is a KVM/Hardware only feature */
> +g_assert_not_reached();
> +}
> +return ret;
> +}
> +
> /**
> * s390_cpu_virt_mem_rw:
> * @laddr: the logical start address
Reviewed-by: Claudio Imbrenda
ludes the encrypted
> +components (kernel, initrd, cmdline), the stage3a loader and
> +metadata. In case this boot method is used, the command line
> +options -initrd and -cmdline are ineffective. The preparation of a
> PVM +image is done by genprotimg of the s390-tools package.
Reviewed-by: Claudio Imbrenda
VALID 0x0402
> +#define DIAG_308_RC_NO_PV_CONF 0x0902
>
> #define DIAG308_RESET_MOD_CLR 0
> #define DIAG308_RESET_LOAD_NORM 1
> @@ -59,10 +61,17 @@ int handle_diag_288(CPUS390XState *env, uint64_t
> r1, uint64_t r3) #define DIAG308_LOAD_NORMAL_DUMP4
> #define DIAG308_SET 5
> #define DIAG308_STORE 6
> +#define DIAG308_PV_SET 8
> +#define DIAG308_PV_STORE9
> +#define DIAG308_PV_START10
>
> static int diag308_parm_check(CPUS390XState *env, uint64_t r1,
> uint64_t addr, uintptr_t ra, bool write)
> {
> +/* Handled by the Ultravisor */
> +if (s390_is_pv()) {
> +return 0;
> +}
> if ((r1 & 1) || (addr & ~TARGET_PAGE_MASK)) {
> s390_program_interrupt(env, PGM_SPECIFICATION, ra);
> return -1;
> @@ -93,6 +102,11 @@ void handle_diag_308(CPUS390XState *env, uint64_t
> r1, uint64_t r3, uintptr_t ra) return;
> }
>
> +if (subcode >= DIAG308_PV_SET &&
> !s390_has_feat(S390_FEAT_UNPACK)) {
> +s390_program_interrupt(env, PGM_SPECIFICATION, ra);
> +return;
> +}
> +
> switch (subcode) {
> case DIAG308_RESET_MOD_CLR:
> s390_ipl_reset_request(cs, S390_RESET_MODIFIED_CLEAR);
> @@ -105,6 +119,7 @@ void handle_diag_308(CPUS390XState *env, uint64_t
> r1, uint64_t r3, uintptr_t ra) s390_ipl_reset_request(cs,
> S390_RESET_REIPL); break;
> case DIAG308_SET:
> +case DIAG308_PV_SET:
> if (diag308_parm_check(env, r1, addr, ra, false)) {
> return;
> }
> @@ -128,10 +143,15 @@ out:
> g_free(iplb);
> return;
> case DIAG308_STORE:
> +case DIAG308_PV_STORE:
> if (diag308_parm_check(env, r1, addr, ra, true)) {
> return;
> }
> -iplb = s390_ipl_get_iplb();
> +if (subcode == DIAG308_PV_STORE) {
> +iplb = s390_ipl_get_iplb_pv();
> +} else {
> +iplb = s390_ipl_get_iplb();
> +}
> if (iplb) {
> cpu_physical_memory_write(addr, iplb,
> be32_to_cpu(iplb->len)); env->regs[r1 + 1] = DIAG_308_RC_OK;
> @@ -139,6 +159,15 @@ out:
> env->regs[r1 + 1] = DIAG_308_RC_NO_CONF;
> }
> return;
> +case DIAG308_PV_START:
> +iplb = s390_ipl_get_iplb_pv();
> +if (!iplb) {
> +env->regs[r1 + 1] = DIAG_308_RC_NO_PV_CONF;
> +return;
> +}
> +
> +s390_ipl_reset_request(cs, S390_RESET_PV);
> +break;
> default:
> s390_program_interrupt(env, PGM_SPECIFICATION, ra);
> break;
with the two typos fixed and the fixup:
Reviewed-by: Claudio Imbrenda
if (!iplb) {
> env->regs[r1 + 1] = DIAG_308_RC_NO_CONF;
> +return;
> }
> +
> +if (!s390_is_pv()) {
> +cpu_physical_memory_write(addr, iplb,
> be32_to_cpu(iplb->len));
> +} else {
> + s390_cpu_pv_mem_write(cpu, 0, iplb,
> be32_to_cpu(iplb->len));
> +}
> +env->regs[r1 + 1] = DIAG_308_RC_OK;
> return;
> case DIAG308_PV_START:
> iplb = s390_ipl_get_iplb_pv();
Reviewed-by: Claudio Imbrenda
sclp_service_call_protected(env, sccb, code);
> +break;
> +case ICPT_INSTRUCTION:
> +g_assert(!s390_is_pv());
> +r = sclp_service_call(env, sccb, code);
> +if (r < 0) {
> +kvm_s390_program_interrupt(cpu, -r);
> +return;
> +}
> +setcc(cpu, r);
> }
> -setcc(cpu, r);
> }
>
> static int handle_b2(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1)
Reviewed-by: Claudio Imbrenda
1 - 100 of 199 matches
Mail list logo