[PATCH 1/2] arch/x86/kvm/x86.c: remove superflous check condition

[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 | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8b8fc0b..93cf454 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5680,20 +5680,17 @@ 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;
 
-	if (!longmode) {
-		param = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDX) << 32) |
-			(kvm_register_read(vcpu, VCPU_REGS_RAX) & 0xffffffff);
-		ingpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RBX) << 32) |
-			(kvm_register_read(vcpu, VCPU_REGS_RCX) & 0xffffffff);
-		outgpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDI) << 32) |
-			(kvm_register_read(vcpu, VCPU_REGS_RSI) & 0xffffffff);
-	}
 #ifdef CONFIG_X86_64
-	else {
-		param = kvm_register_read(vcpu, VCPU_REGS_RCX);
-		ingpa = kvm_register_read(vcpu, VCPU_REGS_RDX);
-		outgpa = kvm_register_read(vcpu, VCPU_REGS_R8);
-	}
+	param = kvm_register_read(vcpu, VCPU_REGS_RCX);
+	ingpa = kvm_register_read(vcpu, VCPU_REGS_RDX);
+	outgpa = kvm_register_read(vcpu, VCPU_REGS_R8);
+#else
+	param = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDX) << 32) |
+		(kvm_register_read(vcpu, VCPU_REGS_RAX) & 0xffffffff);
+	ingpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RBX) << 32) |
+		(kvm_register_read(vcpu, VCPU_REGS_RCX) & 0xffffffff);
+	outgpa = ((u64)kvm_register_read(vcpu, VCPU_REGS_RDI) << 32) |
+		(kvm_register_read(vcpu, VCPU_REGS_RSI) & 0xffffffff);
 #endif
 
 	code = param & 0xffff;
-- 
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