From: Jason Gunthorpe <jgg@ziepe.ca>
To: Chathura Rajapaksha <chathura.abeyrathne.lk@gmail.com>
Cc: Yunxiang.Li@amd.com, alex.williamson@redhat.com,
audit@vger.kernel.org, avihaih@nvidia.com, bhelgaas@google.com,
chath@bu.edu, eparis@redhat.com, giovanni.cabiddu@intel.com,
kevin.tian@intel.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, paul@paul-moore.com,
schnelle@linux.ibm.com, xin.zeng@intel.com, yahui.cao@intel.com,
zhangdongdong@eswincomputing.com
Subject: Re: [RFC PATCH 0/2] vfio/pci: Block and audit accesses to unassigned config regions
Date: Fri, 16 May 2025 15:35:16 -0300 [thread overview]
Message-ID: <20250516183516.GA643473@ziepe.ca> (raw)
In-Reply-To: <20250516181754.7283-1-chath@bu.edu>
On Fri, May 16, 2025 at 06:17:54PM +0000, Chathura Rajapaksha wrote:
> Hi Jason and Alex,
>
> Thank you for the comments, and apologies for the delayed response.
>
> On Mon, Apr 28, 2025 at 9:24 AM
> Jason Gunthorpe <jgg@ziepe.ca> wrote:
> > > Some PCIe devices trigger PCI bus errors when accesses are made to
> > > unassigned regions within their PCI configuration space. On certain
> > > platforms, this can lead to host system hangs or reboots.
> >
> > Do you have an example of this? What do you mean by bus error?
>
> By PCI bus error, I was referring to AER-reported uncorrectable errors.
> For example:
> pcieport 0000:c0:01.1: PCIe Bus Error: severity=Uncorrected (Fatal), type=Transaction Layer, (Requester ID)
> pcieport 0000:c0:01.1: device [1022:1483] error status/mask=00004000/07a10000
> pcieport 0000:c0:01.1: [14] CmpltTO (First)
That's sure looks like a device bug. You should not ever get time out
for a config space read.
> In another case, with a different device on a separate system, we
> observed an uncorrectable machine check exception:
> mce: [Hardware Error]: CPU 10: Machine Check Exception: 5 Bank 6: fb80000000000e0b
FW turning AER into a MCE is not suitable to use as a virtualization
host, IMHO. It is not possible to contain PCIe errors when they are
turned into MCE.
> Is it feasible to support such use cases using a quirk-based mechanism?
> For example, could we implement a quirk table that’s updateable via
> sysfs, as you suggested?
Dynamically updateable might be overkill, I think you have one
defective device. Have you talked to the supplier to see if it can be
corrected?
I think Alex is right to worry, if the device got this wrong, what
other mistakes have been made? Supporting virtualization is more than
just making a PCI device and using VFIO. You need to robustly design
HW to have full containment as well, including managing errors.
Alternatively you could handle this in qemu by sanitizing the config
space..
Jason
next prev parent reply other threads:[~2025-05-16 18:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-26 21:22 [RFC PATCH 0/2] vfio/pci: Block and audit accesses to unassigned config regions Chathura Rajapaksha
2025-04-26 21:22 ` [RFC PATCH 1/2] block accesses to unassigned PCI " Chathura Rajapaksha
2025-04-28 15:00 ` Bjorn Helgaas
2025-04-26 21:22 ` [RFC PATCH 2/2] audit " Chathura Rajapaksha
2025-04-28 15:05 ` Bjorn Helgaas
2025-05-16 20:41 ` [PATCH RFC " Paul Moore
2025-05-20 16:33 ` Chathura Rajapaksha
2025-05-20 18:08 ` Paul Moore
2025-04-28 13:24 ` [RFC PATCH 0/2] vfio/pci: Block and audit accesses to unassigned " Jason Gunthorpe
2025-04-28 20:25 ` Alex Williamson
2025-04-29 13:44 ` Jason Gunthorpe
2025-05-16 18:17 ` Chathura Rajapaksha
2025-05-16 18:35 ` Jason Gunthorpe [this message]
2025-05-17 17:14 ` Chathura Rajapaksha
2025-05-26 19:44 ` Jason Gunthorpe
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=20250516183516.GA643473@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=Yunxiang.Li@amd.com \
--cc=alex.williamson@redhat.com \
--cc=audit@vger.kernel.org \
--cc=avihaih@nvidia.com \
--cc=bhelgaas@google.com \
--cc=chath@bu.edu \
--cc=chathura.abeyrathne.lk@gmail.com \
--cc=eparis@redhat.com \
--cc=giovanni.cabiddu@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=schnelle@linux.ibm.com \
--cc=xin.zeng@intel.com \
--cc=yahui.cao@intel.com \
--cc=zhangdongdong@eswincomputing.com \
/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).