lkml.org 
[lkml]   [2006]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 35/38] KVM: Remove guest_cpl()
    From
    Date
    This was used only in debugging.

    Signed-off-by: Avi Kivity <avi@qumranet.com>

    Index: linux-2.6/drivers/kvm/kvm.h
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/kvm.h
    +++ linux-2.6/drivers/kvm/kvm.h
    @@ -422,11 +422,6 @@ static inline int is_pse(struct kvm_vcpu
    return vcpu->cr4 & CR4_PSE_MASK;
    }

    -static inline unsigned guest_cpl(void)
    -{
    - return vmcs_read16(GUEST_CS_SELECTOR) & SELECTOR_RPL_MASK;
    -}
    -
    static inline int is_paging(struct kvm_vcpu *vcpu)
    {
    return vcpu->cr0 & CR0_PG_MASK;
    Index: linux-2.6/drivers/kvm/vmx.c
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/vmx.c
    +++ linux-2.6/drivers/kvm/vmx.c
    @@ -1391,14 +1391,6 @@ static int handle_cr(struct kvm_vcpu *vc
    int cr;
    int reg;

    -#ifdef KVM_DEBUG
    - if (guest_cpl() != 0) {
    - vcpu_printf(vcpu, "%s: not supervisor\n", __FUNCTION__);
    - inject_gp(vcpu);
    - return 1;
    - }
    -#endif
    -
    exit_qualification = vmcs_read64(EXIT_QUALIFICATION);
    cr = exit_qualification & 15;
    reg = (exit_qualification >> 8) & 15;
    -
    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: 2006-11-27 13:49    [W:4.482 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site