Revision c5854acb scripts/kvm/kvm_stat
b/scripts/kvm/kvm_stat | ||
---|---|---|
141 | 141 |
0x400: 'NPF', |
142 | 142 |
} |
143 | 143 |
|
144 |
s390_exit_reasons = { |
|
145 |
0x000: 'UNKNOWN', |
|
146 |
0x001: 'EXCEPTION', |
|
147 |
0x002: 'IO', |
|
148 |
0x003: 'HYPERCALL', |
|
149 |
0x004: 'DEBUG', |
|
150 |
0x005: 'HLT', |
|
151 |
0x006: 'MMIO', |
|
152 |
0x007: 'IRQ_WINDOW_OPEN', |
|
153 |
0x008: 'SHUTDOWN', |
|
154 |
0x009: 'FAIL_ENTRY', |
|
155 |
0x010: 'INTR', |
|
156 |
0x011: 'SET_TPR', |
|
157 |
0x012: 'TPR_ACCESS', |
|
158 |
0x013: 'S390_SIEIC', |
|
159 |
0x014: 'S390_RESET', |
|
160 |
0x015: 'DCR', |
|
161 |
0x016: 'NMI', |
|
162 |
0x017: 'INTERNAL_ERROR', |
|
163 |
0x018: 'OSI', |
|
164 |
0x019: 'PAPR_HCALL', |
|
165 |
} |
|
166 |
|
|
144 | 167 |
vendor_exit_reasons = { |
145 | 168 |
'vmx': vmx_exit_reasons, |
146 | 169 |
'svm': svm_exit_reasons, |
170 |
'IBM/S390': s390_exit_reasons, |
|
147 | 171 |
} |
148 | 172 |
|
149 | 173 |
exit_reasons = None |
150 | 174 |
|
151 | 175 |
for line in file('/proc/cpuinfo').readlines(): |
152 |
if line.startswith('flags'): |
|
176 |
if line.startswith('flags') or line.startswith('vendor_id'):
|
|
153 | 177 |
for flag in line.split(): |
154 | 178 |
if flag in vendor_exit_reasons: |
155 | 179 |
exit_reasons = vendor_exit_reasons[flag] |
Also available in: Unified diff