Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp213603ybe; Tue, 10 Sep 2019 17:25:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvAh8+hDW907PmoKbp07uUE0/W4lSfdgN9B/9RUs12PdwpsMHS0OWmHMWZUboc28Q40L1M X-Received: by 2002:a50:fc08:: with SMTP id i8mr34328936edr.285.1568161509476; Tue, 10 Sep 2019 17:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568161509; cv=none; d=google.com; s=arc-20160816; b=An5SEkzxDJ1cIFuKykHMO46b0z9HaKmUwOpl7Y3smpfcoFkvwKGVJcm/vmIT0D0g6H Q0uxavM4sZg1MEYNkDJN9zBA0rITbCwt5f1fAQceBRE7nOp/qnTWpCNDqms8t6XK/OnL IvwCRi6pYbAjgrhI/GXFZWpmiBKMOXl1TGJBsB83ir7zS6D7/ZMWytQ0Aw4VzV3gFZ+n /5ZJKJPngmSvuBpvKikVUumpjtzbRkD+CTfTKV43a6vvSb7hVyQYSHoEcPGovdhCv1Im oeFKudMDBlhR18en5C6Z/dt31U3qhL6CKydHPHv/meo+LocZ3k6lnvm1dWBjA7fjL1Bt SWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BrVCjV7jCLa3oNe+dItpoEfPJ3t3le92wxKD4co7ZeE=; b=esKdY8vklnD055LTSazyknjzW+C5NMzrDQcmW6bB3QcXWv4lKSGk/mG4KXqqxpiitl gc5gQMuzUSnMsn8TxWOgy90ZYTfj2JN56nzgJbWI3fCUZ/bvb9m6qeMTSBWKpHF4Y6oT Pur+5Eg7eCdhKWw/U2Snuoi9Pg3c8QKZSoRjLC7HGj7rEMaolGQkJIvlpwY3QYaPRsjH yFzgPKMk3AGbcD+Q1dDBiOJaBEjavvLdoiCvAx8aSqcMUHk6CAuoxugbAVdsca7sdKwR /m4E2eUrGHtm6lpyAB2Puy8+yFLvtO+vixAlC/GAAysp8pruly7tGQMyE9KOMEHvMT+o 6NEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si11986005edb.55.2019.09.10.17.24.43; Tue, 10 Sep 2019 17:25:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726453AbfIKAW4 (ORCPT + 99 others); Tue, 10 Sep 2019 20:22:56 -0400 Received: from mga04.intel.com ([192.55.52.120]:2471 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbfIKAW4 (ORCPT ); Tue, 10 Sep 2019 20:22:56 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 17:22:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,491,1559545200"; d="scan'208";a="214495565" Received: from unknown (HELO localhost) ([10.239.159.128]) by fmsmga002.fm.intel.com with ESMTP; 10 Sep 2019 17:22:54 -0700 Date: Wed, 11 Sep 2019 08:23:44 +0800 From: Yang Weijiang To: Paolo Bonzini Cc: Yang Weijiang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, mst@redhat.com, rkrcmar@redhat.com, jmattson@google.com, yu.c.zhang@intel.com, alazar@bitdefender.com Subject: Re: [PATCH RESEND v4 8/9] KVM: MMU: Enable Lazy mode SPPT setup Message-ID: <20190911002344.GA28130@local-michael-cet-test> References: <20190814070403.6588-1-weijiang.yang@intel.com> <20190814070403.6588-9-weijiang.yang@intel.com> <63f8952b-2497-16ec-ff55-1da017c50a8c@redhat.com> <20190820131214.GD4828@local-michael-cet-test.sh.intel.com> <20190904134925.GA25149@local-michael-cet-test.sh.intel.com> <6cdea038-8d6f-6d75-47b2-bb23ff1c9f15@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cdea038-8d6f-6d75-47b2-bb23ff1c9f15@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 09, 2019 at 07:10:22PM +0200, Paolo Bonzini wrote: > On 04/09/19 15:49, Yang Weijiang wrote: > >>> This would not enable SPP if the guest is backed by huge pages. > >>> Instead, either the PT_PAGE_TABLE_LEVEL level must be forced for all > >>> pages covered by SPP ranges, or (better) kvm_enable_spp_protection must > >>> be able to cover multiple pages at once. > >>> > >>> Paolo > >> OK, I'll figure out how to make it, thanks! > > Hi, Paolo, > > Regarding this change, I have some concerns, splitting EPT huge page > > entries(e.g., 1GB page)will take long time compared with normal EPT page > > fault processing, especially for multiple vcpus/pages,so the in-flight time increases, > > but HW walks EPT for translations in the meantime, would it bring any side effect? > > or there's a way to mitigate it? > > Sub-page permissions are only defined on EPT PTEs, not on large pages. > Therefore, in order to allow subpage permissions the EPT page tables > must already be split. > > Paolo Thanks, I've added code to handle hugepage, will be included in next version patch.