public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Kagan <rkagan@virtuozzo.com>
To: Liran Alon <liran.alon@oracle.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	kvm list <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] QEMU/KVM migration backwards compatibility broken?
Date: Thu, 6 Jun 2019 13:13:50 +0000	[thread overview]
Message-ID: <20190606131348.GA32258@rkaganb.sw.ru> (raw)
In-Reply-To: <8F3FD038-12DB-44BC-A262-3F1B55079753@oracle.com>

On Thu, Jun 06, 2019 at 01:09:56PM +0300, Liran Alon wrote:
> First, machine-type express the set of vHW behaviour and properties that is exposed to guest.
> Therefore, machine-type shouldn’t change for a given guest lifetime (including Live-Migrations).
> Otherwise, guest will experience different vHW behaviour and properties before/after Live-Migration.
> So I think machine-type is not relevant for this discussion. We should focus on flags which specify
> migration behaviour (such as “x-migrate-smi-count” which can also be controlled by machine-type but not only).

My experience in dealing with migration compatibility matters (see e.g.
9b4cf107b09d18ac30f46fd1c4de8585ccba030c) is that the strategy is
basically "don't let anything but QEMU control what the guest sees".  If
QEMU is started with a particular set of flags defining guest-visible
things (and machine-type is just a convenient preset of flags), and
anything in the environment (host kernel, libraries, etc.) prevents it
from actually providing that functionality, it should detect it before
running any guest code or taking the incoming migration stream, and
refuse to start instead.

AFAICS from a quick glance, QEMU doesn't have a flag to which the
visiblity of MSR_SMI_COUNT is tied, which IMHO is a bug.  As the
presence of this MSR in the CPU is only determined by the CPU model,
it'd probably be correct to just refuse starting when such a CPU is
requested and the host KVM doesn't support MSR_SMI_COUNT.

> Third, let’s assume all hosts in fleet was upgraded to new_kernel. How
> do I modify all launched QEMUs on these new hosts to now have
> “x-migrate-smi-count” set to true?

In (my) ideal world this flag shouldn't have existed.  Dunno how it came
about; I guess it was some sort of a compromise.  The real problem is
IMO that QEMU lets the control loose on whether MSR_SMI_COUNT is present
in the guest.

Roman.

      parent reply	other threads:[~2019-06-06 13:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  0:09 QEMU/KVM migration backwards compatibility broken? Liran Alon
2019-06-06  8:42 ` Dr. David Alan Gilbert
2019-06-06  9:11   ` Liran Alon
2019-06-06  9:23     ` Dr. David Alan Gilbert
2019-06-06 10:09       ` Liran Alon
2019-06-06 10:39         ` Dr. David Alan Gilbert
2019-06-06 10:57           ` Liran Alon
2019-06-06 11:07             ` Dr. David Alan Gilbert
2019-06-06 11:29               ` Liran Alon
2019-06-06 13:31                 ` Dr. David Alan Gilbert
2019-06-06 15:16                   ` Liran Alon
2019-06-10  9:44                     ` Dr. David Alan Gilbert
2019-06-06 13:13         ` Roman Kagan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606131348.GA32258@rkaganb.sw.ru \
    --to=rkagan@virtuozzo.com \
    --cc=dgilbert@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox