News: 0001593501

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Intel Continues Working On Dynamic PAMT To Reduce Memory Overhead For TDX

([Intel] 5 Hours Ago Dynamic PAMT + TDX)


One of the improvements that Intel software engineers have been working on for the Linux kernel around their [1]Trust Domain Extensions (TDX) functionality for confidential computing VMs is reducing the memory use. That work is under the Dynamic PAMT umbrella and this week brought the latest iteration of patches to help lower RAM use when engaging TDX for confidential VMs.

For those not familiar with the memory waste of using Intel TDX, it was summed up in the patch series for Dynamic PAMT as:

"PAMT Background

===============

The TDX module needs to keep data about each physical page it uses. It requires the kernel to give it memory to use for this purpose, called PAMT. Internally it wants space for metadata for each page *and* each page size. That is, if a page is mapped at 2MB in a TD, it doesn’t spread this tracking across the allocations it uses for 4KB page size usage of the same physical memory. It is designed to use a separate allocation for this.

So each memory region that the TDX module could use (aka TDMRs) has three of these PAMT allocations. They are all allocated during the global TDX initialization, regardless of if the memory is actually getting used for a TD. It uses up approximately 0.4% of system memory.

Dynamic PAMT (DPAMT)

====================

Fortunately, only using physical memory for areas of an address space that are actually in use is a familiar problem in system engineering, with a well trodden solution: page tables. It would be great if TDX could do something like that for PAMT. This is basically the idea for Dynamic PAMT."

While less than 1% memory overhead currently, with modern Intel Xeon servers typically having hundreds of gigabytes of memory or even more than a terabyte, it adds up especially with today's RAM costs and shortages.

Sent out on Thursday was the [2]v4 patches for Dynamic PAMT. The cover letter was upfront in acknowledging the patches likely aren't quite ready yet for merging but that another round of review would be appreciated.

Those with modern Intel Xeon processors supporting and using TDX for confidential computing with VMs can try out the latest work via [3]the patch series .



[1] https://www.phoronix.com/search/Trust+Domain+Extensions

[2] https://lore.kernel.org/lkml/20251121005125.417831-1-rick.p.edgecombe@intel.com/

[3] https://lore.kernel.org/lkml/20251121005125.417831-1-rick.p.edgecombe@intel.com/



In the olden days in England, you could be hung for stealing a sheep or a
loaf of bread. However, if a sheep stole a loaf of bread and gave it to
you, you would only be tried for receiving, a crime punishable by forty
lashes with the cat or the dog, whichever was handy. If you stole a dog
and were caught, you were punished with twelve rabbit punches, although it
was hard to find rabbits big enough or strong enough to punch you.
-- Mike Harding, "The Armchair Anarchist's Almanac"