Re: [PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-26 Thread Peter Xu
On Thu, Jan 26, 2023 at 09:05:01AM +, Daniel P. Berrangé wrote: > On Thu, Jan 26, 2023 at 09:02:09AM +, Daniel P. Berrangé wrote: > > On Wed, Jan 25, 2023 at 05:40:16PM -0500, Peter Xu wrote: > > > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the > > > system call if e

Re: [PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-26 Thread Peter Xu
On Thu, Jan 26, 2023 at 12:08:33AM +0100, Philippe Mathieu-Daudé wrote: > On 25/1/23 23:40, Peter Xu wrote: > > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the > > system call if either it's not there or doesn't have enough permission. > > > > Firstly, as long as the app has

Re: [PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-26 Thread Daniel P . Berrangé
On Thu, Jan 26, 2023 at 09:02:09AM +, Daniel P. Berrangé wrote: > On Wed, Jan 25, 2023 at 05:40:16PM -0500, Peter Xu wrote: > > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the > > system call if either it's not there or doesn't have enough permission. > > > > Firstly, as

Re: [PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-26 Thread Daniel P . Berrangé
On Wed, Jan 25, 2023 at 05:40:16PM -0500, Peter Xu wrote: > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the > system call if either it's not there or doesn't have enough permission. > > Firstly, as long as the app has permission to access /dev/userfaultfd, it > always have t

Re: [PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-25 Thread Philippe Mathieu-Daudé
On 25/1/23 23:40, Peter Xu wrote: Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults

[PATCH 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-01-25 Thread Peter Xu
Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults which QEMU mostly wants. Meanwhile,