• Christoffer Dall's avatar
    KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl · 9b062471
    Christoffer Dall authored
    Move the calls to vcpu_load() and vcpu_put() in to the architecture
    specific implementations of kvm_arch_vcpu_ioctl() which dispatches
    further architecture-specific ioctls on to other functions.
    
    Some architectures support asynchronous vcpu ioctls which cannot call
    vcpu_load() or take the vcpu->mutex, because that would prevent
    concurrent execution with a running VCPU, which is the intended purpose
    of these ioctls, for example because they inject interrupts.
    
    We repeat the separate checks for these specifics in the architecture
    code for MIPS, S390 and PPC, and avoid taking the vcpu->mutex and
    calling vcpu_load for these ioctls.
    Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    9b062471
kvm_main.c 95.5 KB