All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: "Cao, Lei" <Lei.Cao@stratus.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 6/6] KVM: Dirty memory tracking for performant checkpointing and improved live migration
Date: Thu, 28 Apr 2016 20:08:47 +0200	[thread overview]
Message-ID: <20160428180847.GB15747@potion> (raw)
In-Reply-To: <BL2PR08MB4814C8EBEC9E7A82E01EC39F0630@BL2PR08MB481.namprd08.prod.outlook.com>

2016-04-26 19:26+0000, Cao, Lei:
> Updates to KVM API documentation
> ---

I have five broad questions about design of the interface:

* Why are IOCTLs marked with "Called once when entering live
  migration/checkpoint mode" separate from KVM_INIT_MT?
* Is there a reason to call KVM_ENABLE_MT often?
* How significant is the benefit of MT_FETCH_WAIT?
* When would you disable MT_FETCH_REARM?
* What drawbacks had an interface without explicit checkpointing cycles?

> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
> @@ -3120,6 +3120,176 @@ struct kvm_reinject_control {

A bit to the code itself:

> +4.99 KVM_INIT_MT
> +
> +Capability: basic

"basic" ioctls were present since the first version of KVM.
We can't change the past, so please add a new capability.

> +4.102 KVM_MT_SUBLIST_FETCH
> +
> +Capability: basic
> +Architectures: x86
> +Type: vm ioctl
> +Parameters: struct mt_sublist_fetch_info (in/out)
> +Returns: 0 on success, -1 on error
> +
> +/* for KVM_MT_SUBLIST_FETCH */
> +struct mt_gfn_list {
> +        __s32   count;
> +        __u32   max_dirty;
> +        __u64   *gfnlist;

gfn (= gpa >> PAGE_SHIFT) is not enough to specify a page for userspace,
because KVM has a concept of address spaces and pages from multiple
slots can be mapped into the same gfn (e.g. x86 SMRAM).

Providing a memslot/offset pair seems best.  (I'd start by addressing
Kai's comment on [3/6] about binding gfnlist to memslots.)

Thanks.

  reply	other threads:[~2016-04-28 18:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201604261856.u3QIuJMs025122@dev1.sn.stratus.com>
2016-04-26 19:26 ` [PATCH 6/6] KVM: Dirty memory tracking for performant checkpointing and improved live migration Cao, Lei
2016-04-28 18:08   ` Radim Krčmář [this message]
2016-04-29 18:47     ` Cao, Lei
2016-05-02 16:23       ` Radim Krčmář
2016-05-03 13:34         ` Cao, Lei
2016-05-03  7:10   ` Huang, Kai

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=20160428180847.GB15747@potion \
    --to=rkrcmar@redhat.com \
    --cc=Lei.Cao@stratus.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.