aboutsummaryrefslogtreecommitdiff
path: root/scripts/kvm/vmxcap
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-04-19 08:37:58 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-19 08:37:58 -0500
commitb6c99f8a6d66c5fa01a60483d9b012eb2b0932f2 (patch)
treea55d2778b242575eebf69d24198468db8321189e /scripts/kvm/vmxcap
parent09dada400328d75daf79e3eca1e48e024fec148d (diff)
parent007e986ff2dd140348e76feb21cde1a51ce6c5b4 (diff)
downloadqemu-b6c99f8a6d66c5fa01a60483d9b012eb2b0932f2.zip
qemu-b6c99f8a6d66c5fa01a60483d9b012eb2b0932f2.tar.gz
qemu-b6c99f8a6d66c5fa01a60483d9b012eb2b0932f2.tar.bz2
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
# By Jan Kiszka (4) and Marcelo Tosatti (1) # Via Marcelo Tosatti * qemu-kvm/uq/master: vmxcap: Update according to SDM of January 2013 target-i386: kvm: save/restore steal time MSR vmxcap: Report APIC register emulation and RDTSCP control vmxcap: Augment reported information vmxcap: Open MSR file in unbuffered mode Message-id: cover.1366253306.git.mtosatti@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'scripts/kvm/vmxcap')
-rwxr-xr-xscripts/kvm/vmxcap26
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
index 0b23f77..c90eda4 100755
--- a/scripts/kvm/vmxcap
+++ b/scripts/kvm/vmxcap
@@ -27,9 +27,9 @@ MSR_IA32_VMX_VMFUNC = 0x491
class msr(object):
def __init__(self):
try:
- self.f = file('/dev/cpu/0/msr')
+ self.f = open('/dev/cpu/0/msr', 'r', 0)
except:
- self.f = file('/dev/msr0')
+ self.f = open('/dev/msr0', 'r', 0)
def read(self, index, default = None):
import struct
self.f.seek(index)
@@ -96,6 +96,19 @@ class Misc(object):
print ' %-40s %s' % (self.bits[bits], fmt(v))
controls = [
+ Misc(
+ name = 'Basic VMX Information',
+ bits = {
+ (0, 31): 'Revision',
+ (32,44): 'VMCS size',
+ 48: 'VMCS restricted to 32 bit addresses',
+ 49: 'Dual-monitor support',
+ (50, 53): 'VMCS memory type',
+ 54: 'INS/OUTS instruction information',
+ 55: 'IA32_VMX_TRUE_*_CTLS support',
+ },
+ msr = MSR_IA32_VMX_BASIC,
+ ),
Control(
name = 'pin-based controls',
bits = {
@@ -103,6 +116,7 @@ controls = [
3: 'NMI exiting',
5: 'Virtual NMIs',
6: 'Activate VMX-preemption timer',
+ 7: 'Process posted interrupts',
},
cap_msr = MSR_IA32_VMX_PINBASED_CTLS,
true_cap_msr = MSR_IA32_VMX_TRUE_PINBASED_CTLS,
@@ -143,15 +157,19 @@ controls = [
0: 'Virtualize APIC accesses',
1: 'Enable EPT',
2: 'Descriptor-table exiting',
+ 3: 'Enable RDTSCP',
4: 'Virtualize x2APIC mode',
5: 'Enable VPID',
6: 'WBINVD exiting',
7: 'Unrestricted guest',
+ 8: 'APIC register emulation',
9: 'Virtual interrupt delivery',
10: 'PAUSE-loop exiting',
11: 'RDRAND exiting',
12: 'Enable INVPCID',
13: 'Enable VM functions',
+ 14: 'VMCS shadowing',
+ 18: 'EPT-violation #VE'
},
cap_msr = MSR_IA32_VMX_PROCBASED_CTLS2,
),
@@ -196,10 +214,12 @@ controls = [
6: 'HLT activity state',
7: 'Shutdown activity state',
8: 'Wait-for-SIPI activity state',
+ 15: 'IA32_SMBASE support',
(16,24): 'Number of CR3-target values',
(25,27): 'MSR-load/store count recommenation',
28: 'IA32_SMM_MONITOR_CTL[2] can be set to 1',
- (32,62): 'MSEG revision identifier',
+ 29: 'VMWRITE to VM-exit information fields',
+ (32,63): 'MSEG revision identifier',
},
msr = MSR_IA32_VMX_MISC_CTLS,
),