lkml.org 
[lkml]   [2021]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] x86: Skip WBINVD instruction for VM guest
From
Date
On 12/2/21 2:21 PM, Kirill A. Shutemov wrote:
> - NVDIMMs are not supported inside TDX. If it will change we would need
> to deal with cache flushing for this case. Hopefully, we would be able
> to avoid WBINVD.

Maybe we can use this as an example since we have our friendly NVDIMM
developers on cc already.

Let's say that tomorrow Intel decides that NVDIMMs are OK to use in TDX.
It might not be a good idea, but Intel could arbitrarily start
supporting them immediately. Further, someone could take today's kernel
and stick it on some future, fancy platform which does support TDX and
NVDIMMs. In other words, there are multiple reasons we can't just say
"TDX doesn't support NVDIMMs" and forget about it.

If either of those happened, we'd have a NVDIMM driver which uses
WBINVD, expects cache flushing and subsequently loses data. I think we
can all agree that's a bad idea.

So, we've got two different cases that land in the #VE handler:

1. Silly ACPI code that doesn't need WBINVD behavior

2. Less silly NVDIMM code that badly needs WBINVD behavior

... but we have a #VE handler that can't tell the difference.

To me, that says we need to do _something_ different than just papering
over the WBINVD in the #VE handler.

Does anyone have a different take on it?

\
 
 \ /
  Last update: 2021-12-02 23:40    [W:0.995 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site