linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Bjorn Helgaas <helgaas@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: Write to srvio_numvfs triggers kernel panic
Date: Mon, 9 May 2022 12:22:21 -0600	[thread overview]
Message-ID: <Ynlb3X+rqoNFTR0t@kbusch-mbp> (raw)
In-Reply-To: <YnenXMZk/m+GlWcV@unreal>

On Sun, May 08, 2022 at 02:19:56PM +0300, Leon Romanovsky wrote:
> On Sat, May 07, 2022 at 10:25:16AM +0000, Volodymyr Babchuk wrote:
> > Jason Gunthorpe <jgg@ziepe.ca> writes:
> > > On Fri, May 06, 2022 at 03:17:22PM -0500, Bjorn Helgaas wrote:
> > >
> > >> > Modules linked in: xt_MASQUERADE iptable_nat nf_nat nf_conntrack nf_defrag_ipv6
> > >> > nf_defrag_ipv4 libcrc32c iptable_filter crct10dif_ce nvme nvme_core at24
> > >> > pci_endpoint_test bridge pdrv_genirq ip_tables x_tables ipv6
> > >> >  CPU: 3 PID: 287 Comm: sh Not tainted 5.10.41-lorc+ #233
> > >> >  Hardware name: XENVM-4.17 (DT)
> > >                 ^^^^^^^^^^^^^^^^^
> > >
> > >> So this means the VF must have an SR-IOV capability, which sounds a
> > >> little dubious.  From PCIe r6.0:
> > >
> > > Enabling SRIOV from within a VM is "exciting" - I would not be
> > > surprised if there was some wonky bugs here.
> > 
> > Well, yes. But in this case, this VM has direct access to the PCIe
> > controller. So it should not cause any troubles. I'll try baremetal
> > setup, though. 
> 
> If I remember correctly, the VM software that runs on hypervisor needs
> to filter PCI capabilities even for pass-through devices.
> 
> The vfio kernel module did this for QEMU, so something similar I would
> expect from XEN too.

AIUI, some kind of translation from GPA to HPA needs to happen, but I'm not
sure how that would occur for the VF's enabled within the guest when the host
doesn't know about those functions.

  reply	other threads:[~2022-05-09 18:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 19:56 Write to srvio_numvfs triggers kernel panic Volodymyr Babchuk
2022-05-06 20:17 ` Bjorn Helgaas
2022-05-07  1:34   ` Jason Gunthorpe
2022-05-07 10:25     ` Volodymyr Babchuk
2022-05-08 11:19       ` Leon Romanovsky
2022-05-09 18:22         ` Keith Busch [this message]
2022-05-07 10:22   ` Volodymyr Babchuk
2022-05-07 15:41     ` Bjorn Helgaas
2022-05-08 11:07       ` Volodymyr Babchuk
2022-05-09 16:49         ` Bjorn Helgaas
2022-05-09 16:58           ` Alex Williamson
2022-05-10  6:39             ` Christoph Hellwig
2022-05-10 17:37               ` Bjorn Helgaas
2022-05-12  7:18                 ` Volodymyr Babchuk

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=Ynlb3X+rqoNFTR0t@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alex.williamson@redhat.com \
    --cc=helgaas@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-pci@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).