aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2012-12-12 12:10:55 -0500
committerGleb Natapov <gleb@redhat.com>2012-12-23 07:02:00 -0500
commitf924d66d278d5da890f3098805b0450a4ef66c32 (patch)
tree44675c858c00b8c8cc55ee8f5f9fef7d54f41fe7
parent1ecd50a9474c4bfa3129d90cfcf1c1eb4fbf19e7 (diff)
KVM: VMX: remove unneeded temporary variable from vmx_set_segment()
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4bd1c22db390..23d5aec78073 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3268,7 +3268,6 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu,
3268{ 3268{
3269 struct vcpu_vmx *vmx = to_vmx(vcpu); 3269 struct vcpu_vmx *vmx = to_vmx(vcpu);
3270 const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg]; 3270 const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
3271 u32 ar = 0;
3272 3271
3273 vmx_segment_cache_clear(vmx); 3272 vmx_segment_cache_clear(vmx);
3274 __clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail); 3273 __clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail);
@@ -3285,7 +3284,6 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu,
3285 vmcs_writel(sf->base, var->base); 3284 vmcs_writel(sf->base, var->base);
3286 vmcs_write32(sf->limit, var->limit); 3285 vmcs_write32(sf->limit, var->limit);
3287 vmcs_write16(sf->selector, var->selector); 3286 vmcs_write16(sf->selector, var->selector);
3288 ar = vmx_segment_access_rights(var);
3289 3287
3290 /* 3288 /*
3291 * Fix the "Accessed" bit in AR field of segment registers for older 3289 * Fix the "Accessed" bit in AR field of segment registers for older
@@ -3299,9 +3297,9 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu,
3299 * kvm hack. 3297 * kvm hack.
3300 */ 3298 */
3301 if (enable_unrestricted_guest && (seg != VCPU_SREG_LDTR)) 3299 if (enable_unrestricted_guest && (seg != VCPU_SREG_LDTR))
3302 ar |= 0x1; /* Accessed */ 3300 var->type |= 0x1; /* Accessed */
3303 3301
3304 vmcs_write32(sf->ar_bytes, ar); 3302 vmcs_write32(sf->ar_bytes, vmx_segment_access_rights(var));
3305} 3303}
3306 3304
3307static void vmx_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l) 3305static void vmx_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l)