From: Shrihari E S <shrihari.s@samsung.com>
To: Junjie Cao <junjie.cao@intel.com>
Cc: jic23@kernel.org, linux-cxl@vger.kernel.org,
linux-pci@vger.kernel.org, qemu-devel@nongnu.org,
cpgs@samsung.com, arun.george@samsung.com, vikash.k5@samsung.com,
s.neeraj@samsung.com, dongjoo.seo1@samsung.com,
dave@stgolabs.net, gost.dev@samsung.com
Subject: Re: [RFC 6/8] hw/pci: Add PCIe Streamlined Virtual Channel (SVC) capability.
Date: Wed, 24 Jun 2026 20:39:52 +0530 [thread overview]
Message-ID: <1987169128.61782285784075.JavaMail.epsvc@epcpadp2new> (raw)
In-Reply-To: <20260617154521.520191-2-junjie.cao@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
On 17/06/26 11:45PM, Junjie Cao wrote:
>Hi Shrihari,
>
>On Tue, 9 Jun 2026 16:28:34 +0530, Shrihari E S wrote:
>> if (flitmode) {
>> - pci_long_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA2,
>> + uint32_t pos = dev->exp.exp_cap;
>> +
>> + pci_word_test_and_set_mask(exp_cap + PCI_EXP_FLAGS,
>> PCI_EXP_LNKSTA2_FLIT);
>> + pci_word_test_and_set_mask(exp_cap + PCI_EXP_FLAGS,
>> + PCI_EXP_FLAGS_FLIT);
>
>Following up on Jonathan's observation here -- I'd also noticed a
>bogus Interrupt Message Number on a plain flit-mode root port, so I
>checked what the stray write actually does to the Flags register.
>The impact is wider than just UIO:
>
>The first set_mask writes PCI_EXP_LNKSTA2_FLIT (0x0400) into
>PCI_EXP_FLAGS (cap offset 0x02) instead of PCI_EXP_LNKSTA2 (0x32).
>0x0400 falls in the Interrupt Message Number field (bits 13:9) of the
>Flags register, so a flit-mode port ends up reporting a nonzero
>Interrupt Message Number (it reads back as 2).
>
>pcie_cap_fill_lnk() runs for every flit-mode port, and x-256b-flit
>defaults to on for pcie-root-port, so even a plain
>"-device pcie-root-port" comes up with the corrupted field.
>
>The second line (PCI_EXP_FLAGS_FLIT into Flags) looks correct and
>should stay. The first one looks like a typo in the destination
>register -- it was PCI_EXP_LNKSTA2 before this series (visible in the
>hunk above), so I'd restore it there rather than drop it.
>pcie_cap_flit_write_config() does maintain the LNKSTA2 flit bit, but
>only on guest LNKCTL writes; it doesn't run at realize/reset, so
>dropping the line would leave LNKSTA2 flit status reading 0 at reset
>instead of its pre-series value.
>
>Many thanks,
>Junjie
Hi Junjie,
Yeah, it's a typo. The destination register should be "PCI_EXP_LNKSTA2".
Thank you for pointing this out. We will rectify it in the next version.
Thanks,
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2026-06-24 7:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260609104453epcas5p327a974e978790e693c0660f27f9b43ef@epcas5p3.samsung.com>
2026-06-09 10:58 ` [RFC 0/8] pci: cxl: Add enumeration support for Unordered I/O (UIO) feature Shrihari E S
2026-06-09 10:58 ` [RFC 1/8] hw/pci: Refactor flitmode from PCIESlot to PCIEPort Shrihari E S
2026-06-16 13:27 ` Jonathan Cameron
2026-06-24 14:01 ` Shrihari E S
2026-06-09 10:58 ` [RFC 2/8] hw/pci: Move 'x-256b-flit' property from cxl_root_port to pcie_root_port Shrihari E S
2026-06-09 10:58 ` [RFC 3/8] hw/pci: Add SVC capability and UIO properties to PCIe ports Shrihari E S
2026-06-16 17:20 ` Jonathan Cameron
2026-06-24 14:18 ` Shrihari E S
2026-06-09 10:58 ` [RFC 4/8] hw/cxl: Add Streamlined Virtual Channel (SVC) property to CXL ports Shrihari E S
2026-06-16 17:21 ` Jonathan Cameron
2026-06-24 14:21 ` Shrihari E S
2026-06-09 10:58 ` [RFC 5/8] hw/cxl: Wire UIO capability into HDM decoder registers Shrihari E S
2026-06-16 17:40 ` Jonathan Cameron
2026-06-24 14:47 ` Shrihari E S
2026-06-17 15:45 ` Junjie Cao
2026-06-24 15:04 ` Shrihari E S
2026-06-09 10:58 ` [RFC 6/8] hw/pci: Add PCIe Streamlined Virtual Channel (SVC) capability Shrihari E S
2026-06-16 18:46 ` Jonathan Cameron
2026-06-24 15:00 ` Shrihari E S
2026-06-17 15:45 ` Junjie Cao
2026-06-24 15:09 ` Shrihari E S [this message]
2026-06-09 10:58 ` [RFC 7/8] hw/pci: hw/cxl: Wire SVC initialization into port realize functions Shrihari E S
2026-06-17 15:45 ` Junjie Cao
2026-06-24 15:18 ` Shrihari E S
2026-06-09 10:58 ` [RFC 8/8] cxl: Add documentation for UIO-enabled CXL devices Shrihari E S
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=1987169128.61782285784075.JavaMail.epsvc@epcpadp2new \
--to=shrihari.s@samsung.com \
--cc=arun.george@samsung.com \
--cc=cpgs@samsung.com \
--cc=dave@stgolabs.net \
--cc=dongjoo.seo1@samsung.com \
--cc=gost.dev@samsung.com \
--cc=jic23@kernel.org \
--cc=junjie.cao@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=s.neeraj@samsung.com \
--cc=vikash.k5@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.