lkml.org 
[lkml]   [2017]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 3/3] kvm: arm64: handle single-step of userspace mmio instructions
    Date
    The system state of KVM when using userspace emulation is not complete
    until we return into KVM_RUN. To handle mmio related updates we wait
    until they have been committed and then schedule our KVM_EXIT_DEBUG.

    The kvm_arm_handle_step_debug() helper tells us if we need to return
    and sets up the exit_reason for us.

    Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

    ---
    v2
    - call helper directly from kvm_arch_vcpu_ioctl_run
    ---
    virt/kvm/arm/arm.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
    index 95cba0799828..2991adfaca9d 100644
    --- a/virt/kvm/arm/arm.c
    +++ b/virt/kvm/arm/arm.c
    @@ -625,6 +625,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
    ret = kvm_handle_mmio_return(vcpu, vcpu->run);
    if (ret)
    return ret;
    + if (kvm_arm_handle_step_debug(vcpu, vcpu->run))
    + return 1;
    +
    }

    if (run->immediate_exit)
    --
    2.14.2
    \
     
     \ /
      Last update: 2017-11-09 18:02    [W:3.238 / U:0.988 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site