KVM does not try to support the cases where wbinvd being unavailable
butIf KVM was broken I'm sure we would hear about it.
it does not make the description of this patch correct.
would break the system. That is not the claim being made in this
patch.
The ACPI cases are for S3, which is not supported in guests, or for theNo, that analysis is wrong.The wbinvd audit would have found that
old style manual IO port C6, which isn't supported either.
The persistent memory cases would require working DMA mappings,
persistent memory secure-erase and unlock, which has nothing to do
with DMA, needs wbinvd to ensure that the CPU has not retained a copy
of the PMEM contents from before the unlock happened and it needs to
make sure that any data that was meant to be destroyed by an erasure
is not retained in cache.
It's fine to not support the above cases, I am asking for the
explanation to demonstrate the known risks and the known mitigations.
IgnorePAT is not the mitigation, the mitigation is an audit to
describe why the known users are unlikely to be triggered. Even better
would be an addition patch that does something like:
iff --git a/drivers/nvdimm/security.c b/drivers/nvdimm/security.c
index 4b80150e4afa..a6b13a1ae319 100644
--- a/drivers/nvdimm/security.c
+++ b/drivers/nvdimm/security.c
@@ -170,6 +170,9 @@ static int __nvdimm_security_unlock(struct nvdimm *nvdimm)
const void *data;
int rc;
+ if (is_protected_guest())
+ return -ENXIO;
+
/* The bus lock should be held at the top level of the call stack */
lockdep_assert_held(&nvdimm_bus->reconfig_mutex);
...to explicitly error out a wbinvd use case before data is altered
and wbinvd is needed.