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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 AE67BC4338F for ; Thu, 29 Jul 2021 06:49:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CAAE60249 for ; Thu, 29 Jul 2021 06:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234363AbhG2GtQ (ORCPT ); Thu, 29 Jul 2021 02:49:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:3944 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234283AbhG2GtN (ORCPT ); Thu, 29 Jul 2021 02:49:13 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="276597652" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="276597652" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 23:49:09 -0700 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="506987458" Received: from yzhao56-desk.sh.intel.com ([10.239.13.16]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 23:49:07 -0700 Date: Thu, 29 Jul 2021 14:34:16 +0800 From: Yan Zhao To: Yu Zhang Cc: Ben Gardon , Sean Christopherson , Paolo Bonzini , "kvm@vger.kernel.org" Subject: Re: A question of TDP unloading. Message-ID: <20210729063415.GA22427@yzhao56-desk.sh.intel.com> Reply-To: Yan Zhao References: <20210728065605.e4ql2hzrj5fkngux@linux.intel.com> <20210728072514.GA375@yzhao56-desk.sh.intel.com> <20210728172241.aizlvj2alvxfvd43@linux.intel.com> <20210729030056.uk644q3eeoux2qfa@linux.intel.com> <20210729025809.GA9585@yzhao56-desk.sh.intel.com> <20210729051743.amqn3cizcwxf5q7n@linux.intel.com> <20210729051739.GA19566@yzhao56-desk.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210729051739.GA19566@yzhao56-desk.sh.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org > > Sorry? Do you mean your VM needs 5 minute to boot? What is your configuration? > > > yes. the VM needs 5 minutes to boot when I forced enable_unrestricted_guest=0 in kvm. > > > VMX unrestricted guest has been supported on all Intel platforms since years > > ago. I do not see any reason to disable it. > > > yes. just for test purpose. > To study the impact to the mode enable_unrestricted_guest=0, > since in this mode, cr0, cr4 causes lots of vmexit. one correction. actually with enable_unrestricted_guest=0, it has less number of kvm_set_cr0(), but more kvm_mmu_reset_context() called from kvm_set_cr0(). ___________________________________________________________________ | | #cr0 |#reset_context from cr0| #cr4| | ---------------------------|--------|-----------------------|-----| |enable_unrestricted_guest=0 | 627405 | 313704 | 13 | |----------------------------|--------|-----------------------|-----| |enable_unrestricted_guest=1 |2092493 | 5 | 13 | --------------------------------------------------------------------