Michael Roth <[email protected]> writes:
> When in-place conversion is enabled, both the shared memory and private
> memory must come from the same guest_memfd instance. Thus, the
> memory-backend-memfd options must in turn correspond to a guest_memfd
> instance, e.g. guest-memfd=on must be specified. Since there is no
> use-case for enabling in-place conversion without setting
> guest-memfd=on, just set it automatically if in-place conversion is
> enabled.
>
> Signed-off-by: Michael Roth <[email protected]>
[...]
> diff --git a/qapi/qom.json b/qapi/qom.json
> index 20d6fefb04..32df7cb794 100644
> --- a/qapi/qom.json
> +++ b/qapi/qom.json
> @@ -772,7 +772,8 @@
> # resizing of the memory (default: true)
> #
> # @guest-memfd: if true, use guest-memfd to back the memory region.
> -# (default: false, since: 11.2)
> +# (default: true for Confidential VMs with in-place conversion,
> +# false otherwise, since: 11.2)
What does "Confidential VMs with in-place conversion" mean exactly?
Which configuration settings need to be set how?
> #
> # Since: 2.12
> ##
> @@ -781,7 +782,7 @@
> 'data': { '*hugetlb': 'bool',
> '*hugetlbsize': 'size',
> '*seal': 'bool',
> - '*guest-memfd': 'bool' },
> + '*guest-memfd': 'OnOffAuto' },
Valid values change from JSON true and false to JSON "on", "off", and
"auto".
If @guest-memfd was already in a release, this would be a compatibility
break, i.e. a hard "don't". But it isn't, it's in the series this is
one based on. So it's merely a "either avoid or justify in the commit
message, and avoiding feels easier to me."
The doc comment still uses true and false.
> 'if': 'CONFIG_LINUX' }
>
> ##