• P
    s390: ap: kvm: add PQAP interception for AQIC · e5282de9
    Pierre Morel 提交于
    We prepare the interception of the PQAP/AQIC instruction for
    the case the AQIC facility is enabled in the guest.
    
    First of all we do not want to change existing behavior when
    intercepting AP instructions without the SIE allowing the guest
    to use AP instructions.
    
    In this patch we only handle the AQIC interception allowed by
    facility 65 which will be enabled when the complete interception
    infrastructure will be present.
    
    We add a callback inside the KVM arch structure for s390 for
    a VFIO driver to handle a specific response to the PQAP
    instruction with the AQIC command and only this command.
    
    But we want to be able to return a correct answer to the guest
    even there is no VFIO AP driver in the kernel.
    Therefor, we inject the correct exceptions from inside KVM for the
    case the callback is not initialized, which happens when the vfio_ap
    driver is not loaded.
    
    We do consider the responsibility of the driver to always initialize
    the PQAP callback if it defines queues by initializing the CRYCB for
    a guest.
    If the callback has been setup we call it.
    If not we setup an answer considering that no queue is available
    for the guest when no callback has been setup.
    Signed-off-by: NPierre Morel <pmorel@linux.ibm.com>
    Reviewed-by: NTony Krowiak <akrowiak@linux.ibm.com>
    Acked-by: NHarald Freudenberger <freude@linux.ibm.com>
    Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: NHalil Pasic <pasic@linux.ibm.com>
    Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
    e5282de9
priv.c 40.8 KB