在 2021-10-15 14:12,Peter Xu 写道:
On Fri, Oct 15, 2021 at 01:38:06PM +0800, lma wrote:
在 2021-10-15 07:43,Peter Xu 写道:
> On Thu, Oct 14, 2021 at 05:15:48PM +0800, Lin Ma wrote:
> > Since kernel v5.11, Unprivileged user (without SYS_CAP_PTRACE
> > capability)
> > must pass UFFD_USER_MODE_ONLY to userfaultd in case
> > unprivileged_userfaultfd
> > sysctl knob is 0.
> > Please refer to https://lwn.net/Articles/819834/ and the kernel
> > commits:
> > 37cd0575 userfaultfd: add UFFD_USER_MODE_ONLY
> > d0d4730a userfaultfd: add user-mode only option to
> > unprivileged_userfaultfd sysctl knob
> >
> > This patch set adds a migration capability to pass UFFD_USER_MODE_ONLY
> > for postcopy migration.
>
> Then it's at least no KVM, no vhost, am I right?  Could I ask is there a
> real
> user behind this?  Thanks,

Well, The "user-mode-only" has nothing to do with qemu's user-mode
emulation.

I didn't follow why you thought my question was about "user-mode emulation"..
Sorry about the misunderstanding.

To ask in another way: after this new cap set, qemu will get a SIGBUS and VM will crash during postcopy migrating as long as either KVM or vhost-kernel
faulted on any of the missing pages, am I right?

Oops...Yes, you're right. It indeed casues qemu crash on destination due to
fault on missing pages.
This patch set and my thought about introducing this cap to qemu are wrong.

Thanks,
Lin

Reply via email to