From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED9A1C43218 for ; Sun, 28 Apr 2019 02:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C275620874 for ; Sun, 28 Apr 2019 02:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbfD1CbJ (ORCPT ); Sat, 27 Apr 2019 22:31:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:48844 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfD1CbJ (ORCPT ); Sat, 27 Apr 2019 22:31:09 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2019 19:31:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,403,1549958400"; d="scan'208";a="146336067" Received: from unknown (HELO localhost) ([10.239.159.128]) by orsmga003.jf.intel.com with ESMTP; 27 Apr 2019 19:31:07 -0700 Date: Sun, 28 Apr 2019 10:31:18 +0800 From: Yang Weijiang To: Paolo Bonzini Cc: kvm@vger.kernel.org Subject: Re: Migration for SPP(Sub-Page Protection) bitmaps Message-ID: <20190428023118.GA29269@local-michael-cet-test> References: <20190417095918.GA15982@local-michael-cet-test.sh.intel.com> <20190426085723.GA32222@local-michael-cet-test> <1936609002.15679158.1556350659850.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1936609002.15679158.1556350659850.JavaMail.zimbra@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Sat, Apr 27, 2019 at 03:37:39AM -0400, Paolo Bonzini wrote: > > > > 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. > > > > 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? > > Yes, definitely. Remember that EPT page tables come and go (pages could > be swapped out, or moved from one host physical address to another; there > is also a shrinker that will release EPT page tables if memory is low), > so SPP support should be ready for that. Migration is just a special case. > > Paolo OK, got it, thanks a lot for the reply!