[libvirt] [PATCH 00/33] qemu: Detect host CPU model by asking QEMU on x86_64
by Jiri Denemark
Until now host-model CPU mode tried to enable all CPU features supported
by the host CPU even if QEMU/KVM did not support them. This caused a
number of issues and made host-model quite unreliable. Asking QEMU for
the CPU it can provide and the current host makes host-model much more
robust.
This series fixes the following bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1018251
https://bugzilla.redhat.com/show_bug.cgi?id=1371617
https://bugzilla.redhat.com/show_bug.cgi?id=1372581
https://bugzilla.redhat.com/show_bug.cgi?id=1404627
https://bugzilla.redhat.com/show_bug.cgi?id=870071
In addition to that, the following bug should be mostly limited to cases
when an unsupported feature is explicitly requested:
https://bugzilla.redhat.com/show_bug.cgi?id=1335534
The series relies on features which are not in QEMU yet, but should be
hopefully close enough to be pushed in 2.9.0. In the meantime, Eduardo's
work/x86-query-cpu-expansion-full branch can be used to play with them.
Jiri Denemark (33):
docs: Drop obsolete statement about CPU modes and migration
docs: Fix since statement in host-model documentation
qemucapstest: Add test data for QEMU 2.9.0
domaincapstest: Add test data for QEMU 2.9.0
qemu: Refactor virQEMUCapsInitHostCPUModel
qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs
qemu: Fix CPU model fallback in domain capabilities
docs: Update description of the host-model CPU mode
qemu: Introduce virQEMUCapsFormatHostCPUModelInfo
qemu: Rename hostCPU/feature element in capabilities cache
qemu: Store more types in qemuMonitorCPUModelInfo
qemu: Probe "max" CPU model in TCG
cpu: Introduce virCPUDataNew
cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew
cpu_x86: Make virCPUx86DataClear static
cpu: Rework cpuDataFree
cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr
cpu_x86: Introduce virCPUx86DataSetSignature
cpu_x86: Introduce virCPUx86DataSetVendor
cpu_x86: Introduce virCPUx86DataAddFeature
cpu: Use virCPUData.arch in cpuDecode
qemu: Get host CPU model from QEMU on x86_64
qemu: Use enum for CPU model expansion type
qemu: Use full CPU model expansion on x86
qemu: Make virQEMUCapsInitCPUModel testable
cputest: Rename x86 data files
cputest: Use virArch enum rather then strings
cputest: Switch host CPU data scripts to model expansion
cputest: Convert all json data files to query-cpu-model-expansion
cputest: Test virQEMUCapsInitCPUModel
cputest: Drop obsolete CPU test data files
cputest: Drop .new suffix from CPU test data files
news: Detect host CPU model by asking QEMU on x86_64
docs/formatdomain.html.in | 38 +-
docs/news.xml | 11 +
src/bhyve/bhyve_capabilities.c | 2 +-
src/cpu/cpu.c | 42 +-
src/cpu/cpu.h | 7 +-
src/cpu/cpu_arm.c | 7 -
src/cpu/cpu_ppc64.c | 6 +-
src/cpu/cpu_s390.c | 7 -
src/cpu/cpu_x86.c | 280 +-
src/cpu/cpu_x86.h | 13 +-
src/libvirt_private.syms | 8 +-
src/libxl/libxl_capabilities.c | 18 +-
src/qemu/qemu_capabilities.c | 452 +-
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_capspriv.h | 13 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_monitor.c | 26 +-
src/qemu/qemu_monitor.h | 31 +-
src/qemu/qemu_monitor_json.c | 109 +-
src/qemu/qemu_monitor_json.h | 4 +-
src/qemu/qemu_parse_command.c | 2 +-
src/qemu/qemu_process.c | 7 +-
src/vmware/vmware_conf.c | 2 +-
src/vz/vz_driver.c | 2 +-
tests/cputest.c | 324 +-
tests/cputestdata/cpu-convert.py | 244 +
tests/cputestdata/cpu-gather.sh | 39 +-
tests/cputestdata/cpu-parse.sh | 3 +
tests/cputestdata/x86-cpuid-A10-5800K.json | 77 -
tests/cputestdata/x86-cpuid-Core-i5-2500.json | 88 -
tests/cputestdata/x86-cpuid-Core-i5-2540M.json | 82 -
tests/cputestdata/x86-cpuid-Core-i5-4670T.json | 77 -
tests/cputestdata/x86-cpuid-Core-i5-6600.json | 82 -
tests/cputestdata/x86-cpuid-Core-i7-2600.json | 77 -
tests/cputestdata/x86-cpuid-Core-i7-3740QM.json | 77 -
tests/cputestdata/x86-cpuid-Core-i7-3770.json | 77 -
tests/cputestdata/x86-cpuid-Core-i7-4600U.json | 82 -
tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml | 12 -
tests/cputestdata/x86-cpuid-Core-i7-5600U.json | 88 -
tests/cputestdata/x86-cpuid-Core2-E6850.json | 77 -
tests/cputestdata/x86-cpuid-Opteron-2350.json | 71 -
tests/cputestdata/x86-cpuid-Opteron-6234.json | 88 -
tests/cputestdata/x86-cpuid-Phenom-B95.json | 77 -
tests/cputestdata/x86-cpuid-Xeon-E3-1245.json | 88 -
tests/cputestdata/x86-cpuid-Xeon-E5-2630.json | 77 -
tests/cputestdata/x86-cpuid-Xeon-E5-2650.json | 71 -
tests/cputestdata/x86-cpuid-Xeon-E7-4820.json | 77 -
tests/cputestdata/x86-cpuid-Xeon-W3520.json | 77 -
...ack.xml => x86_64-Haswell-noTSX-nofallback.xml} | 0
...-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} | 0
.../{x86-Haswell.xml => x86_64-Haswell.xml} | 0
...e-1-result.xml => x86_64-baseline-1-result.xml} | 0
.../{x86-baseline-1.xml => x86_64-baseline-1.xml} | 0
...e-2-result.xml => x86_64-baseline-2-result.xml} | 0
.../{x86-baseline-2.xml => x86_64-baseline-2.xml} | 0
...expanded.xml => x86_64-baseline-3-expanded.xml} | 0
...e-3-result.xml => x86_64-baseline-3-result.xml} | 0
.../{x86-baseline-3.xml => x86_64-baseline-3.xml} | 0
...expanded.xml => x86_64-baseline-4-expanded.xml} | 0
...e-4-result.xml => x86_64-baseline-4-result.xml} | 0
.../{x86-baseline-4.xml => x86_64-baseline-4.xml} | 0
...expanded.xml => x86_64-baseline-5-expanded.xml} | 0
...e-5-result.xml => x86_64-baseline-5-result.xml} | 0
.../{x86-baseline-5.xml => x86_64-baseline-5.xml} | 0
...atable.xml => x86_64-baseline-6-migratable.xml} | 0
...e-6-result.xml => x86_64-baseline-6-result.xml} | 0
.../{x86-baseline-6.xml => x86_64-baseline-6.xml} | 0
...e-7-result.xml => x86_64-baseline-7-result.xml} | 0
.../{x86-baseline-7.xml => x86_64-baseline-7.xml} | 0
...e-8-result.xml => x86_64-baseline-8-result.xml} | 0
.../{x86-baseline-8.xml => x86_64-baseline-8.xml} | 0
...ml => x86_64-baseline-incompatible-vendors.xml} | 0
...lt.xml => x86_64-baseline-no-vendor-result.xml} | 0
...no-vendor.xml => x86_64-baseline-no-vendor.xml} | 0
...xml => x86_64-baseline-some-vendors-result.xml} | 0
...endors.xml => x86_64-baseline-some-vendors.xml} | 0
...-bogus-feature.xml => x86_64-bogus-feature.xml} | 0
...{x86-bogus-model.xml => x86_64-bogus-model.xml} | 0
...86-bogus-vendor.xml => x86_64-bogus-vendor.xml} | 0
...-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} | 0
...0K-host.xml => x86_64-cpuid-A10-5800K-host.xml} | 0
...0K-json.xml => x86_64-cpuid-A10-5800K-json.xml} | 0
tests/cputestdata/x86_64-cpuid-A10-5800K.json | 202 +
...id-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} | 0
...-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} | 0
...10-host.xml => x86_64-cpuid-Atom-D510-host.xml} | 0
...id-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} | 0
...-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} | 0
...50-host.xml => x86_64-cpuid-Atom-N450-host.xml} | 0
...id-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} | 0
...est.xml => x86_64-cpuid-Core-i5-2500-guest.xml} | 0
...host.xml => x86_64-cpuid-Core-i5-2500-host.xml} | 0
...json.xml => x86_64-cpuid-Core-i5-2500-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 202 +
...e-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} | 0
...st.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} | 0
...ost.xml => x86_64-cpuid-Core-i5-2540M-host.xml} | 0
...son.xml => x86_64-cpuid-Core-i5-2540M-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json | 202 +
...i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} | 0
...st.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} | 0
...ost.xml => x86_64-cpuid-Core-i5-4670T-host.xml} | 0
...son.xml => x86_64-cpuid-Core-i5-4670T-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json | 202 +
...i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} | 0
...est.xml => x86_64-cpuid-Core-i5-6600-guest.xml} | 0
...host.xml => x86_64-cpuid-Core-i5-6600-host.xml} | 0
...json.xml => x86_64-cpuid-Core-i5-6600-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i5-6600.json | 202 +
...e-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} | 0
...est.xml => x86_64-cpuid-Core-i7-2600-guest.xml} | 0
...host.xml => x86_64-cpuid-Core-i7-2600-host.xml} | 0
...json.xml => x86_64-cpuid-Core-i7-2600-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i7-2600.json | 202 +
...e-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} | 0
...st.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} | 0
...ost.xml => x86_64-cpuid-Core-i7-3520M-host.xml} | 0
...i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} | 0
...t.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} | 0
...st.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} | 0
...on.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json | 202 +
...-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} | 0
...est.xml => x86_64-cpuid-Core-i7-3770-guest.xml} | 0
...host.xml => x86_64-cpuid-Core-i7-3770-host.xml} | 0
...json.xml => x86_64-cpuid-Core-i7-3770-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i7-3770.json | 202 +
...e-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} | 0
...st.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} | 0
...ost.xml => x86_64-cpuid-Core-i7-4600U-host.xml} | 0
...son.xml => x86_64-cpuid-Core-i7-4600U-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json | 202 +
...i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} | 0
...st.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} | 0
...ost.xml => x86_64-cpuid-Core-i7-5600U-host.xml} | 0
.../x86_64-cpuid-Core-i7-5600U-json.xml | 15 +
tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json | 202 +
...i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} | 0
...uest.xml => x86_64-cpuid-Core2-E6850-guest.xml} | 0
...-host.xml => x86_64-cpuid-Core2-E6850-host.xml} | 0
...-json.xml => x86_64-cpuid-Core2-E6850-json.xml} | 4 +-
tests/cputestdata/x86_64-cpuid-Core2-E6850.json | 202 +
...ore2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} | 0
...uest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} | 0
...-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} | 0
...ore2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} | 0
...50-guest.xml => x86_64-cpuid-FX-8150-guest.xml} | 0
...8150-host.xml => x86_64-cpuid-FX-8150-host.xml} | 0
...-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} | 0
...est.xml => x86_64-cpuid-Opteron-1352-guest.xml} | 0
...host.xml => x86_64-cpuid-Opteron-1352-host.xml} | 0
...eron-1352.xml => x86_64-cpuid-Opteron-1352.xml} | 0
...est.xml => x86_64-cpuid-Opteron-2350-guest.xml} | 0
...host.xml => x86_64-cpuid-Opteron-2350-host.xml} | 0
...json.xml => x86_64-cpuid-Opteron-2350-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Opteron-2350.json | 202 +
...eron-2350.xml => x86_64-cpuid-Opteron-2350.xml} | 0
...est.xml => x86_64-cpuid-Opteron-6234-guest.xml} | 0
...host.xml => x86_64-cpuid-Opteron-6234-host.xml} | 0
...json.xml => x86_64-cpuid-Opteron-6234-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Opteron-6234.json | 202 +
...eron-6234.xml => x86_64-cpuid-Opteron-6234.xml} | 0
...est.xml => x86_64-cpuid-Opteron-6282-guest.xml} | 0
...host.xml => x86_64-cpuid-Opteron-6282-host.xml} | 0
...eron-6282.xml => x86_64-cpuid-Opteron-6282.xml} | 0
...st.xml => x86_64-cpuid-Pentium-P6100-guest.xml} | 0
...ost.xml => x86_64-cpuid-Pentium-P6100-host.xml} | 0
...um-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} | 0
...guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} | 0
...5-host.xml => x86_64-cpuid-Phenom-B95-host.xml} | 0
...5-json.xml => x86_64-cpuid-Phenom-B95-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Phenom-B95.json | 202 +
...-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} | 0
...-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} | 0
...10-host.xml => x86_64-cpuid-Xeon-5110-host.xml} | 0
...id-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} | 0
...est.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} | 0
...host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} | 0
...json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json | 202 +
...n-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} | 0
...est.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} | 0
...host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} | 0
...json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json | 202 +
...n-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} | 0
...est.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} | 0
...host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} | 0
...json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json | 202 +
...n-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} | 0
...est.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} | 0
...host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} | 0
...json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json | 202 +
...n-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} | 0
...guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} | 0
...0-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} | 0
...0-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} | 0
tests/cputestdata/x86_64-cpuid-Xeon-W3520.json | 202 +
...-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} | 0
...guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} | 0
...0-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} | 0
...-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} | 0
...le-extra.xml => x86_64-exact-disable-extra.xml} | 0
...-exact-disable.xml => x86_64-exact-disable.xml} | 0
...xact-disable2.xml => x86_64-exact-disable2.xml} | 0
...bid-extra.xml => x86_64-exact-forbid-extra.xml} | 0
...86-exact-forbid.xml => x86_64-exact-forbid.xml} | 0
...-Haswell.xml => x86_64-exact-force-Haswell.xml} | 0
...{x86-exact-force.xml => x86_64-exact-force.xml} | 0
...re-extra.xml => x86_64-exact-require-extra.xml} | 0
...-exact-require.xml => x86_64-exact-require.xml} | 0
.../{x86-exact.xml => x86_64-exact.xml} | 0
...-nofallback.xml => x86_64-guest-nofallback.xml} | 0
.../{x86-guest.xml => x86_64-guest.xml} | 0
...t.xml => x86_64-host+guest,model486-result.xml} | 0
...ult.xml => x86_64-host+guest,models-result.xml} | 0
...est-result.xml => x86_64-host+guest-result.xml} | 0
.../{x86-host+guest.xml => x86_64-host+guest.xml} | 0
... x86_64-host+host+host-model,models-result.xml} | 0
...k.xml => x86_64-host+host-model-nofallback.xml} | 0
...t+host-model.xml => x86_64-host+host-model.xml} | 0
...l => x86_64-host+host-passthrough-features.xml} | 0
...hrough.xml => x86_64-host+host-passthrough.xml} | 0
.../{x86-host+min.xml => x86_64-host+min.xml} | 0
...ult.xml => x86_64-host+penryn-force-result.xml} | 0
...-host+pentium3.xml => x86_64-host+pentium3.xml} | 0
...l => x86_64-host+strict-force-extra-result.xml} | 0
...-host-Haswell-noTSX+Haswell,haswell-result.xml} | 0
...Haswell-noTSX+Haswell-noTSX,haswell-result.xml} | 0
...64-host-Haswell-noTSX+Haswell-noTSX-result.xml} | 0
...ell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} | 0
...SandyBridge.xml => x86_64-host-SandyBridge.xml} | 0
...-host-amd-fake.xml => x86_64-host-amd-fake.xml} | 0
.../{x86-host-amd.xml => x86_64-host-amd.xml} | 0
....xml => x86_64-host-better+pentium3-result.xml} | 0
...{x86-host-better.xml => x86_64-host-better.xml} | 0
...incomp-arch.xml => x86_64-host-incomp-arch.xml} | 0
...model.xml => x86_64-host-invtsc+host-model.xml} | 0
...{x86-host-invtsc.xml => x86_64-host-invtsc.xml} | 0
...llback.xml => x86_64-host-model-nofallback.xml} | 0
.../{x86-host-model.xml => x86_64-host-model.xml} | 0
...ost-no-vendor.xml => x86_64-host-no-vendor.xml} | 0
...es.xml => x86_64-host-passthrough-features.xml} | 0
...passthrough.xml => x86_64-host-passthrough.xml} | 0
...sult.xml => x86_64-host-worse+guest-result.xml} | 0
.../{x86-host-worse.xml => x86_64-host-worse.xml} | 0
.../cputestdata/{x86-host.xml => x86_64-host.xml} | 0
tests/cputestdata/{x86-min.xml => x86_64-min.xml} | 0
...86-penryn-force.xml => x86_64-penryn-force.xml} | 0
...86-pentium3-amd.xml => x86_64-pentium3-amd.xml} | 0
.../{x86-pentium3.xml => x86_64-pentium3.xml} | 0
...trict-disable.xml => x86_64-strict-disable.xml} | 0
...rce-extra.xml => x86_64-strict-force-extra.xml} | 0
...{x86-strict-full.xml => x86_64-strict-full.xml} | 0
.../{x86-strict.xml => x86_64-strict.xml} | 0
tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 2 +-
.../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 145 +
tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 124 +
tests/domaincapstest.c | 8 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 8 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 32 +-
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 15365 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 763 +
tests/qemucapabilitiestest.c | 1 +
tests/qemumonitorjsontest.c | 4 +-
tests/qemuxml2argvtest.c | 3 +-
268 files changed, 21475 insertions(+), 2061 deletions(-)
create mode 100755 tests/cputestdata/cpu-convert.py
delete mode 100644 tests/cputestdata/x86-cpuid-A10-5800K.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-2500.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-2540M.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-4670T.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i5-6600.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-2600.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3740QM.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-4600U.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-5600U-json.xml
delete mode 100644 tests/cputestdata/x86-cpuid-Core-i7-5600U.json
delete mode 100644 tests/cputestdata/x86-cpuid-Core2-E6850.json
delete mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350.json
delete mode 100644 tests/cputestdata/x86-cpuid-Opteron-6234.json
delete mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95.json
delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E3-1245.json
delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E5-2630.json
delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E5-2650.json
delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-E7-4820.json
delete mode 100644 tests/cputestdata/x86-cpuid-Xeon-W3520.json
rename tests/cputestdata/{x86-Haswell-noTSX-nofallback.xml => x86_64-Haswell-noTSX-nofallback.xml} (100%)
rename tests/cputestdata/{x86-Haswell-noTSX.xml => x86_64-Haswell-noTSX.xml} (100%)
rename tests/cputestdata/{x86-Haswell.xml => x86_64-Haswell.xml} (100%)
rename tests/cputestdata/{x86-baseline-1-result.xml => x86_64-baseline-1-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-1.xml => x86_64-baseline-1.xml} (100%)
rename tests/cputestdata/{x86-baseline-2-result.xml => x86_64-baseline-2-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-2.xml => x86_64-baseline-2.xml} (100%)
rename tests/cputestdata/{x86-baseline-3-expanded.xml => x86_64-baseline-3-expanded.xml} (100%)
rename tests/cputestdata/{x86-baseline-3-result.xml => x86_64-baseline-3-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-3.xml => x86_64-baseline-3.xml} (100%)
rename tests/cputestdata/{x86-baseline-4-expanded.xml => x86_64-baseline-4-expanded.xml} (100%)
rename tests/cputestdata/{x86-baseline-4-result.xml => x86_64-baseline-4-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-4.xml => x86_64-baseline-4.xml} (100%)
rename tests/cputestdata/{x86-baseline-5-expanded.xml => x86_64-baseline-5-expanded.xml} (100%)
rename tests/cputestdata/{x86-baseline-5-result.xml => x86_64-baseline-5-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-5.xml => x86_64-baseline-5.xml} (100%)
rename tests/cputestdata/{x86-baseline-6-migratable.xml => x86_64-baseline-6-migratable.xml} (100%)
rename tests/cputestdata/{x86-baseline-6-result.xml => x86_64-baseline-6-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-6.xml => x86_64-baseline-6.xml} (100%)
rename tests/cputestdata/{x86-baseline-7-result.xml => x86_64-baseline-7-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-7.xml => x86_64-baseline-7.xml} (100%)
rename tests/cputestdata/{x86-baseline-8-result.xml => x86_64-baseline-8-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-8.xml => x86_64-baseline-8.xml} (100%)
rename tests/cputestdata/{x86-baseline-incompatible-vendors.xml => x86_64-baseline-incompatible-vendors.xml} (100%)
rename tests/cputestdata/{x86-baseline-no-vendor-result.xml => x86_64-baseline-no-vendor-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-no-vendor.xml => x86_64-baseline-no-vendor.xml} (100%)
rename tests/cputestdata/{x86-baseline-some-vendors-result.xml => x86_64-baseline-some-vendors-result.xml} (100%)
rename tests/cputestdata/{x86-baseline-some-vendors.xml => x86_64-baseline-some-vendors.xml} (100%)
rename tests/cputestdata/{x86-bogus-feature.xml => x86_64-bogus-feature.xml} (100%)
rename tests/cputestdata/{x86-bogus-model.xml => x86_64-bogus-model.xml} (100%)
rename tests/cputestdata/{x86-bogus-vendor.xml => x86_64-bogus-vendor.xml} (100%)
rename tests/cputestdata/{x86-cpuid-A10-5800K-guest.xml => x86_64-cpuid-A10-5800K-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-A10-5800K-host.xml => x86_64-cpuid-A10-5800K-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-A10-5800K-json.xml => x86_64-cpuid-A10-5800K-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-A10-5800K.json
rename tests/cputestdata/{x86-cpuid-A10-5800K.xml => x86_64-cpuid-A10-5800K.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-D510-guest.xml => x86_64-cpuid-Atom-D510-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-D510-host.xml => x86_64-cpuid-Atom-D510-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-D510.xml => x86_64-cpuid-Atom-D510.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-N450-guest.xml => x86_64-cpuid-Atom-N450-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-N450-host.xml => x86_64-cpuid-Atom-N450-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Atom-N450.xml => x86_64-cpuid-Atom-N450.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2500-guest.xml => x86_64-cpuid-Core-i5-2500-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2500-host.xml => x86_64-cpuid-Core-i5-2500-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2500-json.xml => x86_64-cpuid-Core-i5-2500-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2500.json
rename tests/cputestdata/{x86-cpuid-Core-i5-2500.xml => x86_64-cpuid-Core-i5-2500.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-guest.xml => x86_64-cpuid-Core-i5-2540M-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-host.xml => x86_64-cpuid-Core-i5-2540M-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-2540M-json.xml => x86_64-cpuid-Core-i5-2540M-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json
rename tests/cputestdata/{x86-cpuid-Core-i5-2540M.xml => x86_64-cpuid-Core-i5-2540M.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-guest.xml => x86_64-cpuid-Core-i5-4670T-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-host.xml => x86_64-cpuid-Core-i5-4670T-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-4670T-json.xml => x86_64-cpuid-Core-i5-4670T-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-4670T.json
rename tests/cputestdata/{x86-cpuid-Core-i5-4670T.xml => x86_64-cpuid-Core-i5-4670T.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-6600-guest.xml => x86_64-cpuid-Core-i5-6600-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-6600-host.xml => x86_64-cpuid-Core-i5-6600-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i5-6600-json.xml => x86_64-cpuid-Core-i5-6600-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i5-6600.json
rename tests/cputestdata/{x86-cpuid-Core-i5-6600.xml => x86_64-cpuid-Core-i5-6600.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-2600-guest.xml => x86_64-cpuid-Core-i7-2600-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-2600-host.xml => x86_64-cpuid-Core-i7-2600-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-2600-json.xml => x86_64-cpuid-Core-i7-2600-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600.json
rename tests/cputestdata/{x86-cpuid-Core-i7-2600.xml => x86_64-cpuid-Core-i7-2600.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-guest.xml => x86_64-cpuid-Core-i7-3520M-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3520M-host.xml => x86_64-cpuid-Core-i7-3520M-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3520M.xml => x86_64-cpuid-Core-i7-3520M.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-guest.xml => x86_64-cpuid-Core-i7-3740QM-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-host.xml => x86_64-cpuid-Core-i7-3740QM-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM-json.xml => x86_64-cpuid-Core-i7-3740QM-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3740QM.json
rename tests/cputestdata/{x86-cpuid-Core-i7-3740QM.xml => x86_64-cpuid-Core-i7-3740QM.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3770-guest.xml => x86_64-cpuid-Core-i7-3770-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3770-host.xml => x86_64-cpuid-Core-i7-3770-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-3770-json.xml => x86_64-cpuid-Core-i7-3770-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-3770.json
rename tests/cputestdata/{x86-cpuid-Core-i7-3770.xml => x86_64-cpuid-Core-i7-3770.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-guest.xml => x86_64-cpuid-Core-i7-4600U-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-host.xml => x86_64-cpuid-Core-i7-4600U-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-4600U-json.xml => x86_64-cpuid-Core-i7-4600U-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-4600U.json
rename tests/cputestdata/{x86-cpuid-Core-i7-4600U.xml => x86_64-cpuid-Core-i7-4600U.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-guest.xml => x86_64-cpuid-Core-i7-5600U-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core-i7-5600U-host.xml => x86_64-cpuid-Core-i7-5600U-host.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-5600U.json
rename tests/cputestdata/{x86-cpuid-Core-i7-5600U.xml => x86_64-cpuid-Core-i7-5600U.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-E6850-guest.xml => x86_64-cpuid-Core2-E6850-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-E6850-host.xml => x86_64-cpuid-Core2-E6850-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-E6850-json.xml => x86_64-cpuid-Core2-E6850-json.xml} (79%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Core2-E6850.json
rename tests/cputestdata/{x86-cpuid-Core2-E6850.xml => x86_64-cpuid-Core2-E6850.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-Q9500-guest.xml => x86_64-cpuid-Core2-Q9500-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-Q9500-host.xml => x86_64-cpuid-Core2-Q9500-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Core2-Q9500.xml => x86_64-cpuid-Core2-Q9500.xml} (100%)
rename tests/cputestdata/{x86-cpuid-FX-8150-guest.xml => x86_64-cpuid-FX-8150-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-FX-8150-host.xml => x86_64-cpuid-FX-8150-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-FX-8150.xml => x86_64-cpuid-FX-8150.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-1352-guest.xml => x86_64-cpuid-Opteron-1352-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-1352-host.xml => x86_64-cpuid-Opteron-1352-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-1352.xml => x86_64-cpuid-Opteron-1352.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-2350-guest.xml => x86_64-cpuid-Opteron-2350-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-2350-host.xml => x86_64-cpuid-Opteron-2350-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-2350-json.xml => x86_64-cpuid-Opteron-2350-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-2350.json
rename tests/cputestdata/{x86-cpuid-Opteron-2350.xml => x86_64-cpuid-Opteron-2350.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6234-guest.xml => x86_64-cpuid-Opteron-6234-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6234-host.xml => x86_64-cpuid-Opteron-6234-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6234-json.xml => x86_64-cpuid-Opteron-6234-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Opteron-6234.json
rename tests/cputestdata/{x86-cpuid-Opteron-6234.xml => x86_64-cpuid-Opteron-6234.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6282-guest.xml => x86_64-cpuid-Opteron-6282-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6282-host.xml => x86_64-cpuid-Opteron-6282-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Opteron-6282.xml => x86_64-cpuid-Opteron-6282.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Pentium-P6100-guest.xml => x86_64-cpuid-Pentium-P6100-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Pentium-P6100-host.xml => x86_64-cpuid-Pentium-P6100-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Pentium-P6100.xml => x86_64-cpuid-Pentium-P6100.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Phenom-B95-guest.xml => x86_64-cpuid-Phenom-B95-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Phenom-B95-host.xml => x86_64-cpuid-Phenom-B95-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Phenom-B95-json.xml => x86_64-cpuid-Phenom-B95-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Phenom-B95.json
rename tests/cputestdata/{x86-cpuid-Phenom-B95.xml => x86_64-cpuid-Phenom-B95.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-5110-guest.xml => x86_64-cpuid-Xeon-5110-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-5110-host.xml => x86_64-cpuid-Xeon-5110-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-5110.xml => x86_64-cpuid-Xeon-5110.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-guest.xml => x86_64-cpuid-Xeon-E3-1245-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-host.xml => x86_64-cpuid-Xeon-E3-1245-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245-json.xml => x86_64-cpuid-Xeon-E3-1245-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json
rename tests/cputestdata/{x86-cpuid-Xeon-E3-1245.xml => x86_64-cpuid-Xeon-E3-1245.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-guest.xml => x86_64-cpuid-Xeon-E5-2630-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-host.xml => x86_64-cpuid-Xeon-E5-2630-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630-json.xml => x86_64-cpuid-Xeon-E5-2630-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2630.json
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2630.xml => x86_64-cpuid-Xeon-E5-2630.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-guest.xml => x86_64-cpuid-Xeon-E5-2650-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-host.xml => x86_64-cpuid-Xeon-E5-2650-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650-json.xml => x86_64-cpuid-Xeon-E5-2650-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E5-2650.json
rename tests/cputestdata/{x86-cpuid-Xeon-E5-2650.xml => x86_64-cpuid-Xeon-E5-2650.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-guest.xml => x86_64-cpuid-Xeon-E7-4820-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-host.xml => x86_64-cpuid-Xeon-E7-4820-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820-json.xml => x86_64-cpuid-Xeon-E7-4820-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4820.json
rename tests/cputestdata/{x86-cpuid-Xeon-E7-4820.xml => x86_64-cpuid-Xeon-E7-4820.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-W3520-guest.xml => x86_64-cpuid-Xeon-W3520-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-W3520-host.xml => x86_64-cpuid-Xeon-W3520-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-W3520-json.xml => x86_64-cpuid-Xeon-W3520-json.xml} (100%)
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-W3520.json
rename tests/cputestdata/{x86-cpuid-Xeon-W3520.xml => x86_64-cpuid-Xeon-W3520.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-X5460-guest.xml => x86_64-cpuid-Xeon-X5460-guest.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-X5460-host.xml => x86_64-cpuid-Xeon-X5460-host.xml} (100%)
rename tests/cputestdata/{x86-cpuid-Xeon-X5460.xml => x86_64-cpuid-Xeon-X5460.xml} (100%)
rename tests/cputestdata/{x86-exact-disable-extra.xml => x86_64-exact-disable-extra.xml} (100%)
rename tests/cputestdata/{x86-exact-disable.xml => x86_64-exact-disable.xml} (100%)
rename tests/cputestdata/{x86-exact-disable2.xml => x86_64-exact-disable2.xml} (100%)
rename tests/cputestdata/{x86-exact-forbid-extra.xml => x86_64-exact-forbid-extra.xml} (100%)
rename tests/cputestdata/{x86-exact-forbid.xml => x86_64-exact-forbid.xml} (100%)
rename tests/cputestdata/{x86-exact-force-Haswell.xml => x86_64-exact-force-Haswell.xml} (100%)
rename tests/cputestdata/{x86-exact-force.xml => x86_64-exact-force.xml} (100%)
rename tests/cputestdata/{x86-exact-require-extra.xml => x86_64-exact-require-extra.xml} (100%)
rename tests/cputestdata/{x86-exact-require.xml => x86_64-exact-require.xml} (100%)
rename tests/cputestdata/{x86-exact.xml => x86_64-exact.xml} (100%)
rename tests/cputestdata/{x86-guest-nofallback.xml => x86_64-guest-nofallback.xml} (100%)
rename tests/cputestdata/{x86-guest.xml => x86_64-guest.xml} (100%)
rename tests/cputestdata/{x86-host+guest,model486-result.xml => x86_64-host+guest,model486-result.xml} (100%)
rename tests/cputestdata/{x86-host+guest,models-result.xml => x86_64-host+guest,models-result.xml} (100%)
rename tests/cputestdata/{x86-host+guest-result.xml => x86_64-host+guest-result.xml} (100%)
rename tests/cputestdata/{x86-host+guest.xml => x86_64-host+guest.xml} (100%)
rename tests/cputestdata/{x86-host+host+host-model,models-result.xml => x86_64-host+host+host-model,models-result.xml} (100%)
rename tests/cputestdata/{x86-host+host-model-nofallback.xml => x86_64-host+host-model-nofallback.xml} (100%)
rename tests/cputestdata/{x86-host+host-model.xml => x86_64-host+host-model.xml} (100%)
rename tests/cputestdata/{x86-host+host-passthrough-features.xml => x86_64-host+host-passthrough-features.xml} (100%)
rename tests/cputestdata/{x86-host+host-passthrough.xml => x86_64-host+host-passthrough.xml} (100%)
rename tests/cputestdata/{x86-host+min.xml => x86_64-host+min.xml} (100%)
rename tests/cputestdata/{x86-host+penryn-force-result.xml => x86_64-host+penryn-force-result.xml} (100%)
rename tests/cputestdata/{x86-host+pentium3.xml => x86_64-host+pentium3.xml} (100%)
rename tests/cputestdata/{x86-host+strict-force-extra-result.xml => x86_64-host+strict-force-extra-result.xml} (100%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml} (100%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml} (100%)
rename tests/cputestdata/{x86-host-Haswell-noTSX+Haswell-noTSX-result.xml => x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml} (100%)
rename tests/cputestdata/{x86-host-Haswell-noTSX.xml => x86_64-host-Haswell-noTSX.xml} (100%)
rename tests/cputestdata/{x86-host-SandyBridge.xml => x86_64-host-SandyBridge.xml} (100%)
rename tests/cputestdata/{x86-host-amd-fake.xml => x86_64-host-amd-fake.xml} (100%)
rename tests/cputestdata/{x86-host-amd.xml => x86_64-host-amd.xml} (100%)
rename tests/cputestdata/{x86-host-better+pentium3-result.xml => x86_64-host-better+pentium3-result.xml} (100%)
rename tests/cputestdata/{x86-host-better.xml => x86_64-host-better.xml} (100%)
rename tests/cputestdata/{x86-host-incomp-arch.xml => x86_64-host-incomp-arch.xml} (100%)
rename tests/cputestdata/{x86-host-invtsc+host-model.xml => x86_64-host-invtsc+host-model.xml} (100%)
rename tests/cputestdata/{x86-host-invtsc.xml => x86_64-host-invtsc.xml} (100%)
rename tests/cputestdata/{x86-host-model-nofallback.xml => x86_64-host-model-nofallback.xml} (100%)
rename tests/cputestdata/{x86-host-model.xml => x86_64-host-model.xml} (100%)
rename tests/cputestdata/{x86-host-no-vendor.xml => x86_64-host-no-vendor.xml} (100%)
rename tests/cputestdata/{x86-host-passthrough-features.xml => x86_64-host-passthrough-features.xml} (100%)
rename tests/cputestdata/{x86-host-passthrough.xml => x86_64-host-passthrough.xml} (100%)
rename tests/cputestdata/{x86-host-worse+guest-result.xml => x86_64-host-worse+guest-result.xml} (100%)
rename tests/cputestdata/{x86-host-worse.xml => x86_64-host-worse.xml} (100%)
rename tests/cputestdata/{x86-host.xml => x86_64-host.xml} (100%)
rename tests/cputestdata/{x86-min.xml => x86_64-min.xml} (100%)
rename tests/cputestdata/{x86-penryn-force.xml => x86_64-penryn-force.xml} (100%)
rename tests/cputestdata/{x86-pentium3-amd.xml => x86_64-pentium3-amd.xml} (100%)
rename tests/cputestdata/{x86-pentium3.xml => x86_64-pentium3.xml} (100%)
rename tests/cputestdata/{x86-strict-disable.xml => x86_64-strict-disable.xml} (100%)
rename tests/cputestdata/{x86-strict-force-extra.xml => x86_64-strict-force-extra.xml} (100%)
rename tests/cputestdata/{x86-strict-full.xml => x86_64-strict-full.xml} (100%)
rename tests/cputestdata/{x86-strict.xml => x86_64-strict.xml} (100%)
create mode 100644 tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
create mode 100644 tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
--
2.11.1
7 years, 10 months
[libvirt] [PATCH] qemu_conf: Check for namespaces availability more wisely
by Michal Privoznik
The bare fact that mnt namespace is available is not enough for
us to allow/enable qemu namespaces feature. There are other
requirements: we must copy all the ACL & SELinux labels otherwise
we might grant access that is administratively forbidden or vice
versa.
At the same time, the check for namespace prerequisites is moved
from domain startup time to qemu.conf parser as it doesn't make
much sense to allow users to start misconfigured libvirt just to
find out they can't start a single domain.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_conf.c | 20 ++++++++++++++++----
src/qemu/qemu_conf.h | 3 ++-
src/qemu/qemu_domain.c | 43 ++++++++++++++++++++++++++++---------------
src/qemu/qemu_domain.h | 2 ++
src/qemu/qemu_driver.c | 2 +-
5 files changed, 49 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 0223a95d2..ad482d0ee 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -321,12 +321,10 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST)))
goto error;
-#if defined(__linux__)
if (privileged &&
- virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 &&
+ qemuDomainNamespaceAvailable(QEMU_DOMAIN_NS_MOUNT) &&
virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0)
goto error;
-#endif /* defined(__linux__) */
#ifdef DEFAULT_LOADER_NVRAM
if (virFirmwareParseList(DEFAULT_LOADER_NVRAM,
@@ -438,7 +436,8 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
- const char *filename)
+ const char *filename,
+ bool privileged)
{
virConfPtr conf = NULL;
int ret = -1;
@@ -832,6 +831,19 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
goto cleanup;
}
+ if (!privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("cannot use namespaces in session mode"));
+ goto cleanup;
+ }
+
+ if (qemuDomainNamespaceAvailable(ns) < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("%s namespace is not available"),
+ namespaces[i]);
+ goto cleanup;
+ }
+
if (virBitmapSetBit(cfg->namespaces, ns) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to enable namespace: %s"),
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 91904ed4f..e585f81af 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -294,7 +294,8 @@ void qemuDomainCmdlineDefFree(qemuDomainCmdlineDefPtr def);
virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged);
int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
- const char *filename);
+ const char *filename,
+ bool privileged);
virQEMUDriverConfigPtr virQEMUDriverGetConfig(virQEMUDriverPtr driver);
bool virQEMUDriverIsPrivileged(virQEMUDriverPtr driver);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3adec5c14..c3dcea0c4 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7643,21 +7643,8 @@ qemuDomainCreateNamespace(virQEMUDriverPtr driver,
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
int ret = -1;
- if (!virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT)) {
- ret = 0;
- goto cleanup;
- }
-
- if (!virQEMUDriverIsPrivileged(driver)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("cannot use namespaces in session mode"));
- goto cleanup;
- }
-
- if (virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) < 0)
- goto cleanup;
-
- if (qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0)
+ if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) &&
+ qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0)
goto cleanup;
ret = 0;
@@ -7667,6 +7654,32 @@ qemuDomainCreateNamespace(virQEMUDriverPtr driver,
}
+bool
+qemuDomainNamespaceAvailable(qemuDomainNamespace ns)
+{
+
+ switch (ns) {
+ case QEMU_DOMAIN_NS_MOUNT:
+#if !defined(__linux__)
+ /* Namespaces are Linux specific. */
+ return false;
+#endif
+#if !defined(HAVE_SYS_ACL_H) || !defined(WITH_SELINUX)
+ /* We can't create the exact copy of paths if either of
+ * these is not available. */
+ return false;
+#endif
+ if (virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) < 0)
+ return false;
+ break;
+ case QEMU_DOMAIN_NS_LAST:
+ break;
+ }
+
+ return true;
+}
+
+
struct qemuDomainAttachDeviceMknodData {
virQEMUDriverPtr driver;
virDomainObjPtr vm;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 5cfa3e114..524a6729c 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -808,6 +808,8 @@ int qemuDomainBuildNamespace(virQEMUDriverPtr driver,
int qemuDomainCreateNamespace(virQEMUDriverPtr driver,
virDomainObjPtr vm);
+bool qemuDomainNamespaceAvailable(qemuDomainNamespace ns);
+
int qemuDomainNamespaceSetupDisk(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virStorageSourcePtr src);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 89bc833de..afbcded93 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -676,7 +676,7 @@ qemuStateInitialize(bool privileged,
if (virAsprintf(&driverConf, "%s/qemu.conf", cfg->configBaseDir) < 0)
goto error;
- if (virQEMUDriverConfigLoadFile(cfg, driverConf) < 0)
+ if (virQEMUDriverConfigLoadFile(cfg, driverConf, privileged) < 0)
goto error;
VIR_FREE(driverConf);
--
2.11.0
7 years, 10 months
[libvirt] [v4 0/9] Support cache tune in libvirt
by Eli Qiao
Addressed comment from v3 -> v4:
Daniel & Marcelo:
* Added concurrence support
Addressed comment from v2 -> v3:
Daniel:
* Fixed coding style, passed `make check` and `make syntax-check`
* Variables renaming and move from header file to c file.
* For locking/mutex support, no progress.
There are some discussion from mailing list, but I can not find a better
way to add locking support without performance impact.
I'll explain the process and please help to advice what shoud we do.
VM create:
1) Get the cache left value on each bank of the host. This should be
shared amount all VMs.
2) Calculate the schemata on the bank based on all created resctrl
domain's schemata
3) Calculate the default schemata by scaning all domain's schemata.
4) Flush default schemata to /sys/fs/resctrl/schemata
VM destroy:
1) Remove the resctrl domain of that VM
2) Recalculate default schemata
3) Flush default schemata to /sys/fs/resctrl/schemata
The key point is that all VMs shares /sys/fs/resctrl/schemata, and
when a VM create a resctrl domain, the schemata of that VM depends on
the default schemata and all other exsited schematas. So a global
mutex is reqired.
Before calculate a schemata or update default schemata, libvirt
should gain this global mutex.
I will try to think more about how to support this gracefully in next
patch set.
Marcelo:
* Added vcpu support for cachetune, this will allow user to define which
vcpu using which cache allocation bank.
<cachetune id='0' host_id=0 size='3072' unit='KiB' vcpus='0,1'/>
vcpus is a cpumap, the vcpu pids will be added to tasks file
* Added cdp compatible, user can specify l3 cache even host enable cdp.
See patch 8.
On a cdp enabled host, specify l3code/l3data by
<cachetune id='0' host_id='0' type='l3' size='3072' unit='KiB'/>
This will create a schemata like:
L3data:0=0xff00;...
L3code:0=0xff00;...
* Would you please help to test if the functions work.
Martin:
* Xml test case, I have no time to work on this yet, would you please
show me an example, would like to amend it later.
This series patches are for supportting CAT featues, which also
called cache tune in libvirt.
First to expose cache information which could be tuned in capabilites XML.
Then add new domain xml element support to add cacahe bank which will apply
on this libvirt domain.
This series patches add a util file `resctrl.c/h`, an interface to talk with
linux kernel's system fs.
There are still one TODO left:
1. Expose a new public interface to get free cache information.
Some discussion about this feature support can be found from:
https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html
Eli Qiao (9):
Resctrl: Add some utils functions
Resctrl: expose cache information to capabilities
Resctrl: Add new xml element to support cache tune
Resctrl: Add private interface to set cachebanks
Qemu: Set cache banks
Resctrl: enable l3code/l3data
Resctrl: Make sure l3data/l3code are pairs
Resctrl: Compatible mode for cdp enabled
Resctrl: concurrence support
docs/schemas/domaincommon.rng | 46 ++
include/libvirt/virterror.h | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/capabilities.c | 56 ++
src/conf/capabilities.h | 23 +
src/conf/domain_conf.c | 182 +++++++
src/conf/domain_conf.h | 19 +
src/libvirt_private.syms | 11 +
src/nodeinfo.c | 64 +++
src/nodeinfo.h | 1 +
src/qemu/qemu_capabilities.c | 8 +
src/qemu/qemu_driver.c | 6 +
src/qemu/qemu_process.c | 53 ++
src/util/virerror.c | 1 +
src/util/virresctrl.c | 1156 +++++++++++++++++++++++++++++++++++++++++
src/util/virresctrl.h | 88 ++++
17 files changed, 1717 insertions(+)
create mode 100644 src/util/virresctrl.c
create mode 100644 src/util/virresctrl.h
--
1.9.1
7 years, 10 months
[libvirt] [PATCH go v2] domain.go: construct cpumaps correctly for CPU pinning verbs
by Leonid Podolny
In PinEmulator() and PinIOThread() there is an identical code that
converts []bool into a bitmask. It calculates the location in the
bitmask and then sets it always to 1, instead of looking at the
actual bool value.
---
domain.go | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/domain.go b/domain.go
index 5482f1a..9ee908b 100644
--- a/domain.go
+++ b/domain.go
@@ -3967,10 +3967,12 @@ func (d *Domain) PinEmulator(cpumap []bool, flags DomainModificationImpact) erro
maplen := (len(cpumap) + 7) / 8
ccpumaps := make([]C.uchar, maplen)
for i := 0; i < len(cpumap); i++ {
- byte := i / 8
- bit := i % 8
+ if cpumap[i] {
+ byte := i / 8
+ bit := i % 8
- ccpumaps[byte] |= (1 << uint(bit))
+ ccpumaps[byte] |= (1 << uint(bit))
+ }
}
ret := C.virDomainPinEmulator(d.ptr, &ccpumaps[0], C.int(maplen), C.uint(flags))
@@ -3989,10 +3991,12 @@ func (d *Domain) PinIOThread(iothreadid uint, cpumap []bool, flags DomainModific
maplen := (len(cpumap) + 7) / 8
ccpumaps := make([]C.uchar, maplen)
for i := 0; i < len(cpumap); i++ {
- byte := i / 8
- bit := i % 8
+ if cpumap[i] {
+ byte := i / 8
+ bit := i % 8
- ccpumaps[byte] |= (1 << uint(bit))
+ ccpumaps[byte] |= (1 << uint(bit))
+ }
}
ret := C.virDomainPinIOThreadCompat(d.ptr, C.uint(iothreadid), &ccpumaps[0], C.int(maplen), C.uint(flags))
--
2.11.0
7 years, 10 months
[libvirt] [PATCH v2 0/3] libxl: tunnelled migration support
by Joao Martins
Hey!
Presented herewith is take 2 from tunnelled migration addressing all previous
comments. Changelog in individual patches (patch 1 and 2 are small refactorings
suggested in v1) Despite being functional changes mostly I had a quick round of
testing too.
Thanks,
Joao
Bob Liu (1):
libxl: add tunnelled migration support
Joao Martins (2):
libxl: refactor libxlDomainMigrationPrepare
libxl: streamline top-level migrate functions
src/libxl/libxl_driver.c | 79 ++++++++--
src/libxl/libxl_migration.c | 372 +++++++++++++++++++++++++++++++++++++-------
src/libxl/libxl_migration.h | 9 ++
3 files changed, 393 insertions(+), 67 deletions(-)
--
2.1.4
7 years, 10 months
[libvirt] [PATCH go] domain.go: construct cpumaps correctly for CPU pinning verbs
by Leonid Podolny
In PinVcpu(), PinVcpuFlags(), PinEmulator() and PinIOThread() there is
an almost identical code that converts []bool into a bitmask. It
calculates the location in the bitmask and then sets it always to 1,
instead of looking at the actual bool value.
---
domain.go | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/domain.go b/domain.go
index 5482f1a..9a24bc5 100644
--- a/domain.go
+++ b/domain.go
@@ -1750,7 +1750,9 @@ func (d *Domain) PinVcpu(vcpu uint, cpuMap []bool) error {
if cpuMap[i] {
byte := i / 8
bit := i % 8
- ccpumap[byte] |= (1 << uint(bit))
+ if cpuMap[i] {
+ ccpumap[byte] |= (1 << uint(bit))
+ }
}
}
@@ -1770,7 +1772,9 @@ func (d *Domain) PinVcpuFlags(vcpu uint, cpuMap []bool, flags DomainModification
if cpuMap[i] {
byte := (i + 7) / 8
bit := i % 8
- ccpumap[byte] |= (1 << uint(bit))
+ if cpuMap[i] {
+ ccpumap[byte] |= (1 << uint(bit))
+ }
}
}
@@ -3970,7 +3974,9 @@ func (d *Domain) PinEmulator(cpumap []bool, flags DomainModificationImpact) erro
byte := i / 8
bit := i % 8
- ccpumaps[byte] |= (1 << uint(bit))
+ if cpumap[i] {
+ ccpumaps[byte] |= (1 << uint(bit))
+ }
}
ret := C.virDomainPinEmulator(d.ptr, &ccpumaps[0], C.int(maplen), C.uint(flags))
@@ -3992,7 +3998,9 @@ func (d *Domain) PinIOThread(iothreadid uint, cpumap []bool, flags DomainModific
byte := i / 8
bit := i % 8
- ccpumaps[byte] |= (1 << uint(bit))
+ if cpumap[i] {
+ ccpumaps[byte] |= (1 << uint(bit))
+ }
}
ret := C.virDomainPinIOThreadCompat(d.ptr, C.uint(iothreadid), &ccpumaps[0], C.int(maplen), C.uint(flags))
--
2.11.0
7 years, 10 months
[libvirt] [PATCH 0/4] Fix private /dev file access issues
by Andrea Bolognani
Several heads were banged against several walls while trying
to figure this out. No animals were harmed in the writing of
this series, though.
Andrea Bolognani (4):
configure: Move ACL checks to a separate file
configure: Make ACL mandatory when building the QEMU driver
spec: Require libacl and its headers
qemu: Call chmod() after mknod()
configure.ac | 12 +++---------
libvirt.spec.in | 4 ++++
m4/virt-acl.m4 | 39 +++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_domain.c | 10 ++++++++++
4 files changed, 56 insertions(+), 9 deletions(-)
create mode 100644 m4/virt-acl.m4
--
2.7.4
7 years, 10 months
[libvirt] [v5 0/9] Support cache tune in libvirt
by Eli Qiao
Addressed comment from v4 -> v5:
Marcelo:
* Several typos
* Use flock instead of virFileLock
Addressed comment from v3 -> v4:
Daniel & Marcelo:
* Added concurrence support
Addressed comment from v2 -> v3:
Daniel:
* Fixed coding style, passed `make check` and `make syntax-check`
* Variables renaming and move from header file to c file.
* For locking/mutex support, no progress.
There are some discussion from mailing list, but I can not find a better
way to add locking support without performance impact.
I'll explain the process and please help to advice what shoud we do.
VM create:
1) Get the cache left value on each bank of the host. This should be
shared amount all VMs.
2) Calculate the schemata on the bank based on all created resctrl
domain's schemata
3) Calculate the default schemata by scaning all domain's schemata.
4) Flush default schemata to /sys/fs/resctrl/schemata
VM destroy:
1) Remove the resctrl domain of that VM
2) Recalculate default schemata
3) Flush default schemata to /sys/fs/resctrl/schemata
The key point is that all VMs shares /sys/fs/resctrl/schemata, and
when a VM create a resctrl domain, the schemata of that VM depends on
the default schemata and all other exsited schematas. So a global
mutex is reqired.
Before calculate a schemata or update default schemata, libvirt
should gain this global mutex.
I will try to think more about how to support this gracefully in next
patch set.
Marcelo:
* Added vcpu support for cachetune, this will allow user to define which
vcpu using which cache allocation bank.
<cachetune id='0' host_id=0 size='3072' unit='KiB' vcpus='0,1'/>
vcpus is a cpumap, the vcpu pids will be added to tasks file
* Added cdp compatible, user can specify l3 cache even host enable cdp.
See patch 8.
On a cdp enabled host, specify l3code/l3data by
<cachetune id='0' host_id='0' type='l3' size='3072' unit='KiB'/>
This will create a schemata like:
L3data:0=0xff00;...
L3code:0=0xff00;...
* Would you please help to test if the functions work.
Martin:
* Xml test case, I have no time to work on this yet, would you please
show me an example, would like to amend it later.
This series patches are for supportting CAT featues, which also
called cache tune in libvirt.
First to expose cache information which could be tuned in capabilites XML.
Then add new domain xml element support to add cacahe bank which will apply
on this libvirt domain.
This series patches add a util file `resctrl.c/h`, an interface to talk with
linux kernel's system fs.
There are still one TODO left:
1. Expose a new public interface to get free cache information.
2. Expose a new public interface to set cachetune lively.
Some discussion about this feature support can be found from:
https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html
Eli Qiao (9):
Resctrl: Add some utils functions
Resctrl: expose cache information to capabilities
Resctrl: Add new xml element to support cache tune
Resctrl: Add private interface to set cachebanks
Qemu: Set cache banks
Resctrl: enable l3code/l3data
Resctrl: Make sure l3data/l3code are pairs
Resctrl: Compatible mode for cdp enabled
Resctrl: concurrence support
docs/schemas/domaincommon.rng | 46 ++
include/libvirt/virterror.h | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/capabilities.c | 56 ++
src/conf/capabilities.h | 23 +
src/conf/domain_conf.c | 182 +++++++
src/conf/domain_conf.h | 19 +
src/libvirt_private.syms | 11 +
src/nodeinfo.c | 64 +++
src/nodeinfo.h | 1 +
src/qemu/qemu_capabilities.c | 8 +
src/qemu/qemu_driver.c | 6 +
src/qemu/qemu_process.c | 53 ++
src/util/virerror.c | 1 +
src/util/virresctrl.c | 1157 +++++++++++++++++++++++++++++++++++++++++
src/util/virresctrl.h | 88 ++++
17 files changed, 1718 insertions(+)
create mode 100644 src/util/virresctrl.c
create mode 100644 src/util/virresctrl.h
--
1.9.1
7 years, 10 months
[libvirt] [PATCH] Ensure disk names follow the disk name regex
by Nitesh Konkar
Currently disk names do not follow the
(regex) /^[fhv]d[a-z]+[0-9]*$/ completely
and hence one can assign disk names like
vd2 etc. This patch ensures that the
disk names follow the regex mentioned.
Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
src/util/virutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 91178d1..2796671 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -563,7 +563,7 @@ int virDiskNameParse(const char *name, int *disk, int *partition)
}
}
- if (!ptr)
+ if (!ptr || !c_islower(*ptr))
return -1;
for (i = 0; *ptr; i++) {
--
2.1.0
7 years, 10 months
[libvirt] [PATCHv2] util: fix off-by-one when expanding a bitmap
by Ján Tomko
To make sure bit 'b' fits into the bitmap, we need to allocate b+1
bits, since we number from 0.
Adjust the bitmap test to set a bit at a multiple of 16.
That way the test fails without this fix, because the VIR_REALLOC
call clears the newly added memory even if the original pointer
has not changed.
---
src/util/virbitmap.c | 2 +-
tests/virbitmaptest.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
v2: use a multiple of 16 instead of just 8 to actually reproduce
the failure in the test.
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 0c04f1a..1b47d74 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -187,7 +187,7 @@ int virBitmapSetBit(virBitmapPtr bitmap, size_t b)
*/
static int virBitmapExpand(virBitmapPtr map, size_t b)
{
- size_t new_len = VIR_DIV_UP(b, VIR_BITMAP_BITS_PER_UNIT);
+ size_t new_len = VIR_DIV_UP(b + 1, VIR_BITMAP_BITS_PER_UNIT);
/* resize the memory if necessary */
if (map->map_len < new_len) {
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index a17ef82..3ee07ff 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -639,15 +639,15 @@ test12(const void *opaque ATTRIBUTE_UNUSED)
TEST_MAP(0, "");
- if (virBitmapSetBitExpand(map, 100) < 0)
+ if (virBitmapSetBitExpand(map, 128) < 0)
goto cleanup;
- TEST_MAP(101, "100");
+ TEST_MAP(129, "128");
if (virBitmapClearBitExpand(map, 150) < 0)
goto cleanup;
- TEST_MAP(151, "100");
+ TEST_MAP(151, "128");
virBitmapFree(map);
if (virBitmapParseUnlimited("34,1023", &map) < 0)
--
2.10.2
7 years, 10 months