[libvirt] [PATCH 0/3] qemu: support disabling/enabling kvmclock with <timer> elements

Paolo Bonzini pbonzini at redhat.com
Mon Jan 23 13:11:07 UTC 2012


QEMU supports a bunch of CPUID features that are tied to the kvm CPUID
nodes rather than the processor's.  They are "kvmclock", "kvm_nopiodelay",
"kvm_mmu", "kvm_asyncpf".  These are not known to libvirt and their
CPUID leaf might move if (for example) the Hyper-V extensions are enabled.
Hence their handling would anyway require some special-casing.

However, among these the most useful is kvmclock; an additional
"property" of this feature is that a <timer> element is a better model
than a CPUID feature.

This is what this series does.  Patch 1 tweaks the -cpu parsing code so
that it detects the "default" CPU names and (instead of creating a <cpu>
element) sets the guest arch to either i686 or x86_64; this is useful and
helped writing testcases.  The next two patches add the new feature.
Finally, patch 4 tweaks the default CPU model to be more precise when
KVM is enabled.

Paolo Bonzini (4):
  qemu: get arch name from <cpu> element
  conf: add kvmclock timer
  qemu: parse and create -cpu ...,-kvmclock
  qemu: default to kvm32/kvm64 when KVM is enabled

 docs/formatdomain.html.in                          |    4 +-
 docs/schemas/domaincommon.rng                      |    3 +-
 src/conf/domain_conf.c                             |    3 +-
 src/conf/domain_conf.h                             |    1 +
 src/qemu/qemu_command.c                            |  138 ++++++++++++++++----
 tests/qemuargv2xmltest.c                           |    4 +
 tests/qemuxml2argvdata/qemu-lib.sh                 |    1 +
 .../qemuxml2argv-cpu-host-kvmclock.args            |    4 +
 .../qemuxml2argv-cpu-host-kvmclock.xml             |   23 ++++
 .../qemuxml2argv-cpu-kvmclock.args                 |    4 +
 .../qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml |   24 ++++
 tests/qemuxml2argvdata/qemuxml2argv-kvmclock.args  |    4 +
 tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml   |   21 +++
 tests/qemuxml2argvtest.c                           |    3 +
 tests/qemuxml2xmltest.c                            |    3 +
 15 files changed, 209 insertions(+), 31 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvmclock.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml

-- 
1.7.7.1




More information about the libvir-list mailing list