From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CC75C433F5 for ; Sun, 8 May 2022 11:20:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232195AbiEHLYH (ORCPT ); Sun, 8 May 2022 07:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232164AbiEHLXw (ORCPT ); Sun, 8 May 2022 07:23:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D824EBC06 for ; Sun, 8 May 2022 04:20:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9E528B8085B for ; Sun, 8 May 2022 11:20:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF4C0C385AC; Sun, 8 May 2022 11:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652008800; bh=ViD5+uHbZqMQqaRmWo5W6o24alINySE4RJfRCtxuQ4A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aoorc29jf+HuKQeIGFvSBPoSMdTkLdx3XjPyEpCDmi4GB3yaH6oFMx3wLcNN0W9zm zDUAHLNddAnYO4BGUKQfOe5ZmOYefv8oheOQcy3KdCJyNd3xy/LbL4PixYG25eJ0uJ e7o0/lZzfKa5R6rUTY8fO+CmHOp6nktWJqrS1BgOkL/U3NiIPDlvitdSceFUFe8mwr Aj2zsU0L8GOzzkcUgh0ueoA3WLN+QExd6tQL+yGQfKFIUH50QKjg3ByLM1Puj0VlFi u437gxhMJrestbdzVHQMt1NoXJo2MTMEbvc4vFTIn+yGJfqd2gf66cAHJLMyXflFTi 2wNycEa685u6w== Date: Sun, 8 May 2022 14:19:56 +0300 From: Leon Romanovsky To: Volodymyr Babchuk Cc: Jason Gunthorpe , Bjorn Helgaas , "linux-pci@vger.kernel.org" , Alex Williamson Subject: Re: Write to srvio_numvfs triggers kernel panic Message-ID: References: <87a6bxm5vm.fsf@epam.com> <20220506201722.GA555374@bhelgaas> <20220507013436.GB63055@ziepe.ca> <87levdljw3.fsf@epam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87levdljw3.fsf@epam.com> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, May 07, 2022 at 10:25:16AM +0000, Volodymyr Babchuk wrote: > > > Jason Gunthorpe 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. Thanks > > > -- > Volodymyr Babchuk at EPAM