mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
x86: get rid of _MASK flags
There's no need for the *_MASK flags (TF_MASK, IF_MASK, etc), found in processor.h (both _32 and _64). They have a one-to-one mapping with the EFLAGS value. This patch removes the definitions, and use the already existent X86_EFLAGS_ version when applicable. [ [email protected]: KVM build fixes. ] Signed-off-by: Glauber de Oliveira Costa <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
73018a66e7
commit
053de04441
9 changed files with 21 additions and 31 deletions
|
|
@ -524,7 +524,7 @@ 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;
|
||||
rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
|
||||
vmcs_writel(GUEST_RFLAGS, rflags);
|
||||
}
|
||||
|
||||
|
|
@ -1050,7 +1050,7 @@ static void enter_pmode(struct kvm_vcpu *vcpu)
|
|||
vmcs_write32(GUEST_TR_AR_BYTES, vcpu->rmode.tr.ar);
|
||||
|
||||
flags = vmcs_readl(GUEST_RFLAGS);
|
||||
flags &= ~(IOPL_MASK | X86_EFLAGS_VM);
|
||||
flags &= ~(X86_EFLAGS_IOPL | X86_EFLAGS_VM);
|
||||
flags |= (vcpu->rmode.save_iopl << IOPL_SHIFT);
|
||||
vmcs_writel(GUEST_RFLAGS, flags);
|
||||
|
||||
|
|
@ -1107,9 +1107,9 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
|
|||
vmcs_write32(GUEST_TR_AR_BYTES, 0x008b);
|
||||
|
||||
flags = vmcs_readl(GUEST_RFLAGS);
|
||||
vcpu->rmode.save_iopl = (flags & IOPL_MASK) >> IOPL_SHIFT;
|
||||
vcpu->rmode.save_iopl = (flags & X86_EFLAGS_IOPL) >> IOPL_SHIFT;
|
||||
|
||||
flags |= IOPL_MASK | X86_EFLAGS_VM;
|
||||
flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
|
||||
|
||||
vmcs_writel(GUEST_RFLAGS, flags);
|
||||
vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);
|
||||
|
|
|
|||
Loading…
Reference in a new issue