From: Avi Kivity <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
diff --git a/kvm/scripts/vmxcap b/kvm/scripts/vmxcap
index 50fb86e..93051c6 100755
--- a/kvm/scripts/vmxcap
+++ b/kvm/scripts/vmxcap
@@ -59,6 +59,29 @@ class Control(object):
s = 'yes'
print ' %-40s %s' % (self.bits[bit], s)
+class Misc(object):
+ def __init__(self, name, bits, msr):
+ self.name = name
+ self.bits = bits
+ self.msr = msr
+ def show(self):
+ print self.name
+ value = msr().read(self.msr, 0)
+ def first_bit(key):
+ if type(key) is tuple:
+ return key[0]
+ else:
+ return key
+ for bits in sorted(self.bits.keys(), key = first_bit):
+ if type(bits) is tuple:
+ lo, hi = bits
+ fmt = int
+ else:
+ lo = hi = bits
+ fmt = bool
+ v = (value >> lo) & ((1 << (hi - lo + 1)) - 1)
+ print ' %-40s %s' % (self.bits[bits], fmt(v))
+
controls = [
Control(
name = 'pin-based controls',
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html