[PATCH 2/2] arch/x86/kvm/x86.c: variable longmode ist just used in one place, remove it therefore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Toralf Förster <toralf.foerster@xxxxxx>
---
 arch/x86/kvm/x86.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 93cf454..05166a0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5665,7 +5665,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
 {
 	u64 param, ingpa, outgpa, ret;
 	uint16_t code, rep_idx, rep_cnt, res = HV_STATUS_SUCCESS, rep_done = 0;
-	bool fast, longmode;
+	bool fast;
 	int cs_db, cs_l;
 
 	/*
@@ -5678,7 +5678,6 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
 	}
 
 	kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l);
-	longmode = is_long_mode(vcpu) && cs_l == 1;
 
 #ifdef CONFIG_X86_64
 	param = kvm_register_read(vcpu, VCPU_REGS_RCX);
@@ -5710,7 +5709,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
 	}
 
 	ret = res | (((u64)rep_done & 0xfff) << 32);
-	if (longmode) {
+	if (is_long_mode(vcpu) && cs_l == 1) {
 		kvm_register_write(vcpu, VCPU_REGS_RAX, ret);
 	} else {
 		kvm_register_write(vcpu, VCPU_REGS_RDX, ret >> 32);
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux