• Suresh Warrier's avatar
    KVM: PPC: Book3S HV: Host-side RM data structures · 79b6c247
    Suresh Warrier authored
    This patch defines the data structures to support the setting up
    of host side operations while running in real mode in the guest,
    and also the functions to allocate and free it.
    
    The operations are for now limited to virtual XICS operations.
    Currently, we have only defined one operation in the data
    structure:
             - Wake up a VCPU sleeping in the host when it
               receives a virtual interrupt
    
    The operations are assigned at the core level because PowerKVM
    requires that the host run in SMT off mode. For each core,
    we will need to manage its state atomically - where the state
    is defined by:
    1. Is the core running in the host?
    2. Is there a Real Mode (RM) operation pending on the host?
    
    Currently, core state is only managed at the whole-core level
    even when the system is in split-core mode. This just limits
    the number of free or "available" cores in the host to perform
    any host-side operations.
    
    The kvmppc_host_rm_core.rm_data allows any data to be passed by
    KVM in real mode to the host core along with the operation to
    be performed.
    
    The kvmppc_host_rm_ops structure is allocated the very first time
    a guest VM is started. Initial core state is also set - all online
    cores are in the host. This structure is never deleted, not even
    when there are no active guests. However, it needs to be freed
    when the module is unloaded because the kvmppc_host_rm_ops_hv
    can contain function pointers to kvm-hv.ko functions for the
    different supported host operations.
    Signed-off-by: default avatarSuresh Warrier <warrier@linux.vnet.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    79b6c247
kvm_ppc.h 23.4 KB