Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Karolina Stolarek <karolina.stolarek@oracle.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Jon Pan-Doh <pandoh@google.com>,
	Terry Bowman <terry.bowman@amd.com>, Len Brown <lenb@kernel.org>,
	James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
	Ben Cheatham <Benjamin.Cheatham@amd.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Shuai Xue <xueshuai@linux.alibaba.com>,
	Liu Xinpeng <liuxp11@chinatelecom.cn>,
	Darren Hart <darren@os.amperecomputing.com>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH] PCI/AER: Consolidate CXL and native AER reporting paths
Date: Mon, 24 Mar 2025 20:31:04 +0100	[thread overview]
Message-ID: <44b1b803-b8a5-4d81-a918-5d2ae13914a4@oracle.com> (raw)
In-Reply-To: <20250321150607.GA1124679@bhelgaas>

[+Jonathan to ask about CXL error injection in qemu]

On 21/03/2025 16:06, Bjorn Helgaas wrote:
> On Fri, Mar 21, 2025 at 02:56:16PM +0100, Karolina Stolarek wrote:
>>
>> ... But still, the question is if going with the
>> new format that matches what's in AER a bad or disruptive thing. I'd like to
>> try going in the direction of using one way of reporting AER errors, if
>> possible.
> 
> Absolutely, I agree 100%.  The choice between native AER and GHES is
> made by the platform, not by the OS, so I think it's crazy that we log
> them differently.  We just need to include information about any log
> format changes we make to help users adapt to them.

I agree, we should highlight the difference. I'm trying to get 
before-after logs for CXL but I can't get this to work on pci-next 
kernel (i.e., without Terry's patchset).

Jonathan, I'm sorry for dragging you into the thread, but I thought you 
could provide suggestions on what might be wrong with my setup.

I tried to test this patch by injecting a CXL Correctable Error via 
QMP[0], following these instructions[1]. 
qmp_cxl_inject_correctable_error() finishes with no issues (it calls 
pcie_aer_inject_error()) but I see no AER log or whatsoever. This is the 
command that I used[2], with QEMU v7.1.0-rc2-21892-gd9a4282c4b and the 
pci-next kernel.

Is there something else I need to enable or provide some parameters to 
get this working?

All the best,
Karolina

------------------------------------------------------------------------
[0]:
{ "execute": "qmp_capabilities" }
...
{ "execute": "cxl-inject-correctable-error",
     "arguments": {
         "path": "/machine/peripheral/cxl-vmem0",
         "type": "physical"
     }
}

[1] - 
https://gitlab.com/jic23/qemu/-/commit/b3488ff7ee6ebfe247c9af751f44f2990babd4a7

[2]:
$ qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 16G -rtc base=utc \
   -M q35,cxl=on -nographic -serial mon:stdio \
   -drive 
file=/.../ovmf_code.pure-efi.fd,index=0,if=pflash,format=raw,readonly=on \
   -drive file=/.../ovmf-vars.base_image.fd,index=1,if=pflash,format=raw \
   -object 
memory-backend-file,id=cxl-mem0,share=on,mem-path=/tmp/cxltest.raw,size=256M 
\
   -object 
memory-backend-file,id=cxl-lsa0,share=on,mem-path=/tmp/lsa0.raw,size=256M \
   -device pxb-cxl,bus_nr=12,bus=pcie.0,id=cxl.1 \
   -device cxl-rp,port=0,bus=cxl.1,id=root_port0,chassis=0,slot=0 \
   -device cxl-upstream,bus=root_port0,id=us0 \
   -device cxl-downstream,port=0,bus=us0,id=swport0,chassis=0,slot=4 \
   -device 
cxl-type3,bus=swport0,volatile-memdev=cxl-mem0,lsa=cxl-lsa0,id=cxl-vmem0 \
   -qmp tcp:localhost:4444,server,wait=off \
   -M 
cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=4G,cxl-fmw.0.interleave-granularity=4k 
\
   -hda disk1.qcow2

      reply	other threads:[~2025-03-24 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 10:14 [PATCH] PCI/AER: Consolidate CXL and native AER reporting paths Karolina Stolarek
2025-03-19 22:21 ` Bjorn Helgaas
2025-03-20 15:14   ` Karolina Stolarek
2025-03-20 18:17     ` Bjorn Helgaas
2025-03-21 13:56       ` Karolina Stolarek
2025-03-21 15:06         ` Bjorn Helgaas
2025-03-24 19:31           ` Karolina Stolarek [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=44b1b803-b8a5-4d81-a918-5d2ae13914a4@oracle.com \
    --to=karolina.stolarek@oracle.com \
    --cc=Benjamin.Cheatham@amd.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=darren@os.amperecomputing.com \
    --cc=helgaas@kernel.org \
    --cc=ira.weiny@intel.com \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuxp11@chinatelecom.cn \
    --cc=pandoh@google.com \
    --cc=terry.bowman@amd.com \
    --cc=tony.luck@intel.com \
    --cc=xueshuai@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox