qemu: add memfd source type

Add a new memoryBacking source type "memfd", supported by QEMU (when
the capability is available).

A memfd is a specialized anonymous memory kind. As such, an anonymous
source type could be automatically using a memfd. However, there are
some complications when migrating from different memory backends in
qemu (mainly due to the internal object naming at this point, but
there could be more). For now, it is simpler and safer to simply
introduce a new source type "memfd". Eventually, the "anonymous" type
could learn to use memfd transparently in a separate change.

The main benefits are that it doesn't need to create filesystem files,
and it also enforces sealing, providing a bit more safety.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Marc-André Lureau
2018-11-16 08:57:12 +01:00
committed by Michal Privoznik
parent a6fd5b596a
commit 24b74d187c
9 changed files with 140 additions and 27 deletions
+1
View File
@@ -655,6 +655,7 @@
<choice>
<value>file</value>
<value>anonymous</value>
<value>memfd</value>
</choice>
</attribute>
</element>