On 20/10/2026 18:39, Bernhard Beschow wrote:

Am 19. Oktober 2026 12:04:54 UTC schrieb Mark Cave-Ayland 
<[email protected]>:
This clarifies that the interrupt controller being modelled is an emulated
i8259 implementation, and brings the naming convention in line with the
in-built i8259 and KVM i8259 implementations.

Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
---
include/hw/xen/xen.h  | 2 +-
hw/i386/pc.c          | 2 +-
hw/i386/xen/xen-hvm.c | 2 +-
stubs/xen-hw-stub.c   | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index e94c6e5a31..ee4ed4f11b 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -42,7 +42,7 @@ void xen_intx_set_irq(void *opaque, int irq_num, int level);
void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
int xen_is_pirq_msi(uint32_t msi_data);

-qemu_irq *xen_interrupt_controller_init(void);
+qemu_irq *xen_i8259_init(void);

void xen_register_framebuffer(struct MemoryRegion *mr);

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2d8c87b0e3..dbfd55de30 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1167,7 +1167,7 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq 
*i8259_irqs)
     if (kvm_pic_in_kernel()) {
         i8259 = kvm_i8259_init(isa_bus);
     } else if (xen_enabled()) {
-        i8259 = xen_interrupt_controller_init();
+        i8259 = xen_i8259_init();
     } else {
         i8259 = i8259_init(isa_bus, x86_allocate_cpu_irq());
     }
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index d3ce082e07..af3a90987c 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -112,7 +112,7 @@ static void xen_set_irq(void *opaque, int irq, int level)
     xen_set_isa_irq_level(xen_domid, irq, level);
}

-qemu_irq *xen_interrupt_controller_init(void)
+qemu_irq *xen_i8259_init(void)
{
     return qemu_allocate_irqs(xen_set_irq, NULL, 16);

Since this function allocates 16 IRQs, the convention according to this series 
would be xen_i8259_pic_init(), no?

I've deliberately used the same naming here as KVM does in pc_i8259_create(), i.e. xen_i8259_init() to match kvm_i8259_init(). However ultimately it shouldn't matter as I'm planning to remove those *_i8259_init() functions in a future series.

Otherwise, much appreciated clarification of the terminology.

Thanks!
Best regards,
Bernhard

}
diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c
index 6cf0e9a4c1..b3e27f0292 100644
--- a/stubs/xen-hw-stub.c
+++ b/stubs/xen-hw-stub.c
@@ -29,7 +29,7 @@ int xen_is_pirq_msi(uint32_t msi_data)
     return 0;
}

-qemu_irq *xen_interrupt_controller_init(void)
+qemu_irq *xen_i8259_init(void)
{
     return NULL;
}


ATB,

Mark.


Reply via email to