From: Klaus Jensen <its@irrelevant.dk>
To: "Łukasz Gieryk" <lukasz.gieryk@linux.intel.com>
Cc: Lukasz Maniak <lukasz.maniak@linux.intel.com>,
qemu-devel@nongnu.org, Keith Busch <kbusch@kernel.org>,
qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>
Subject: Re: [PATCH v2] hw/nvme: clean up CC register write logic
Date: Tue, 7 Jun 2022 13:23:36 +0200 [thread overview]
Message-ID: <Yp81OGi3++1wBfD5@apples> (raw)
In-Reply-To: <20220607110645.GA28312@lgieryk-VirtualBox>
[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]
On Jun 7 13:06, Łukasz Gieryk wrote:
> On Fri, Jun 03, 2022 at 10:24:51PM +0200, Klaus Jensen wrote:
> > On Jun 1 15:28, Lukasz Maniak wrote:
> > > On Wed, May 25, 2022 at 09:35:24AM +0200, Klaus Jensen wrote:
> > > >
> > > > + stl_le_p(&n->bar.intms, 0);
> > > > + stl_le_p(&n->bar.intmc, 0);
> > > > + stl_le_p(&n->bar.cc, 0);
> > >
> > > Looks fine, though it seems the NVMe spec says the above registers
> > > should be cleared during each reset for VF as well.
> > >
> >
> > Aren't the values of all other registers than CSTS just undefined? (NVMe
> > v2.0b, Section 8.26.3)
>
> My 2 cents –
>
> When VF is online:
> - Both Controller Reset (CR) and PCIe Function Level Reset (FLR) can be
> issued to given VF
> - Both resets shall return all (except specific) Nvme registers of given
> VF to their reset values (3.7.2)
>
> When VF is offline:
> - CR cannot be issued (only CSTS is defined, writes to CC are dropped),
> so doesn’t need an explicit IF
> - FLR is allowed as it’s a part of the procedure to bring VF online
> (mentioned in 8.26.3)
> - At least FLR shall reset the registers for VF
>
> So I agree with the other Lukasz's suggestion. I would also clear
> intms/intmc/cc for both: VF and PF reset paths, regardless of the actual
> reset type.
>
Alright thanks - sounds good.
See v3.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-06-07 12:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 7:35 [PATCH v2] hw/nvme: clean up CC register write logic Klaus Jensen
2022-06-01 13:28 ` Lukasz Maniak
2022-06-03 20:24 ` Klaus Jensen
2022-06-07 11:06 ` Łukasz Gieryk
2022-06-07 11:23 ` Klaus Jensen [this message]
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=Yp81OGi3++1wBfD5@apples \
--to=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=lukasz.gieryk@linux.intel.com \
--cc=lukasz.maniak@linux.intel.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).