aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorNadav Amit <namit@cs.technion.ac.il>2015-03-29 09:33:04 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2015-03-30 10:46:42 -0400
commitb32a99180027ec980af971d548781eac1f6bb9b5 (patch)
tree1b782f2d3443a1d3567c0ce6f45372e31f71bb3d /arch/x86/kvm/emulate.c
parent0efb04406de834d820f7ba150a00d1d3194aa8a6 (diff)
KVM: x86: Remove redundant definitions
Some constants are redfined in emulate.c. Avoid it. s/SELECTOR_RPL_MASK/SEGMENT_RPL_MASK s/SELECTOR_TI_MASK/SEGMENT_TI_MASK No functional change. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> Message-Id: <1427635984-8113-3-git-send-email-namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index e49cabae377d..cf7d424b29d2 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2435,7 +2435,7 @@ static int em_sysenter(struct x86_emulate_ctxt *ctxt)
2435 return emulate_gp(ctxt, 0); 2435 return emulate_gp(ctxt, 0);
2436 2436
2437 ctxt->eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_IF); 2437 ctxt->eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_IF);
2438 cs_sel = (u16)msr_data & ~SELECTOR_RPL_MASK; 2438 cs_sel = (u16)msr_data & ~SEGMENT_RPL_MASK;
2439 ss_sel = cs_sel + 8; 2439 ss_sel = cs_sel + 8;
2440 if (efer & EFER_LMA) { 2440 if (efer & EFER_LMA) {
2441 cs.d = 0; 2441 cs.d = 0;
@@ -2502,8 +2502,8 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt)
2502 return emulate_gp(ctxt, 0); 2502 return emulate_gp(ctxt, 0);
2503 break; 2503 break;
2504 } 2504 }
2505 cs_sel |= SELECTOR_RPL_MASK; 2505 cs_sel |= SEGMENT_RPL_MASK;
2506 ss_sel |= SELECTOR_RPL_MASK; 2506 ss_sel |= SEGMENT_RPL_MASK;
2507 2507
2508 ops->set_segment(ctxt, cs_sel, &cs, 0, VCPU_SREG_CS); 2508 ops->set_segment(ctxt, cs_sel, &cs, 0, VCPU_SREG_CS);
2509 ops->set_segment(ctxt, ss_sel, &ss, 0, VCPU_SREG_SS); 2509 ops->set_segment(ctxt, ss_sel, &ss, 0, VCPU_SREG_SS);