[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/4] hostmem-memfd: disable for systems wihto
From: |
Ilya Maximets |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/4] hostmem-memfd: disable for systems wihtout sealing support |
Date: |
Tue, 11 Dec 2018 14:09:11 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 11.12.2018 13:53, Daniel P. Berrangé wrote:
> On Tue, Nov 27, 2018 at 04:50:27PM +0300, Ilya Maximets wrote:
>> If seals are not supported, memfd_create() will fail.
>> Furthermore, there is no way to disable it in this case because
>> '.seal' property is not registered.
>
> Isn't the real problem here that memfd_backend_instance_init() has
> unconditionally set "m->seal = true"
>
> Surely, if we don't register the '.seal' property, we should default
> that flag to false.
>
>>
>> This issue leads to vhost-user-test failures on RHEL 7.2:
>>
>> qemu-system-x86_64: -object memory-backend-memfd,id=mem,size=2M,: \
>> failed to create memfd: Invalid argument
>>
>> and actually breaks the feature on such systems.
>>
>> Let's restrict memfd backend to systems with sealing support.
>
> I don't think we need todo that - sealing is optional in the QEMU code,
> we simply have it set to the wrong default when sealing is not available.
That was literally what I've fixed in v1:
https://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg05483.html
but 2 people suggested me to disable memfd entirely for this case.
Do you think I need to get patch from v1 back ?
Gerd, Marc-André, what do you think?
>
>> Signed-off-by: Ilya Maximets <address@hidden>
>
>
> Regards,
> Daniel
>