All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex@shazbot.org>
To: lirongqing <lirongqing@baidu.com>
Cc: Matt Evans <mattev@meta.com>, Kevin Tian <kevin.tian@intel.com>,
	Kees Cook <kees@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
	Ramesh Thomas <ramesh.thomas@intel.com>, <kvm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>,
	alex@shazbot.org
Subject: Re: [PATCH] vfio/pci: Restore 8-byte ioeventfd support
Date: Tue, 29 Sep 2026 17:12:44 -0600	[thread overview]
Message-ID: <20260929171244.172f0b3d@shazbot.org> (raw)
In-Reply-To: <20260922040013.2188-1-lirongqing@baidu.com>

On Tue, 22 Sep 2026 12:00:13 +0800
lirongqing <lirongqing@baidu.com> wrote:

> From: Li RongQing <lirongqing@baidu.com>
> 
> Commit b44a06bd28f2 ("vfio/pci: Remove #ifdef iowrite64 and #ifdef
> ioread64") inadvertently converted a conditional 8-byte rejection
> into an unconditional one.
> 
> Originally, 'count == 8' was rejected only if iowrite64 was undefined
> (#ifndef iowrite64). When iowrite64 became globally available via generic
> fallbacks, this rejection became dead code, allowing 8-byte ioeventfds.
> However, b44a06bd28f2 removed the #ifndef wrappers but left the nested
> 'if (count == 8) return -EINVAL;' intact, breaking all 8-byte
> registrations.
> 
> Drop the unconditional check to restore 8-byte ioeventfd support,
> matching the original intent.
> 
> Fixes: b44a06bd28f2 ("vfio/pci: Remove #ifdef iowrite64 and #ifdef ioread64")
> Cc: stable@vger.kernel.org
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
>  drivers/vfio/pci/vfio_pci_rdwr.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c
> index 7f14dd4..df88480 100644
> --- a/drivers/vfio/pci/vfio_pci_rdwr.c
> +++ b/drivers/vfio/pci/vfio_pci_rdwr.c
> @@ -423,9 +423,6 @@ int vfio_pci_ioeventfd(struct vfio_pci_core_device *vdev, loff_t offset,
>  	      pos >= vdev->msix_offset + vdev->msix_size))
>  		return -EINVAL;
>  
> -	if (count == 8)
> -		return -EINVAL;
> -
>  	io = vfio_pci_core_get_iomap(vdev, bar);
>  	if (IS_ERR(io))
>  		return PTR_ERR(io);

Applied to vfio next branch for v7.4.  Thanks!

Alex

      reply	other threads:[~2026-09-29 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  4:00 [PATCH] vfio/pci: Restore 8-byte ioeventfd support lirongqing
2026-09-29 23:12 ` Alex Williamson [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=20260929171244.172f0b3d@shazbot.org \
    --to=alex@shazbot.org \
    --cc=jgg@ziepe.ca \
    --cc=kees@kernel.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mattev@meta.com \
    --cc=ramesh.thomas@intel.com \
    --cc=stable@vger.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.