[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 05/22] vl: memfd-alloc option
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH V2 05/22] vl: memfd-alloc option |
Date: |
Tue, 5 Jan 2021 16:27:08 +0000 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
On Tue, Jan 05, 2021 at 07:41:53AM -0800, Steve Sistare wrote:
> Allocate anonymous memory using memfd_create if the memfd-alloc option is
> set.
>
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
> exec.c | 38 ++++++++++++++++++++++++++++++--------
> include/sysemu/sysemu.h | 1 +
> qemu-options.hx | 11 +++++++++++
> softmmu/vl.c | 4 ++++
> trace-events | 1 +
> 5 files changed, 47 insertions(+), 8 deletions(-)
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 708583b..455b43b7 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -4094,6 +4094,17 @@ SRST
> an unmigratable state.
> ERST
>
> +#ifdef __linux__
> +DEF("memfd-alloc", 0, QEMU_OPTION_memfd_alloc, \
> + "-memfd-alloc allocate anonymous memory using memfd_create\n",
> + QEMU_ARCH_ALL)
> +#endif
> +
> +SRST
> +``-memfd-alloc``
> + Allocate anonymous memory using memfd_create (Linux only).
> +ERST
Do we really need a new arg for this ? It is already possible to request
use of memfd for the guest RAM using
-object memory-backend-memfd,id=ram-node0,size=NNNN
this memory backend object framework was intended to remove the need to
add new ad-hoc CLI args for controlling memory allocation.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH V2 00/22] Live Update, Steve Sistare, 2021/01/05
- [PATCH V2 03/22] oslib: qemu_clr_cloexec, Steve Sistare, 2021/01/05
- [PATCH V2 06/22] vl: add helper to request re-exec, Steve Sistare, 2021/01/05
- [PATCH V2 04/22] util: env var helpers, Steve Sistare, 2021/01/05
- [PATCH V2 08/22] cpr: QMP interfaces, Steve Sistare, 2021/01/05
- [PATCH V2 09/22] cpr: HMP interfaces, Steve Sistare, 2021/01/05
- [PATCH V2 10/22] pci: export functions for cpr, Steve Sistare, 2021/01/05
- [PATCH V2 07/22] cpr, Steve Sistare, 2021/01/05
- [PATCH V2 05/22] vl: memfd-alloc option, Steve Sistare, 2021/01/05
- Re: [PATCH V2 05/22] vl: memfd-alloc option,
Daniel P . Berrangé <=
[PATCH V2 12/22] vfio-pci: cpr, Steve Sistare, 2021/01/05
[PATCH V2 16/22] chardev: cpr for pty, Steve Sistare, 2021/01/05
[PATCH V2 18/22] chardev: cpr for sockets, Steve Sistare, 2021/01/05
[PATCH V2 19/22] monitor: cpr support, Steve Sistare, 2021/01/05
[PATCH V2 17/22] chardev: socket accept subroutine, Steve Sistare, 2021/01/05