aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@amd.com>2024-09-06 15:05:51 +0200
committerEdgar E. Iglesias <edgar.iglesias@amd.com>2024-10-03 19:37:35 +0200
commitca9275a4b11aced3074219d1712e29fce5036f72 (patch)
tree4a2d797ec28a24eaffa874d1704af33fb386ae9e /hw
parent3bcdba25dfa2ace7887c57ebcc17da4023da1266 (diff)
hw/arm: xenpvh: Enable PCI for ARM PVH
Enable PCI support for the ARM Xen PVH machine. Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/xen-pvh.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c
index 28af3910ea..33f0dd5982 100644
--- a/hw/arm/xen-pvh.c
+++ b/hw/arm/xen-pvh.c
@@ -39,6 +39,16 @@ static void xen_arm_instance_init(Object *obj)
VIRTIO_MMIO_DEV_SIZE };
}
+static void xen_pvh_set_pci_intx_irq(void *opaque, int intx_irq, int level)
+{
+ XenPVHMachineState *s = XEN_PVH_MACHINE(opaque);
+ int irq = s->cfg.pci_intx_irq_base + intx_irq;
+
+ if (xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level)) {
+ error_report("xendevicemodel_set_pci_intx_level failed");
+ }
+}
+
static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
{
XenPVHMachineClass *xpc = XEN_PVH_MACHINE_CLASS(oc);
@@ -69,7 +79,11 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
/* Xen/ARM does not use buffered IOREQs. */
xpc->handle_bufioreq = HVM_IOREQSRV_BUFIOREQ_OFF;
+ /* PCI INTX delivery. */
+ xpc->set_pci_intx_irq = xen_pvh_set_pci_intx_irq;
+
/* List of supported features known to work on PVH ARM. */
+ xpc->has_pci = true;
xpc->has_tpm = true;
xpc->has_virtio_mmio = true;