]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/xen: Support HVM_PARAM_CALLBACK_TYPE_PCI_INTX callback
authorDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 16 Dec 2022 00:03:21 +0000 (00:03 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 15 Feb 2023 15:16:58 +0000 (16:16 +0100)
commit3ad7a8e0e7084956582a6360790cdc855cf9f0d0
tree0b8482d8cbaa3af16e4041b781f830a4e35cf7cb
parent720ecaa08f650cc835b03d5bc1c82c15a64fb573
hw/xen: Support HVM_PARAM_CALLBACK_TYPE_PCI_INTX callback

The guest is permitted to specify an arbitrary domain/bus/device/function
and INTX pin from which the callback IRQ shall appear to have come.

In QEMU we can only easily do this for devices that actually exist, and
even that requires us "knowing" that it's a PCMachine in order to find
the PCI root bus — although that's OK really because it's always true.

We also don't get to get notified of INTX routing changes, because we
can't do that as a passive observer; if we try to register a notifier
it will overwrite any existing notifier callback on the device.

But in practice, guests using PCI_INTX will only ever use pin A on the
Xen platform device, and won't swizzle the INTX routing after they set
it up. So this is just fine.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
hw/i386/kvm/xen_evtchn.c
target/i386/kvm/xen-emu.c