On Fri, Aug 2, 2019 at 12:50 AM Aarushi Mehta <mehta.aar...@gmail.com> wrote:
> +    rc = io_uring_queue_init(MAX_EVENTS, ring, IORING_SETUP_SQPOLL);
> +    if (rc == -EOPNOTSUPP) {
> +            rc = io_uring_queue_init(MAX_EVENTS, ring, 0);
> +    }

IORING_SETUP_SQPOLL is only allowed when the user has CAP_SYS_ADMIN
(e.g. they are root).  Otherwise it fails with -EPERM.

This patch breaks non-root QEMU usage.  Please handle -EPERM like
-EOPNOTSUPP so it falls back to non-polling mode.

Stefan

Reply via email to