lkml.org 
[lkml]   [2007]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 09/10] KVM: VMX: Force vm86 mode if setting flags during real mode
    Date
    When resetting from userspace, we need to handle the flags being cleared
    even after we are in real mode.

    Signed-off-by: Avi Kivity <avi@qumranet.com>
    ---
    drivers/kvm/vmx.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
    index 80628f6..c158a2d 100644
    --- a/drivers/kvm/vmx.c
    +++ b/drivers/kvm/vmx.c
    @@ -463,6 +463,8 @@ static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)

    static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
    {
    + if (vcpu->rmode.active)
    + rflags |= IOPL_MASK | X86_EFLAGS_VM;
    vmcs_writel(GUEST_RFLAGS, rflags);
    }

    --
    1.5.3


    \
     
     \ /
      Last update: 2007-12-02 12:23    [W:9.706 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site