[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b492245-f25b-1019-0728-7c77a54a7540@intel.com>
Date: Wed, 3 Aug 2022 14:48:35 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Tom Lendacky <thomas.lendacky@....com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
"H. Peter Anvin" <hpa@...or.com>,
Michael Roth <michael.roth@....com>,
Joerg Roedel <jroedel@...e.de>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Shutemov, Kirill" <kirill.shutemov@...el.com>,
"Huang, Kai" <kai.huang@...el.com>
Subject: Re: [PATCH v1.1 1/2] x86/sev: Use per-CPU PSC structure in prep for
unaccepted memory support
On 8/3/22 14:34, Tom Lendacky wrote:
>> Also, private<->shared page conversions are *NOT* common from what I can
>> tell. There are a few pages converted at boot, but most host the
>> guest<->host communications are through the swiotlb pages which are
>> static.
>
> Generally, that's true. But, e.g., a dma_alloc_coherent() actually
> doesn't go through SWIOTLB, but instead allocates the pages and makes
> them shared, which results in a page state change. The NVMe driver was
> calling that API a lot. In this case, though, the NVMe driver was
> running in IRQ context and set_memory_decrypted() could sleep, so an
> unencrypted DMA memory pool was created to work around the sleeping
> issue and reduce the page state changes. It's just things like that,
> that make me wary.
Interesting. Is that a real passthrough NVMe device or the hypervisor
presenting a virtual one that just happens to use the NVMe driver?
I'm pretty sure the TDX folks have been banking on having very few page
state changes. But, part of that at least is their expectation of
relying heavily on virtio.
I wonder if their expectations are accurate, or if once TDX gets out
into the real world if their hopes will be dashed.
Powered by blists - more mailing lists