lkml.org 
[lkml]   [2007]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 24/58] KVM: VMX: Handle #SS faults from real mode
    Date
    From: Nitin A Kamble <nitin.a.kamble@intel.com>

    Instructions with address size override prefix opcode 0x67
    Cause the #SS fault with 0 error code in VM86 mode. Forward
    them to the emulator.

    Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Avi Kivity <avi@qumranet.com>
    ---
    drivers/kvm/vmx.c | 6 +++++-
    1 files changed, 5 insertions(+), 1 deletions(-)

    diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
    index c4c5535..a05bfa0 100644
    --- a/drivers/kvm/vmx.c
    +++ b/drivers/kvm/vmx.c
    @@ -1488,7 +1488,11 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
    if (!vcpu->rmode.active)
    return 0;

    - if (vec == GP_VECTOR && err_code == 0)
    + /*
    + * Instruction with address size override prefix opcode 0x67
    + * Cause the #SS fault with 0 error code in VM86 mode.
    + */
    + if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0)
    if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE)
    return 1;
    return 0;
    --
    1.5.0.6
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-06-17 12:07    [W:0.027 / U:149.744 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site