From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 220740] Host crash when do PF passthrough to KVM guest with some devices
Date: Mon, 03 Nov 2025 09:17:55 +0000 [thread overview]
Message-ID: <bug-220740-28872-Lz15Sg6qBz@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-220740-28872@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=220740
Chen, Fan (farrah.chen@intel.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Bisected commit-id| |2b938e3db335e3670475e31a722
| |c2bee34748c5a
CC| |farrah.chen@intel.com
Regression|No |Yes
--- Comment #1 from Chen, Fan (farrah.chen@intel.com) ---
I reproduced this issue on SPR, GNR, SRF, CWF.
If we disable "PCIE Error Enabling" in BIOS, host will not crash.
After bisecting, the first bad commit is:
commit 2b938e3db335e3670475e31a722c2bee34748c5a (HEAD)
Author: Ramesh Thomas <ramesh.thomas@intel.com>
Date: Tue Dec 10 05:19:37 2024 -0800
vfio/pci: Enable iowrite64 and ioread64 for vfio pci
Definitions of ioread64 and iowrite64 macros in asm/io.h called by vfio
pci implementations are enclosed inside check for CONFIG_GENERIC_IOMAP.
They don't get defined if CONFIG_GENERIC_IOMAP is defined. Include
linux/io-64-nonatomic-lo-hi.h to define iowrite64 and ioread64 macros
when they are not defined. io-64-nonatomic-lo-hi.h maps the macros to
generic implementation in lib/iomap.c. The generic implementation does
64 bit rw if readq/writeq is defined for the architecture, otherwise it
would do 32 bit back to back rw.
Note that there are two versions of the generic implementation that
differs in the order the 32 bit words are written if 64 bit support is
not present. This is not the little/big endian ordering, which is
handled separately. This patch uses the lo followed by hi word ordering
which is consistent with current back to back implementation in the
vfio/pci code.
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link:
https://lore.kernel.org/r/20241210131938.303500-2-ramesh.thomas@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c
b/drivers/vfio/pci/vfio_pci_rdwr.c
index 66b72c289284..a0595c745732 100644
--- a/drivers/vfio/pci/vfio_pci_rdwr.c
+++ b/drivers/vfio/pci/vfio_pci_rdwr.c
@@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/vfio.h>
#include <linux/vgaarb.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
#include "vfio_pci_priv.h"
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2025-11-03 9:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 9:12 [Bug 220740] New: Host crash when do PF passthrough to KVM guest with some devices bugzilla-daemon
2025-11-03 9:17 ` bugzilla-daemon [this message]
2025-11-03 23:47 ` [Bug 220740] " bugzilla-daemon
2025-11-04 5:48 ` bugzilla-daemon
2025-11-04 5:53 ` bugzilla-daemon
2025-11-05 0:03 ` bugzilla-daemon
2025-12-09 2:54 ` Tian, Kevin
2025-11-05 4:06 ` bugzilla-daemon
2025-11-05 8:12 ` bugzilla-daemon
2025-12-09 2:54 ` bugzilla-daemon
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=bug-220740-28872-Lz15Sg6qBz@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).