[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29cc7d2a-b174-4ed3-ae1a-22db478c62ec@redhat.com>
Date: Fri, 4 Jul 2025 16:15:28 +0200
From: David Hildenbrand <david@...hat.com>
To: Jason Gunthorpe <jgg@...dia.com>, ankita@...dia.com
Cc: maz@...nel.org, oliver.upton@...ux.dev, joey.gouly@....com,
suzuki.poulose@....com, yuzenghui@...wei.com, catalin.marinas@....com,
will@...nel.org, ryan.roberts@....com, shahuang@...hat.com,
lpieralisi@...nel.org, ddutile@...hat.com, seanjc@...gle.com,
aniketa@...dia.com, cjia@...dia.com, kwankhede@...dia.com, kjaju@...dia.com,
targupta@...dia.com, vsethi@...dia.com, acurrid@...dia.com,
apopple@...dia.com, jhubbard@...dia.com, danw@...dia.com, zhiw@...dia.com,
mochs@...dia.com, udhoke@...dia.com, dnigam@...dia.com,
alex.williamson@...hat.com, sebastianene@...gle.com, coltonlewis@...gle.com,
kevin.tian@...el.com, yi.l.liu@...el.com, ardb@...nel.org,
akpm@...ux-foundation.org, gshan@...hat.com, linux-mm@...ck.org,
tabba@...gle.com, qperret@...gle.com, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
maobibo@...ngson.cn
Subject: Re: [PATCH v9 6/6] KVM: arm64: Expose new KVM cap for cacheable
PFNMAP
On 04.07.25 15:44, Jason Gunthorpe wrote:
> On Sat, Jun 21, 2025 at 04:21:11AM +0000, ankita@...dia.com wrote:
>> From: Ankit Agrawal <ankita@...dia.com>
>>
>> Introduce a new KVM capability to expose to the userspace whether
>> cacheable mapping of PFNMAP is supported.
>>
>> The ability to safely do the cacheable mapping of PFNMAP is contingent
>> on S2FWB and ARM64_HAS_CACHE_DIC. S2FWB allows KVM to avoid flushing
>> the D cache, ARM64_HAS_CACHE_DIC allows KVM to avoid flushing the icache
>> and turns icache_inval_pou() into a NOP. The cap would be false if
>> those requirements are missing and is checked by making use of
>> kvm_arch_supports_cacheable_pfnmap.
>>
>> This capability would allow userspace to discover the support.
>> It could for instance be used by userspace to prevent live-migration
>> across FWB and non-FWB hosts.
>>
>> CC: Catalin Marinas <catalin.marinas@....com>
>> CC: Jason Gunthorpe <jgg@...dia.com>
>> CC: Oliver Upton <oliver.upton@...ux.dev>
>> CC: David Hildenbrand <david@...hat.com>
>> Suggested-by: Marc Zyngier <maz@...nel.org>
>> Signed-off-by: Ankit Agrawal <ankita@...dia.com>
>> ---
>> Documentation/virt/kvm/api.rst | 13 ++++++++++++-
>> arch/arm64/kvm/arm.c | 7 +++++++
>> include/uapi/linux/kvm.h | 1 +
>> 3 files changed, 20 insertions(+), 1 deletion(-)
>
> I don't know if any VMM will ever use this, but it looks OK
So, should we defer it to the point where we actually have a use case?
I mean, patch #4 could be simplified by modifying arm64 code in patch #5
only. No need for a common kvm_arch function etc.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists