From: Alex Williamson <alex.williamson@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Leon Romanovsky <leon@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: Write to srvio_numvfs triggers kernel panic
Date: Mon, 9 May 2022 10:58:57 -0600 [thread overview]
Message-ID: <20220509105857.6399cc22.alex.williamson@redhat.com> (raw)
In-Reply-To: <20220509164929.GA602900@bhelgaas>
On Mon, 9 May 2022 11:49:29 -0500
Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Sun, May 08, 2022 at 11:07:40AM +0000, Volodymyr Babchuk wrote:
> >
> > As you can see, output for func 0 and func 2 is identical, so yeah,
> > looks like my system reads config space for func 0 in both cases.
>
> They are not identical:
>
> 01:00.0 Non-Volatile memory controller
> Region 0: Memory at 30010000
>
> 01:00.2 Non-Volatile memory controller
> Region 0: Memory at 30018000
>
> > On other hand, I'm wondering if it is correct to have both is_virtfn and
> > is_physfn in the first place, as there can 4 combinations and only two
> > (or three?) of them are valid. Maybe it is worth to replace them with
> > enum?
>
> Good question. I think there was a reason, but I can't remember it
> right now.
AIUI, three combinations are valid:
is_physfn = 0, is_virtfn = 0: A non-SR-IOV function
is_physfn = 1, is_virtfn = 0: An SR-IOV PF
is_physfn = 0, is_virtfn = 1: An SR-IOV VF
As implemented with bit fields this is 2 bits, which is more space
efficient than an enum. Thanks,
Alex
next prev parent reply other threads:[~2022-05-09 16:59 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
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 [this message]
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=20220509105857.6399cc22.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=Volodymyr_Babchuk@epam.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