On Fri, 2025-05-09 at 17:41 -0700, Vishal Annapurve wrote: > > > > I see the point about how operating on PFNs can allow smoother > > > > transition to > > a > > > > solution that saves struct page memory, but I wonder about the wisdom of > > > > building this 2MB TDX code against eventual goals. > > > > This discussion was more in response to a few questions from Yan [1]. Right, I follow. > > > > My point of this discussion was to ensure that: > > 1) There is more awareness about the future roadmap. > > 2) There is a line of sight towards supporting guest memory (at least > > guest private memory) without page structs. > > > > No need to solve these problems right away, but it would be good to > > ensure that the design choices are aligned towards the future > > direction. I'm not sure how much we should consider it at this stage. The kernel is not set in stone, so it's about how much you want to do at once. For us who have been working on the giant TDX base series, doing things on a more incremental smaller size sounds nice :). That said, the necessary changes may have other good reasons, as discussed. > > > > One thing that needs to be resolved right away is - no refcounts on > > guest memory from outside guest_memfd [2]. (Discounting the error > > situations) Sounds fine. > > > > [1] https://lore.kernel.org/lkml/aBldhnTK93+eKcMq@xxxxxxxxxxxxxxxxxxxxxxxxx/ > > [2] > > > https://lore.kernel.org/lkml/CAGtprH_ggm8N-R9QbV1f8mo8-cQkqyEta3W=h2jry-NRD7_6OA@xxxxxxxxxxxxxx/