Richard W.M. Jones
2014-Jan-23 13:31 UTC
[Libguestfs] [PATCH] launch: direct: Stop using deprecated -no-kvm-pit-reinjection if qemu is new enough (RHBZ#1053847).
--- src/launch-direct.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/launch-direct.c b/src/launch-direct.c index 6eaee63..c091732 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -491,7 +491,14 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) */ ADD_CMDLINE ("-no-hpet"); #endif - ADD_CMDLINE ("-no-kvm-pit-reinjection"); + if (data->qemu_version_major < 1 || + (data->qemu_version_major == 1 && data->qemu_version_minor <= 2)) + ADD_CMDLINE ("-no-kvm-pit-reinjection"); + else { + /* New non-deprecated way, added in qemu >= 1.3. */ + ADD_CMDLINE ("-global"); + ADD_CMDLINE ("kvm-pit.lost_tick_policy=discard"); + } ADD_CMDLINE ("-kernel"); ADD_CMDLINE (kernel); -- 1.8.4.2
Seemingly Similar Threads
- [PATCH 1/2] src: start unifying version handling
- [PATCH] lib: direct: Don't ever use -no-kvm-pit-reinjection.
- Re: [PATCH 1/2] src: start unifying version handling
- [PATCH] aarch64: appliance: Use AAVMF (UEFI) if available for running the appliance.
- [PATCH] lib: direct: Remove support for virtio-blk as the default.