From: Magnus Kulke <magnuskulke@linux.microsoft.com>
To: Aastha Rawat <aastharawat@linux.microsoft.com>
Cc: qemu-devel@nongnu.org, Wei Liu <wei.liu@kernel.org>
Subject: Re: [PATCH 2/2] accel/mshv: return correct errno value from ioeventfd failure
Date: Fri, 10 Apr 2026 17:02:27 +0200 [thread overview]
Message-ID: <adkRA84AUko3nOTG@example.com> (raw)
In-Reply-To: <20260409-fix_ioevent-v1-2-053b810ae6fb@linux.microsoft.com>
On Thu, Apr 09, 2026 at 11:53:07AM +0000, Aastha Rawat wrote:
> Returning the raw ioctl return value results in misleading error
> message. Ensure that actual failure reason is propagated by returning
> -errno for ioeventfd failure.
>
> Signed-off-by: Aastha Rawat <aastharawat@linux.microsoft.com>
> ---
> accel/mshv/mshv-all.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
> index e1a8d62f8d..58af674bd9 100644
> --- a/accel/mshv/mshv-all.c
> +++ b/accel/mshv/mshv-all.c
> @@ -275,7 +275,12 @@ static int ioeventfd(int vm_fd, int event_fd, uint64_t addr, Datamatch dm,
> }
> }
>
> - return ioctl(vm_fd, MSHV_IOEVENTFD, &args);
> + int ret = ioctl(vm_fd, MSHV_IOEVENTFD, &args);
> + if (ret < 0) {
> + return -errno;
> + }
> +
> + return ret;
> }
>
> static int unregister_ioevent(int vm_fd, int event_fd, uint64_t mmio_addr,
>
Reviewed-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
prev parent reply other threads:[~2026-04-10 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 11:53 [PATCH 0/2] Fix issues in accel/mshv ioeventfd handling Aastha Rawat
2026-04-09 11:53 ` [PATCH 1/2] accel/mshv: fix ioeventfd deassignment to forward correct datamatch value Aastha Rawat
2026-04-10 15:15 ` Magnus Kulke
2026-04-09 11:53 ` [PATCH 2/2] accel/mshv: return correct errno value from ioeventfd failure Aastha Rawat
2026-04-10 15:02 ` Magnus Kulke [this message]
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=adkRA84AUko3nOTG@example.com \
--to=magnuskulke@linux.microsoft.com \
--cc=aastharawat@linux.microsoft.com \
--cc=qemu-devel@nongnu.org \
--cc=wei.liu@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.