Messages in this thread | | | Date | Tue, 4 Jul 2023 17:16:48 -0400 | From | Peter Xu <> | Subject | Re: [PATCH v2 6/6] mm: userfaultfd: add basic documentation for UFFDIO_POISON |
| |
On Thu, Jun 29, 2023 at 01:50:40PM -0700, Axel Rasmussen wrote: > Just describe the feature at a really basic level. > > Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
The final enablement of the feature can be squashed into this doc update patch too.
Acked-by: Peter Xu <peterx@redhat.com>
> --- > Documentation/admin-guide/mm/userfaultfd.rst | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/Documentation/admin-guide/mm/userfaultfd.rst b/Documentation/admin-guide/mm/userfaultfd.rst > index 7c304e432205..b19053436369 100644 > --- a/Documentation/admin-guide/mm/userfaultfd.rst > +++ b/Documentation/admin-guide/mm/userfaultfd.rst > @@ -244,6 +244,21 @@ write-protected (so future writes will also result in a WP fault). These ioctls > support a mode flag (``UFFDIO_COPY_MODE_WP`` or ``UFFDIO_CONTINUE_MODE_WP`` > respectively) to configure the mapping this way. > > +Memory Poisioning Emulation > +--------------------------- > + > +In response to a fault (either missing or minor), an action userspace can > +take to "resolve" it is to issue a ``UFFDIO_POISON``. This will cause any > +future faulters to either get a SIGBUS, or in KVM's case the guest will > +receive an MCE as if there were hardware memory poisoning. > + > +This is used to emulate hardware memory poisoning. Imagine a VM running on a > +machine which experiences a real hardware memory error. Later, we live migrate > +the VM to another physical machine. Since we want the migration to be > +transparent to the guest, we want that same address range to act as if it was > +still poisoned, even though it's on a new physical host which ostentisbly > +doesn't have a memory error in the exact same spot. > + > QEMU/KVM > ======== > > -- > 2.41.0.255.g8b1d071c50-goog >
-- Peter Xu
| |