[libvirt] [PATCH v2 7/7] qemu: Check TSC frequency before starting QEMU

Ján Tomko jtomko at redhat.com
Mon Jun 3 12:52:40 UTC 2019


On Mon, Jun 03, 2019 at 02:27:58PM +0200, Jiri Denemark wrote:
>When migrating a domain with invtsc CPU feature enabled, the TSC
>frequency of the destination host must match the frequency used when the
>domain was started on the source host or the destination host has to
>support TSC scaling.
>
>If the frequencies do not match and the destination host does not
>support TSC scaling, QEMU will fail to set the right TSC frequency when
>starting vCPUs on the destination and thus migration will fail. However,
>this is quite late since both host might have spent significant time
>transferring memory and perhaps even storage data.
>
>By adding the check to libvirt we can let migration fail before any data
>starts to be sent over. If for some reason libvirt is unable to detect
>the host's TSC frequency or scaling support, we'll just let QEMU try and
>the migration will either succeed or fail later.
>
>Luckily, we mandate TSC frequency to be explicitly set in the domain XML
>to even allow migration of domains with invtsc. We can just check
>whether the requested frequency is compatible with the current host
>before starting QEMU.
>
>https://bugzilla.redhat.com/show_bug.cgi?id=1641702
>
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
> src/qemu/qemu_process.c | 53 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190603/75669e77/attachment-0001.sig>


More information about the libvir-list mailing list