Thread (63 messages) 63 messages, 8 authors, 2025-06-06

Re: [RFC, PATCH 05/12] KVM: TDX: Add tdx_pamt_get()/put() helpers

From: Yan Zhao <hidden>
Date: 2025-05-07 01:04:07
Also in: kvm, lkml

On Mon, May 05, 2025 at 08:44:26PM +0800, Huang, Kai wrote:
On Fri, 2025-05-02 at 16:08 +0300, Kirill A. Shutemov wrote:
quoted
+static int tdx_pamt_add(atomic_t *pamt_refcount, unsigned long hpa,
+			struct list_head *pamt_pages)
+{
+	u64 err;
+
+	hpa = ALIGN_DOWN(hpa, SZ_2M);
+
+	spin_lock(&pamt_lock);
Just curious, Can the lock be per-2M-range?
Me too.
Could we introduce smaller locks each covering a 2M range?

And could we deposit 2 pamt pages per-2M hpa range no matter if it's finally
mapped as a huge page or not?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help