mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
5898b43af9
The set_memory_uc() approach doesn't work well in all cases.
As Dan pointed out when "The VMM unmapped the bad page from
guest physical space and passed the machine check to the guest."
"The guest gets virtual #MC on an access to that page. When
the guest tries to do set_memory_uc() and instructs cpa_flush()
to do clean caches that results in taking another fault / exception
perhaps because the VMM unmapped the page from the guest."
Since the driver has special knowledge to handle NP or UC,
mark the poisoned page with NP and let driver handle it when
it comes down to repair.
Please refer to discussions here for more details.
https://lore.kernel.org/all/CAPcyv4hrXPb1tASBZUg-GgdVs0OOFKXMXLiHmktg_kFi7YBMyQ@mail.gmail.com/
Now since poisoned page is marked as not-present, in order to
avoid writing to a not-present page and trigger kernel Oops,
also fix pmem_do_write().
Fixes:
|
||
---|---|---|
.. | ||
badrange.c | ||
btt_devs.c | ||
btt.c | ||
btt.h | ||
bus.c | ||
claim.c | ||
core.c | ||
dax_devs.c | ||
dimm_devs.c | ||
dimm.c | ||
e820.c | ||
Kconfig | ||
label.c | ||
label.h | ||
Makefile | ||
namespace_devs.c | ||
nd_perf.c | ||
nd_virtio.c | ||
nd-core.h | ||
nd.h | ||
of_pmem.c | ||
pfn_devs.c | ||
pfn.h | ||
pmem.c | ||
pmem.h | ||
region_devs.c | ||
region.c | ||
security.c | ||
virtio_pmem.c | ||
virtio_pmem.h |