From: Caleb Schlossin <calebs@linux.ibm.com>
To: Saif Abrar <saif.abrar@linux.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: harshpb@linux.ibm.com, clg@kaod.org, npiggin@gmail.com,
fbarrat@linux.ibm.com, mst@redhat.com,
marcel.apfelbaum@gmail.com, cohuck@redhat.com,
pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com,
danielhb413@gmail.com, kowal@linux.ibm.com,
chalapathi.v@linux.ibm.com, milesg@linux.ibm.com,
jishnuvw@linux.ibm.com, adityag@linux.ibm.com,
amachhiw@linux.ibm.com
Subject: Re: [PATCH v6 9/9] pnv/phb5: Mask off LSI Source-ID based on number of interrupts
Date: Wed, 30 Sep 2026 09:12:13 -0500 [thread overview]
Message-ID: <f7bdd2f0-8c95-4e15-b45c-9cc5d9c446df@linux.ibm.com> (raw)
In-Reply-To: <20260831123005.1485518-10-saif.abrar@linux.ibm.com>
Reviewed-by: Caleb Schlossin <calebs@linux.ibm.com>
On 8/31/26 7:30 AM, Saif Abrar wrote:
> From: Saif Abrar <saif.abrar@linux.vnet.ibm.com>
>
> Add a method to reset the value of LSI Source-ID.
> Mask off LSI source-id based on number of interrupts in the big/small PHB.
>
> Signed-off-by: Saif Abrar <saif.abrar@linux.ibm.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Caleb Schlossin <calebs@linux.ibm.com>
> Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
> ---
> hw/pci-host/pnv_phb4.c | 12 +++++++++---
> hw/pci-host/pnv_phb5.c | 17 -----------------
> include/hw/pci-host/pnv_phb5.h | 10 ++++------
> 3 files changed, 13 insertions(+), 26 deletions(-)
>
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index 5f84550a7c..362c9a039b 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -491,6 +491,7 @@ static void pnv_phb4_update_xsrc(PnvPHB4 *phb)
>
> lsi_base = GETFIELD(PHB_LSI_SRC_ID, phb->regs[PHB_LSI_SOURCE_ID >> 3]);
> lsi_base <<= 3;
> + lsi_base &= (xsrc->nr_irqs - 1);
>
> /* TODO: handle reset values of PHB_LSI_SRC_ID */
> if (!lsi_base) {
> @@ -1908,6 +1909,12 @@ static void pnv_phb4_ro_mask_init(PnvPHB4Class *phb4c)
> /* TODO: Add more RO-masks as regs are implemented in the model */
> }
>
> +static void pnv_phb4_xsrc_reset(PnvPHB4 *phb)
> +{
> + phb->regs[PHB_LSI_SOURCE_ID >> 3] = PPC_BITMASK(4, 12);
> + pnv_phb4_update_xsrc(phb);
> +}
> +
> static void pnv_phb4_err_reg_reset(PnvPHB4 *phb)
> {
> STICKY_RST(PHB_ERR_STATUS, 0, PPC_BITMASK(0, 33));
> @@ -1964,10 +1971,11 @@ static void pnv_phb4_reset(Object *obj, ResetType type)
> PnvPHB4 *phb = PNV_PHB4(obj);
>
> pnv_phb4_pbl_core_reset(phb);
> +
> + pnv_phb4_xsrc_reset(phb);
> pnv_phb4_err_reg_reset(phb);
> pnv_phb4_pcie_stack_reg_reset(phb);
> pnv_phb4_regb_err_reg_reset(phb);
> - phb->regs[PHB_PCIE_CRESET >> 3] = 0xE000000000000000;
> }
>
> static void pnv_phb4_instance_init(Object *obj)
> @@ -2041,8 +2049,6 @@ void pnv_phb4_realize(DeviceState *dev, Error **errp)
> return;
> }
>
> - pnv_phb4_update_xsrc(phb);
> -
> phb->qirqs = qemu_allocate_irqs(xive_source_set_irq, xsrc, xsrc->nr_irqs);
>
> pnv_phb4_xscom_realize(phb);
> diff --git a/hw/pci-host/pnv_phb5.c b/hw/pci-host/pnv_phb5.c
> index b09351f69f..ec6dfbe2b2 100644
> --- a/hw/pci-host/pnv_phb5.c
> +++ b/hw/pci-host/pnv_phb5.c
> @@ -6,24 +6,7 @@
> * SPDX-License-Identifier: GPL-2.0-or-later
> */
>
> -#include "qemu/osdep.h"
> -#include "qemu/log.h"
> -#include "qemu/bswap.h"
> -#include "qapi/visitor.h"
> -#include "qapi/error.h"
> -#include "target/ppc/cpu.h"
> -#include "hw/pci-host/pnv_phb4_regs.h"
> -#include "hw/pci-host/pnv_phb4.h"
> #include "hw/pci-host/pnv_phb5.h"
> -#include "hw/pci/pcie_host.h"
> -#include "hw/pci/pcie_port.h"
> -#include "hw/ppc/pnv.h"
> -#include "hw/ppc/pnv_xscom.h"
> -#include "hw/core/irq.h"
> -#include "hw/core/qdev-properties.h"
> -#include "qom/object.h"
> -#include "trace.h"
> -#include "system/reset.h"
>
> void pnv_phb5_cfg_core_reset(PCIDevice *d)
> {
> diff --git a/include/hw/pci-host/pnv_phb5.h b/include/hw/pci-host/pnv_phb5.h
> index 4534083fd5..8f1df4892f 100644
> --- a/include/hw/pci-host/pnv_phb5.h
> +++ b/include/hw/pci-host/pnv_phb5.h
> @@ -9,12 +9,10 @@
> #ifndef PCI_HOST_PNV_PHB5_H
> #define PCI_HOST_PNV_PHB5_H
>
> -#include "hw/pci-host/pnv_phb.h"
> -#include "hw/pci/pci_bus.h"
> -#include "hw/ppc/pnv.h"
> -#include "hw/ppc/pnv_nest_pervasive.h"
> -#include "hw/ppc/xive.h"
> -#include "qom/object.h"
> +#include "qemu/osdep.h"
> +#include "qemu/log.h"
> +#include "hw/pci-host/pnv_phb4_regs.h"
> +#include "hw/pci-host/pnv_phb4.h"
>
> void pnv_phb5_cfg_core_reset(PCIDevice *d);
>
next prev parent reply other threads:[~2026-09-30 14:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 12:29 [PATCH v6 0/9] pnv/phb5: Update PHB4 to the latest PHB5 spec Saif Abrar
2026-08-31 12:29 ` [PATCH v6 1/9] qtest/phb5: Add testbench for PHB Saif Abrar
2026-09-03 16:52 ` Mike Kowal
2026-09-12 12:37 ` Aditya Gupta
2026-09-30 14:10 ` Caleb Schlossin
2026-08-31 12:29 ` [PATCH v6 2/9] pnv/phb5: Add reset logic to PHB5 Saif Abrar
2026-09-03 16:52 ` Mike Kowal
2026-09-12 12:39 ` Aditya Gupta
2026-09-30 14:10 ` Caleb Schlossin
2026-08-31 12:29 ` [PATCH v6 3/9] pnv/phb5: Implement sticky reset logic in PHB5 Saif Abrar
2026-09-03 16:53 ` Mike Kowal
2026-09-30 14:10 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 4/9] pnv/phb5: Implement read-only and write-only bits of registers Saif Abrar
2026-09-03 16:54 ` Mike Kowal
2026-09-30 14:11 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 5/9] pnv/phb5: Implement write-clear and return 1's on unimplemented reg read Saif Abrar
2026-09-03 16:49 ` Mike Kowal
2026-09-30 14:11 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 6/9] pnv/phb5: Set link-active status in HPSTAT and LMR registers Saif Abrar
2026-09-03 16:55 ` Mike Kowal
2026-09-12 12:41 ` Aditya Gupta
2026-09-30 14:11 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 7/9] pnv/phb5: Set link speed and width in the DLP training control register Saif Abrar
2026-09-03 16:56 ` Mike Kowal
2026-09-30 14:11 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 8/9] pnv/phb5: Implement IODA PCT table Saif Abrar
2026-09-03 16:50 ` Mike Kowal
2026-09-30 14:12 ` Caleb Schlossin
2026-08-31 12:30 ` [PATCH v6 9/9] pnv/phb5: Mask off LSI Source-ID based on number of interrupts Saif Abrar
2026-09-03 16:51 ` Mike Kowal
2026-09-30 14:12 ` Caleb Schlossin [this message]
2026-09-03 17:02 ` [PATCH v6 0/9] pnv/phb5: Update PHB4 to the latest PHB5 spec Mike Kowal
2026-09-12 12:43 ` Aditya Gupta
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=f7bdd2f0-8c95-4e15-b45c-9cc5d9c446df@linux.ibm.com \
--to=calebs@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=chalapathi.v@linux.ibm.com \
--cc=clg@kaod.org \
--cc=cohuck@redhat.com \
--cc=danielhb413@gmail.com \
--cc=fbarrat@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=jishnuvw@linux.ibm.com \
--cc=kowal@linux.ibm.com \
--cc=lvivier@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=milesg@linux.ibm.com \
--cc=mst@redhat.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=saif.abrar@linux.ibm.com \
--cc=thuth@redhat.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.