• C
    spapr/irq: add KVM support to the 'dual' machine · 3f777abc
    Cédric Le Goater 提交于
    The interrupt mode is chosen by the CAS negotiation process and
    activated after a reset to take into account the required changes in
    the machine. This brings new constraints on how the associated KVM IRQ
    device is initialized.
    
    Currently, each model takes care of the initialization of the KVM
    device in their realize method but this is not possible anymore as the
    initialization needs to be done globaly when the interrupt mode is
    known, i.e. when machine is reseted. It also means that we need a way
    to delete a KVM device when another mode is chosen.
    
    Also, to support migration, the QEMU objects holding the state to
    transfer should always be available but not necessarily activated.
    
    The overall approach of this proposal is to initialize both interrupt
    mode at the QEMU level to keep the IRQ number space in sync and to
    allow switching from one mode to another. For the KVM side of things,
    the whole initialization of the KVM device, sources and presenters, is
    grouped in a single routine. The XICS and XIVE sPAPR IRQ reset
    handlers are modified accordingly to handle the init and the delete
    sequences of the KVM device.
    Signed-off-by: NCédric Le Goater <clg@kaod.org>
    Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Message-Id: <20190513084245.25755-15-clg@kaod.org>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    3f777abc
xive.h 15.9 KB