• Cédric Le Goater's avatar
    KVM: Introduce a 'release' method for KVM devices · 2bde9b3e
    Cédric Le Goater authored
    When a P9 sPAPR VM boots, the CAS negotiation process determines which
    interrupt mode to use (XICS legacy or XIVE native) and invokes a
    machine reset to activate the chosen mode.
    
    To be able to switch from one interrupt mode to another, we introduce
    the capability to release a KVM device without destroying the VM. The
    KVM device interface is extended with a new 'release' method which is
    called when the file descriptor of the device is closed.
    
    Once 'release' is called, the 'destroy' method will not be called
    anymore as the device is removed from the device list of the VM.
    
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
    Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    2bde9b3e
kvm_main.c 100 KB