Lines Matching refs:cr0
2124 ulong cr0; in vmx_fpu_activate() local
2129 cr0 = vmcs_readl(GUEST_CR0); in vmx_fpu_activate()
2130 cr0 &= ~(X86_CR0_TS | X86_CR0_MP); in vmx_fpu_activate()
2131 cr0 |= kvm_read_cr0_bits(vcpu, X86_CR0_TS | X86_CR0_MP); in vmx_fpu_activate()
2132 vmcs_writel(GUEST_CR0, cr0); in vmx_fpu_activate()
2180 (vcpu->arch.cr0 & X86_CR0_TS); in vmx_fpu_deactivate()
2183 vmcs_writel(CR0_READ_SHADOW, vcpu->arch.cr0); in vmx_fpu_deactivate()
3625 vcpu->arch.cr0 &= ~cr0_guest_owned_bits; in vmx_decache_cr0_guest_bits()
3626 vcpu->arch.cr0 |= vmcs_readl(GUEST_CR0) & cr0_guest_owned_bits; in vmx_decache_cr0_guest_bits()
3680 unsigned long cr0, in ept_update_paging_mode_cr0() argument
3685 if (!(cr0 & X86_CR0_PG)) { in ept_update_paging_mode_cr0()
3691 vcpu->arch.cr0 = cr0; in ept_update_paging_mode_cr0()
3699 vcpu->arch.cr0 = cr0; in ept_update_paging_mode_cr0()
3703 if (!(cr0 & X86_CR0_WP)) in ept_update_paging_mode_cr0()
3707 static void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) in vmx_set_cr0() argument
3712 hw_cr0 = (cr0 & ~KVM_GUEST_CR0_MASK); in vmx_set_cr0()
3718 if (vmx->rmode.vm86_active && (cr0 & X86_CR0_PE)) in vmx_set_cr0()
3721 if (!vmx->rmode.vm86_active && !(cr0 & X86_CR0_PE)) in vmx_set_cr0()
3727 if (!is_paging(vcpu) && (cr0 & X86_CR0_PG)) in vmx_set_cr0()
3729 if (is_paging(vcpu) && !(cr0 & X86_CR0_PG)) in vmx_set_cr0()
3735 ept_update_paging_mode_cr0(&hw_cr0, cr0, vcpu); in vmx_set_cr0()
3740 vmcs_writel(CR0_READ_SHADOW, cr0); in vmx_set_cr0()
3742 vcpu->arch.cr0 = cr0; in vmx_set_cr0()
4876 u64 cr0; in vmx_vcpu_reset() local
4956 cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; in vmx_vcpu_reset()
4957 vmx->vcpu.arch.cr0 = cr0; in vmx_vcpu_reset()
4958 vmx_set_cr0(vcpu, cr0); /* enter rmode */ in vmx_vcpu_reset()
5450 vcpu->arch.cr0 &= ~X86_CR0_TS; in handle_clts()