[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516183516.GA643473@ziepe.ca>
Date: Fri, 16 May 2025 15:35:16 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Chathura Rajapaksha <chathura.abeyrathne.lk@...il.com>
Cc: Yunxiang.Li@....com, alex.williamson@...hat.com, audit@...r.kernel.org,
avihaih@...dia.com, bhelgaas@...gle.com, chath@...edu,
eparis@...hat.com, giovanni.cabiddu@...el.com, kevin.tian@...el.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
paul@...l-moore.com, schnelle@...ux.ibm.com, xin.zeng@...el.com,
yahui.cao@...el.com, zhangdongdong@...incomputing.com
Subject: Re: [RFC PATCH 0/2] vfio/pci: Block and audit accesses to unassigned
config regions
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@...pe.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
Powered by blists - more mailing lists