public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Juergen Gross <jgross@suse.com>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Vincent Guittot" <vincent.guittot@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	stratos-dev@op-lists.linaro.org,
	"Erik Schilling" <erik.schilling@linaro.org>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Mathieu Poirier" <mathieu.poirier@linaro.org>,
	"Arnd Bergmann" <arnd@kernel.org>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: [PATCH V4 0/4] xen: privcmd: Add ioeventfd and fix irqfd support
Date: Mon, 16 Oct 2023 12:41:23 +0530	[thread overview]
Message-ID: <cover.1697439990.git.viresh.kumar@linaro.org> (raw)

Hello,

Now that irqfd support (backend to guest interrupt) is already merged, this
series solves the other part of the problem, i.e. ioeventfd (guest to
backend interrupt).

More details inside the commits.

Arnd reported few issues with the ioctl macro usage and argument's layout, fixed
them for irqfd too, which was added recently.

--
Viresh

V3->V4:
- Use __u64 for indirect pointers in an ioctl command's arguments.
- Use u64_to_user_ptr() in kernel driver to access the same.
- Use _IOW() macro instead of the internal one: _IOC().

V2->V3:
- Remove explicit barriers and depend on spin lock instead to take care of it.
- Move check for empty ioeventfds list to privcmd_ioeventfd_deassign(), which
  could earlier call ioreq_free() even when the list wasn't empty and so we
  returned without printing a warning in v1 earlier. V2 implemented it
  incorrectly.

V1->V2:
- Increment irq_info refcnt only for valid info.
- Use u64 type for addr.
- Add comments for use of barriers.
- Use spin lock instead of mutex as we need to use them in irq handler.
- Add a warning when kioreq is getting freed and ioeventfds list isn't empty.
- Use struct_size().
- Validate number of vcpus as well.

Viresh Kumar (4):
  xen: Make struct privcmd_irqfd's layout architecture independent
  xen: irqfd: Use _IOW instead of the internal _IOC() macro
  xen: evtchn: Allow shared registration of IRQ handers
  xen: privcmd: Add support for ioeventfd

 drivers/xen/Kconfig               |   8 +-
 drivers/xen/events/events_base.c  |   3 +-
 drivers/xen/evtchn.c              |   2 +-
 drivers/xen/privcmd.c             | 407 +++++++++++++++++++++++++++++-
 include/uapi/xen/privcmd.h        |  22 +-
 include/xen/interface/hvm/ioreq.h |  51 ++++
 6 files changed, 482 insertions(+), 11 deletions(-)
 create mode 100644 include/xen/interface/hvm/ioreq.h

-- 
2.31.1.272.g89b43f80a514


             reply	other threads:[~2023-10-16  7:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  7:11 Viresh Kumar [this message]
2023-10-16  7:11 ` [PATCH V4 1/4] xen: Make struct privcmd_irqfd's layout architecture independent Viresh Kumar
2023-10-16  7:13   ` Juergen Gross
2023-10-16  7:11 ` [PATCH V4 2/4] xen: irqfd: Use _IOW instead of the internal _IOC() macro Viresh Kumar
2023-10-16  7:14   ` Juergen Gross
2023-10-16  7:11 ` [PATCH V4 3/4] xen: evtchn: Allow shared registration of IRQ handers Viresh Kumar
2023-10-16  7:17   ` Juergen Gross
2023-10-16  7:11 ` [PATCH V4 4/4] xen: privcmd: Add support for ioeventfd Viresh Kumar
2023-10-16  7:25   ` Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1697439990.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=arnd@kernel.org \
    --cc=erik.schilling@linaro.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=stratos-dev@op-lists.linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox