public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Yang Weijiang <weijiang.yang@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: Migration for SPP(Sub-Page Protection) bitmaps
Date: Fri, 26 Apr 2019 16:57:23 +0800	[thread overview]
Message-ID: <20190426085723.GA32222@local-michael-cet-test> (raw)
In-Reply-To: <ebf92795-f7c7-a406-0678-a0a41440a8e8@redhat.com>

On Fri, Apr 26, 2019 at 10:06:17AM +0200, Paolo Bonzini wrote:
> On 17/04/19 11:59, Yang Weijiang wrote:
> > Hi, Paolo,
> > 
> > I'm working on migration support for SPP(Sub-Page Protection) feature,
> > the previous patch set is here:
> > https://lkml.org/lkml/2018/11/30/574, basically it's used to protect
> > 128-byte subpages within a normal 4KB page.
> > 
> > but I'm not sure whether we need to add migration support for such kind of feature. 
> > 
> > Currently, my solution is to store the SPP bitmaps to destination KVM, when
> > there's EPT violation, search the bitmap mapping table to check if the
> > guest page needs to be protected.
> > 
> > Another solution is to setup EPT table directly at the end of migration.
> 
> The destination userspace should simply call KVM_SUBPAGES_SET_ACCESS,
> and KVM will process it just like it would on the source.  In other
> words, it shouldn't matter if the ioctl is done as part of migration or
> the first time a VM is setup.  And in both cases, lazy setup should be fine.
> 
> Thanks,
> 
> Paolo
Thanks Paolo! 

The problem is in current patch (as in link), it assumes
the target pages are there in EPT, but in migration case, these pages
are not setup in ETP, so KVM_SUBPAGES_SET_ACCESS during migration or
destination bootup will fail, should I modify the patch to setup the 
ETP in lazy mode? 



  reply	other threads:[~2019-04-26  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17  9:59 Migration for SPP(Sub-Page Protection) bitmaps Yang Weijiang
2019-04-26  8:06 ` Paolo Bonzini
2019-04-26  8:57   ` Yang Weijiang [this message]
2019-04-27  7:37     ` Paolo Bonzini
2019-04-28  2:31       ` Yang Weijiang

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=20190426085723.GA32222@local-michael-cet-test \
    --to=weijiang.yang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox