From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: npiggin@gmail.com, harshpb@linux.ibm.com, mahesh@linux.ibm.com,
ganeshgr@linux.ibm.com, sbhat@linux.ibm.com,
vaibhav@linux.ibm.com, anushree.mathur@linux.vnet.ibm.com,
clg@redhat.com, philmd@linaro.org
Subject: Re: [PATCH v2 5/6] ppc/spapr: Split VFIO code and refactor EEH interface
Date: Wed, 20 May 2026 21:17:38 +0530 [thread overview]
Message-ID: <8954ec65-b1d8-4ae5-b191-4ef24a101a66@linux.ibm.com> (raw)
In-Reply-To: <60d9c0da-cf4b-4210-8a54-743bb4e767be@oss.qualcomm.com>
On 19/05/26 8:17 PM, Pierrick Bouvier wrote:
> On 5/19/2026 5:33 AM, Narayana Murty N wrote:
>> Split spapr_pci_vfio.c into two files to separate concerns:
>> - spapr_pci_vfio.c: Contains general VFIO routines
>> - spapr_pci_vfio_eeh.c: Contains EEH-specific routines
>>
>> Additionally, consolidate VFIO EEH function declarations into a new
>> header file (spapr_vfio.h) to improve modularity and reduce header
>> dependencies.
>>
>> Changes:
>> - Split VFIO functionality: keep general VFIO routines in
>> spapr_pci_vfio.c and move EEH routines to spapr_pci_vfio_eeh.c
>> - Created include/hw/ppc/spapr_vfio.h with forward declarations
>> to avoid pulling in full spapr headers and libfdt dependencies
>> - Introduced stubs/spapr_pci_vfio-stubs.c to consolidate all VFIO,
>> VFIO EEH stub functions in one place
>> - Updated hw/ppc/spapr_pci.c to include new spapr_vfio.h header
>> - Updated stubs/meson.build to reference new stub file
>>
>> This improves code organization by separating VFIO and EEH concerns,
>> and enhances build system modularity by making it easier to maintain
>> VFIO-related code separately from core sPAPR PCI code.
>>
>> Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
>> ---
>> hw/ppc/Kconfig | 2 +-
>> hw/ppc/meson.build | 1 +
>> hw/ppc/spapr_pci.c | 3 +-
>> hw/ppc/spapr_pci_vfio.c | 367 +----------------------------------
>> hw/ppc/spapr_pci_vfio_eeh.c | 346 +++++++++++++++++++++++++++++++++
>> include/hw/pci-host/spapr.h | 44 +----
>> include/hw/ppc/spapr_vfio.h | 28 +++
>> stubs/meson.build | 1 +
>> stubs/spapr_phb_vfio-stubs.c | 52 +++++
>> 9 files changed, 433 insertions(+), 411 deletions(-)
>> create mode 100644 hw/ppc/spapr_pci_vfio_eeh.c
>> create mode 100644 include/hw/ppc/spapr_vfio.h
>> create mode 100644 stubs/spapr_phb_vfio-stubs.c
>>
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index 347dcce690..1fb191fe83 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -6,7 +6,7 @@ config PSERIES
>> imply PCI_DEVICES
>> imply TEST_DEVICES
>> imply VIRTIO_VGA
>> - imply VFIO_PCI if LINUX # needed by spapr_pci_vfio.c
>> + imply VFIO_PCI if LINUX # needed by spapr_pci_vfio.c and spapr_pci_vfio_eeh.c
>> select NVDIMM
>> select DIMM
>> select PCI
>> diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
>> index 37aa535db2..97e4be0dc9 100644
>> --- a/hw/ppc/meson.build
>> +++ b/hw/ppc/meson.build
>> @@ -36,6 +36,7 @@ ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
>> if host_os == 'linux'
>> ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
>> 'spapr_pci_vfio.c',
>> + 'spapr_pci_vfio_eeh.c',
>> ))
>> endif
>>
>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
>> index b00f71d92a..221d05e5c5 100644
>> --- a/hw/ppc/spapr_pci.c
>> +++ b/hw/ppc/spapr_pci.c
>> @@ -33,6 +33,7 @@
>> #include "hw/pci/msix.h"
>> #include "hw/pci/pci_host.h"
>> #include "hw/ppc/spapr.h"
>> +#include "hw/ppc/spapr_vfio.h"
>> #include "hw/pci-host/spapr.h"
>> #include <libfdt.h>
>> #include "trace.h"
>> @@ -718,7 +719,7 @@ static int parse_and_verify_recovered_special_event(target_ulong param_buf,
>> static int parse_and_verify_corrupted_page(target_ulong param_buf,
>> uint64_t *addr) {
>> *addr = ((uint64_t)rtas_ld(param_buf, 0) << 32) | rtas_ld(param_buf, 1);
>> - qemu_log("RTAS: corrupted-page: addr=0x%lx\n", *addr);
>> + qemu_log("RTAS: corrupted-page: addr=0x%llx\n", *addr);
>> return (*addr) ? RTAS_OUT_SUCCESS : RTAS_OUT_PARAM_ERROR;
>> }
> See build failures for this change:
> https://github.com/p-b-o/qemu-ci/actions/runs/26094993976
> If we want to change something, the proper way is %"PRIx64".
>
> ...
>
> Rest of the patch looks ok to me.
Thanks reviewing. I have corrected the gitlab CI build failure issue in
patch and
another test case failure on gitlab. corrected V3 patches are posted at
https://lore.kernel.org/all/20260520095446.64206-1-nnmlinux@linux.ibm.com/
Please take a look and let me know if any further review comments.
Thanks
Narayana Murty
> Regards,
> Pierrick
next prev parent reply other threads:[~2026-05-20 15:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 10:33 [PATCH v2 0/6] ppc/spapr: Add RTAS error injection support for VFIO EEH Narayana Murty N
2026-05-19 10:33 ` [PATCH v2 1/6] ppc/spapr: Add VFIO EEH error injection backend Narayana Murty N
2026-05-19 10:33 ` [PATCH v2 2/6] ppc/spapr: Add ibm,errinjct RTAS call handler Narayana Murty N
2026-05-19 10:33 ` [PATCH v2 3/6] ppc/spapr: Add support for 'ibm, open-errinjct' and 'ibm, close-errinjct' Narayana Murty N
2026-05-19 10:33 ` [PATCH v2 4/6] ppc/spapr: Advertise RTAS error injection call support via FDT property Narayana Murty N
2026-05-19 10:33 ` [PATCH v2 5/6] ppc/spapr: Split VFIO code and refactor EEH interface Narayana Murty N
2026-05-19 14:47 ` Pierrick Bouvier
2026-05-20 15:47 ` Narayana Murty N [this message]
2026-05-19 10:33 ` [PATCH v2 6/6] MAINTAINERS: Add entry for sPAPR PCI VFIO EEH support Narayana Murty N
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=8954ec65-b1d8-4ae5-b191-4ef24a101a66@linux.ibm.com \
--to=nnmlinux@linux.ibm.com \
--cc=anushree.mathur@linux.vnet.ibm.com \
--cc=clg@redhat.com \
--cc=ganeshgr@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sbhat@linux.ibm.com \
--cc=vaibhav@linux.ibm.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.