yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
4ec855
From 0d087d9d5276866b7a7c17cdb23e71b5636dc529 Mon Sep 17 00:00:00 2001
4ec855
From: Paolo Bonzini <pbonzini@redhat.com>
4ec855
Date: Fri, 22 Nov 2019 11:53:43 +0000
4ec855
Subject: [PATCH 10/16] vmxcap: correct the name of the variables
4ec855
4ec855
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
4ec855
Message-id: <20191122115348.25000-11-pbonzini@redhat.com>
4ec855
Patchwork-id: 92607
4ec855
O-Subject: [RHEL8.2/rhel qemu-kvm PATCH 10/15] vmxcap: correct the name of the variables
4ec855
Bugzilla: 1689270
4ec855
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
4ec855
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
4ec855
RH-Acked-by: Maxim Levitsky <mlevitsk@redhat.com>
4ec855
4ec855
The low bits are 1 if the control must be one, the high bits
4ec855
are 1 if the control can be one.  Correct the variable names
4ec855
as they are very confusing.
4ec855
4ec855
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4ec855
(cherry picked from commit 49d51b8927a9ea7267f4677a2e92f5046ce74025)
4ec855
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
4ec855
---
4ec855
 scripts/kvm/vmxcap | 14 +++++++-------
4ec855
 1 file changed, 7 insertions(+), 7 deletions(-)
4ec855
4ec855
diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
4ec855
index 99a8146..2db6832 100755
4ec855
--- a/scripts/kvm/vmxcap
4ec855
+++ b/scripts/kvm/vmxcap
4ec855
@@ -51,15 +51,15 @@ class Control(object):
4ec855
         return (val & 0xffffffff, val >> 32)
4ec855
     def show(self):
4ec855
         print(self.name)
4ec855
-        mbz, mb1 = self.read2(self.cap_msr)
4ec855
-        tmbz, tmb1 = 0, 0
4ec855
+        mb1, cb1 = self.read2(self.cap_msr)
4ec855
+        tmb1, tcb1 = 0, 0
4ec855
         if self.true_cap_msr:
4ec855
-            tmbz, tmb1 = self.read2(self.true_cap_msr)
4ec855
+            tmb1, tcb1 = self.read2(self.true_cap_msr)
4ec855
         for bit in sorted(self.bits.keys()):
4ec855
-            zero = not (mbz & (1 << bit))
4ec855
-            one = mb1 & (1 << bit)
4ec855
-            true_zero = not (tmbz & (1 << bit))
4ec855
-            true_one = tmb1 & (1 << bit)
4ec855
+            zero = not (mb1 & (1 << bit))
4ec855
+            one = cb1 & (1 << bit)
4ec855
+            true_zero = not (tmb1 & (1 << bit))
4ec855
+            true_one = tcb1 & (1 << bit)
4ec855
             s= '?'
4ec855
             if (self.true_cap_msr and true_zero and true_one
4ec855
                 and one and not zero):
4ec855
-- 
4ec855
1.8.3.1
4ec855