From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: sstabellini@kernel.org, anthony@xenproject.org, paul@xen.org,
peter.maydell@linaro.org, edgar.iglesias@amd.com,
xen-devel@lists.xenproject.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: [PULL v2 4/5] hw/xen: xenpvh: Add pci-intx-irq-base property
Date: Thu, 3 Oct 2024 20:56:53 +0200 [thread overview]
Message-ID: <20241003185655.1480819-5-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <20241003185655.1480819-1-edgar.iglesias@gmail.com>
From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
---
hw/xen/xen-pvh-common.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/hw/xen/xen-pvh-common.c b/hw/xen/xen-pvh-common.c
index 76a9b2b945..218ac851cf 100644
--- a/hw/xen/xen-pvh-common.c
+++ b/hw/xen/xen-pvh-common.c
@@ -218,6 +218,11 @@ static void xen_pvh_init(MachineState *ms)
error_report("pci-ecam-size only supports values 0 or 0x10000000");
exit(EXIT_FAILURE);
}
+ if (!s->cfg.pci_intx_irq_base) {
+ error_report("PCI enabled but pci-intx-irq-base not set");
+ exit(EXIT_FAILURE);
+ }
+
xenpvh_gpex_init(s, xpc, sysmem);
}
@@ -273,6 +278,30 @@ XEN_PVH_PROP_MEMMAP(pci_ecam)
XEN_PVH_PROP_MEMMAP(pci_mmio)
XEN_PVH_PROP_MEMMAP(pci_mmio_high)
+static void xen_pvh_set_pci_intx_irq_base(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ XenPVHMachineState *xp = XEN_PVH_MACHINE(obj);
+ uint32_t value;
+
+ if (!visit_type_uint32(v, name, &value, errp)) {
+ return;
+ }
+
+ xp->cfg.pci_intx_irq_base = value;
+}
+
+static void xen_pvh_get_pci_intx_irq_base(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ XenPVHMachineState *xp = XEN_PVH_MACHINE(obj);
+ uint32_t value = xp->cfg.pci_intx_irq_base;
+
+ visit_type_uint32(v, name, &value, errp);
+}
+
void xen_pvh_class_setup_common_props(XenPVHMachineClass *xpc)
{
ObjectClass *oc = OBJECT_CLASS(xpc);
@@ -318,6 +347,13 @@ do { \
OC_MEMMAP_PROP(oc, "pci-ecam", pci_ecam);
OC_MEMMAP_PROP(oc, "pci-mmio", pci_mmio);
OC_MEMMAP_PROP(oc, "pci-mmio-high", pci_mmio_high);
+
+ object_class_property_add(oc, "pci-intx-irq-base", "uint32_t",
+ xen_pvh_get_pci_intx_irq_base,
+ xen_pvh_set_pci_intx_irq_base,
+ NULL, NULL);
+ object_class_property_set_description(oc, "pci-intx-irq-base",
+ "Set PCI INTX interrupt base line.");
}
#ifdef CONFIG_TPM
--
2.43.0
next prev parent reply other threads:[~2024-10-03 18:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 18:56 [PULL v2 0/5] Xen Queue Edgar E. Iglesias
2024-10-03 18:56 ` [PULL v2 1/5] hw/xen: Remove deadcode Edgar E. Iglesias
2024-10-03 18:56 ` [PULL v2 2/5] hw/xen: Expose handle_bufioreq in xen_register_ioreq Edgar E. Iglesias
2024-10-07 15:42 ` Peter Maydell
2024-10-08 16:15 ` Edgar E. Iglesias
2024-10-03 18:56 ` [PULL v2 3/5] hw/xen: xenpvh: Disable buffered IOREQs for ARM Edgar E. Iglesias
2024-10-03 18:56 ` Edgar E. Iglesias [this message]
2024-10-03 18:56 ` [PULL v2 5/5] hw/arm: xenpvh: Enable PCI for ARM PVH Edgar E. Iglesias
2024-10-04 16:07 ` [PULL v2 0/5] Xen Queue Peter Maydell
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=20241003185655.1480819-5-edgar.iglesias@gmail.com \
--to=edgar.iglesias@gmail.com \
--cc=anthony@xenproject.org \
--cc=edgar.iglesias@amd.com \
--cc=paul@xen.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).