Pino Toscano
2017-Sep-01 12:10 UTC
[Libguestfs] [PATCH] launch: direct: limit kvm-pit.lost_tick_policy to x86
This QEMU property is specific to x86/x86_64, so add it only on these architectures. --- lib/launch-direct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index bc43dcea2..3b848165c 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -519,8 +519,10 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) arg ("-rtc", "driftfix=slew"); if (guestfs_int_qemu_supports (g, data->qemu_data, "-no-hpet")) flag ("-no-hpet"); +#if defined(__i386__) || defined(__x86_64__) if (guestfs_int_version_ge (&data->qemu_version, 1, 3, 0)) arg ("-global", "kvm-pit.lost_tick_policy=discard"); +#endif /* UEFI (firmware) if required. */ if (guestfs_int_get_uefi (g, &uefi_code, &uefi_vars, &uefi_flags) == -1) -- 2.13.5
Richard W.M. Jones
2017-Sep-01 13:45 UTC
Re: [Libguestfs] [PATCH] launch: direct: limit kvm-pit.lost_tick_policy to x86
On Fri, Sep 01, 2017 at 02:10:05PM +0200, Pino Toscano wrote:> This QEMU property is specific to x86/x86_64, so add it only on these > architectures. > --- > lib/launch-direct.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/launch-direct.c b/lib/launch-direct.c > index bc43dcea2..3b848165c 100644 > --- a/lib/launch-direct.c > +++ b/lib/launch-direct.c > @@ -519,8 +519,10 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) > arg ("-rtc", "driftfix=slew"); > if (guestfs_int_qemu_supports (g, data->qemu_data, "-no-hpet")) > flag ("-no-hpet"); > +#if defined(__i386__) || defined(__x86_64__) > if (guestfs_int_version_ge (&data->qemu_version, 1, 3, 0)) > arg ("-global", "kvm-pit.lost_tick_policy=discard"); > +#endif > > /* UEFI (firmware) if required. */ > if (guestfs_int_get_uefi (g, &uefi_code, &uefi_vars, &uefi_flags) == -1) > --The key being that "kvm-pit" is an x86 driver, so ... ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Possibly Parallel Threads
- [PATCH] aarch64: appliance: Use AAVMF (UEFI) if available for running the appliance.
- [PATCH] v2v: Use OVMF secure boot file (RHBZ#1367615).
- [PATCH 0/4] Use libvirt firmware autoselection
- [PATCH v2 0/2] v2v: Use OVMF secure boot file (RHBZ#1367615).
- [PATCH 0/2] libvirt: fix check of custom QEMU