Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2757009ybl; Mon, 19 Aug 2019 07:07:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9SVI2S/gtxlZBoCP1lprIeRI2ZASSbZnTk6QiHd+MgwM5+WawuN7L1b0yp83UR+hE9URH X-Received: by 2002:a62:ab0a:: with SMTP id p10mr24196788pff.144.1566223669259; Mon, 19 Aug 2019 07:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566223669; cv=none; d=google.com; s=arc-20160816; b=qvn94JpKdOmX0fmJ9duRCm+KeLZWDjBMYiLhXpaIe5N76p3H+sXybUu1Lnz0X4uzlF XdWM2552AV7Adpb8D6532ZML4nm3oG6Po77TrFG/WnR8BtOPFR5A65w9c+k/biwO5W1c JKnTv/m0qgfYU4s1HunSPQ41ud4YXExYnNVu3AmwpXumGerCq5zDr3oPJj9b3LQYmhFW 61xKuSg+3pnJWm6zoqCBscnIciNOJnvHYe0ZmQhhxJiR418GUiLOokDvoR82QhiBustV 4FJt5Shn/LMrYdCLdJkHb1cBWZZoNE5iVRZn5L749N0QGtx3sd9KDsynCh6HVii7TxN/ hWDg== 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=r69YT1V9xu1IUVpvaM2QCTUmYYyW/OAi7t9D5x5EyRY=; b=qYKjS6f9+q/xc9WBjaeIyhIIcjQ1oMpOll2pCuDM+znxFIU1XuA5xEJ295xH505W/I kDMx0fLGWgB4w9LUS5cKBq+I9tDC6S8+jkmjYrKIuWf1/q5Sx/vs+9hyb0rbh4iuf1zV CAi3tiH0FObNX8mIm95rd8ttNQalElTGzMyo9w9g/uP9AEZWkPuLNVjvweHdakXnCRaT yIQBMaE3vtz5BYGR4Umc2sjJBNzkQjcIqBpr0D6OtNB0eyB1qoTTUajV+3789AMWzr7d fEvzfZn8rHYnxock+ZphjW3srnglL2fWfKo2kks04AkDgzmluj+Q6S54j1Kowzq6FdBH qzCg== 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 l14si9893580pgh.205.2019.08.19.07.07.29; Mon, 19 Aug 2019 07:07:49 -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 S1727786AbfHSOFO (ORCPT + 99 others); Mon, 19 Aug 2019 10:05:14 -0400 Received: from mga18.intel.com ([134.134.136.126]:30454 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbfHSOFM (ORCPT ); Mon, 19 Aug 2019 10:05:12 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 07:05:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,405,1559545200"; d="scan'208";a="261853858" Received: from local-michael-cet-test.sh.intel.com (HELO localhost) ([10.239.159.128]) by orsmga001.jf.intel.com with ESMTP; 19 Aug 2019 07:05:09 -0700 Date: Mon, 19 Aug 2019 22:06:41 +0800 From: Yang Weijiang To: Vitaly Kuznetsov Cc: Yang Weijiang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, rkrcmar@redhat.com, jmattson@google.com, yu.c.zhang@intel.com, alazar@bitdefender.com, pbonzini@redhat.com, sean.j.christopherson@intel.com Subject: Re: [PATCH RESEND v4 5/9] KVM: VMX: Add init/set/get functions for SPP Message-ID: <20190819140641.GA32099@local-michael-cet-test.sh.intel.com> References: <20190814070403.6588-1-weijiang.yang@intel.com> <20190814070403.6588-6-weijiang.yang@intel.com> <87a7cbapdw.fsf@vitty.brq.redhat.com> <20190815134329.GA11449@local-michael-cet-test> <87o90q8r0s.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o90q8r0s.fsf@vitty.brq.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 Thu, Aug 15, 2019 at 04:03:31PM +0200, Vitaly Kuznetsov wrote: > Yang Weijiang writes: > > > After looked into the issue and others, I feel to make SPP co-existing > > with nested VM is not good, the major reason is, L1 pages protected by > > SPP are transparent to L1 VM, if it launches L2 VM, probably the > > pages would be allocated to L2 VM, and that will bother to L1 and L2. > > Given the feature is new and I don't see nested VM can benefit > > from it right now, I would like to make SPP and nested feature mutually > > exclusive, i.e., detecting if the other part is active before activate one > > feature,what do you think of it? > > I was mostly worried about creating a loophole (if I understand > correctly) for guests to defeat SPP protection: just launching a nested > guest and giving it a protected page. I don't see a problem if we limit > SPP to non-nested guests as step 1: we, however, need to document this > side-effect of the ioctl. Also, if you decide to do this enforecement, > I'd suggest you forbid VMLAUCH/VMRESUME and not VMXON as kvm module > loads in linux guests automatically when the hardware is suitable. > > Thanks, > > -- > Vitaly OK, I'll follow your suggestion to add the exclusion, thanks!