]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vmxcap: correct the name of the variables
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jul 2019 14:51:24 +0000 (16:51 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Oct 2019 16:49:19 +0000 (18:49 +0200)
The low bits are 1 if the control must be one, the high bits
are 1 if the control can be one.  Correct the variable names
as they are very confusing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/vmxcap

index d8c7d6dfb8cc73b2b600d80fb75d88acbd4b0494..5dfeb2e03acead5d9e9ca15fdbb8ccc290d1465e 100755 (executable)
@@ -51,15 +51,15 @@ class Control(object):
         return (val & 0xffffffff, val >> 32)
     def show(self):
         print(self.name)
-        mbz, mb1 = self.read2(self.cap_msr)
-        tmbz, tmb1 = 0, 0
+        mb1, cb1 = self.read2(self.cap_msr)
+        tmb1, tcb1 = 0, 0
         if self.true_cap_msr:
-            tmbz, tmb1 = self.read2(self.true_cap_msr)
+            tmb1, tcb1 = self.read2(self.true_cap_msr)
         for bit in sorted(self.bits.keys()):
-            zero = not (mbz & (1 << bit))
-            one = mb1 & (1 << bit)
-            true_zero = not (tmbz & (1 << bit))
-            true_one = tmb1 & (1 << bit)
+            zero = not (mb1 & (1 << bit))
+            one = cb1 & (1 << bit)
+            true_zero = not (tmb1 & (1 << bit))
+            true_one = tcb1 & (1 << bit)
             s= '?'
             if (self.true_cap_msr and true_zero and true_one
                 and one and not zero):