[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it
From: |
Markus Armbruster |
Subject: |
Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM |
Date: |
Wed, 20 Sep 2023 17:42:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
David Hildenbrand <david@redhat.com> writes:
> On 20.09.23 16:35, Xiaoyao Li wrote:
>> On 9/20/2023 3:30 PM, Markus Armbruster wrote:
>>> Xiaoyao Li <xiaoyao.li@intel.com> writes:
>>>
>>>> On 9/19/2023 5:46 PM, Markus Armbruster wrote:
>>>>> Xiaoyao Li <xiaoyao.li@intel.com> writes:
>>>>>
>>>>>> From: Isaku Yamahata <isaku.yamahata@intel.com>
>>>>>>
>>>>>> Add a new property "private" to memory backends. When it's set to true,
>>>>>> it indicates the RAMblock of the backend also requires kvm gmem.
>>>>> Can you add a brief explanation why you need the property?
>>>>
>>>> It provides a mechanism for user to specify whether the memory can serve
>>>> as private memory (need request kvm gmem).
>>>
>>> Yes, but why would a user want such memory?
>>>
>> Because KVM demands it for confidential guest, e.g., TDX guest. KVM
>> demands that the mem slot needs to have KVM_MEM_PRIVATE set and has
>> valid gmem associated if the guest accesses it as private memory.
Commit messages should explain why we want the patch. Documenting "why"
is at least as important as "what". If "what" is missing, I can read
the patch to find out. If "why" is missing, I'm reduced to guesswork.
> I think as long as there is no demand to have a TDX guest with this property
> be set to "off", then just don't add it.
>
> With a TDX VM, it will can be implicitly active. If we ever have to disable
> it for selective memory backends, we can add the property and have something
> like on/off/auto. For now it would be "auto".
Makes sense to me.
- Re: [RFC PATCH v2 02/21] RAMBlock: Add support of KVM private gmem, (continued)
- [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Xiaoyao Li, 2023/09/13
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Markus Armbruster, 2023/09/19
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Xiaoyao Li, 2023/09/19
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Markus Armbruster, 2023/09/20
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Xiaoyao Li, 2023/09/20
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, David Hildenbrand, 2023/09/20
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM,
Markus Armbruster <=
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, Xiaoyao Li, 2023/09/21
- Re: [RFC PATCH v2 03/21] HostMem: Add private property and associate it with RAM_KVM_GMEM, David Hildenbrand, 2023/09/21
[RFC PATCH v2 04/21] memory: Introduce memory_region_has_gmem_fd(), Xiaoyao Li, 2023/09/13
[RFC PATCH v2 05/21] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot, Xiaoyao Li, 2023/09/13
[RFC PATCH v2 06/21] i386: Add support for sw-protected-vm object, Xiaoyao Li, 2023/09/13
[RFC PATCH v2 07/21] i386/pc: Drop pc_machine_kvm_type(), Xiaoyao Li, 2023/09/13