Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp276325pxf; Thu, 8 Apr 2021 02:54:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5K0PDBDfUAmQht3WuXk5EJrTg+0YCf1eieECCVhEXblJmPsp5j8DMq7JbuEX561E4EkpT X-Received: by 2002:a17:906:2759:: with SMTP id a25mr9388775ejd.122.1617875664961; Thu, 08 Apr 2021 02:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617875664; cv=none; d=google.com; s=arc-20160816; b=Sw62NgTCCp2EDKoVxIO8ZIHBSyNBRlEWFXq3K0rVvZPkmHMu1iCJmaUzIuu3PDOk0Y QdvyE2CAvE1IJQnpWgGUl276ekrLJNT9OYua2nvDztHHZCBO2qCs26u+DhSxhy3XBAYP /VXhDsqaUT3YZxzoZPyf6cilVjaEpgtgTTBWgSlgU7Q0WkRhCrBLur8Mxy++/ar+kV8a dC3CIc5qzqM10VFqAUA4D5uZfReI0i0bGg6BETN7CiPg4E0rmoRLovZv5ZZkRPipCzes VPLmK4kWjCoP8dcKmUzbNZ7n6l4y/HuUUvsitSpmoWr+ymyvLyAmanfZF2mMjfJfPNmK S/lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Z1sdOTVzGcgzlBOFqani/UNpSK+Merm6hbxo6XIHoVM=; b=RTRjOkEVoH0vOnwkV+mxsxhpufGu3Emt4DdjAZYbVNDAuu+eeLWjRVNuQYQgWa60q/ bUlinQpth0/JhjUiZJoL+Ih+QQPRjD6bkeKtmKmzqsifwE+VFmW5ZkxGjfND8mJf8jsQ e4V21wIrcaUzbMlFv6MfcSXgyu6HpltUP13x13EO/5a3HrcBB1uW9ffSZzt8CBzW7UxX HluiLwOjd8pSWbOZgiSPSdZzy4JkMltUJY6cGrbxwehUwMuxrC3axLw9afXrCftn8WnN QzqyD9+6FpxA3ACbjGOVXeEN4zEI2jjL5EiP1FmNdr0VIjzYDrZO6Ob7ebx9gk4fohCB H/Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qS1+yuAP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk18si13180617edb.570.2021.04.08.02.54.01; Thu, 08 Apr 2021 02:54:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qS1+yuAP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbhDHJws (ORCPT + 99 others); Thu, 8 Apr 2021 05:52:48 -0400 Received: from mail.skyhub.de ([5.9.137.197]:53936 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230351AbhDHJwr (ORCPT ); Thu, 8 Apr 2021 05:52:47 -0400 Received: from zn.tnic (p200300ec2f095000c11580856fe05acf.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:5000:c115:8085:6fe0:5acf]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id BAD521EC04AD; Thu, 8 Apr 2021 11:52:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1617875555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Z1sdOTVzGcgzlBOFqani/UNpSK+Merm6hbxo6XIHoVM=; b=qS1+yuAPGSm16cn8yg2PvuG2My9jMZaPmlj6amHud2tby9gRr+NJQpTqWcEAsfdaMtFEx/ 0KfpUGOqCixocwu6CybMMhZYqZP+fEqhTNs77ShAU+tb37rVDA1W2lAaJGh/GGzPtcN/vq AdTsMmKrfKss7Ca5bDn0p/F9AFIzWFE= Date: Thu, 8 Apr 2021 11:52:35 +0200 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Sean Christopherson , Jim Mattson , David Rientjes , "Edgecombe, Rick P" , "Kleen, Andi" , "Yamahata, Isaku" , x86@kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [RFCv1 2/7] x86/kvm: Introduce KVM memory protection feature Message-ID: <20210408095235.GH10192@zn.tnic> References: <20210402152645.26680-1-kirill.shutemov@linux.intel.com> <20210402152645.26680-3-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210402152645.26680-3-kirill.shutemov@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 02, 2021 at 06:26:40PM +0300, Kirill A. Shutemov wrote: > Provide basic helpers, KVM_FEATURE, CPUID flag and a hypercall. > > Host side doesn't provide the feature yet, so it is a dead code for now. > > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/include/asm/cpufeatures.h | 1 + > arch/x86/include/asm/kvm_para.h | 5 +++++ > arch/x86/include/uapi/asm/kvm_para.h | 3 ++- > arch/x86/kernel/kvm.c | 18 ++++++++++++++++++ > include/uapi/linux/kvm_para.h | 3 ++- > 5 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h > index 84b887825f12..5b6f23e6edc4 100644 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -238,6 +238,7 @@ > #define X86_FEATURE_VMW_VMMCALL ( 8*32+19) /* "" VMware prefers VMMCALL hypercall instruction */ > #define X86_FEATURE_SEV_ES ( 8*32+20) /* AMD Secure Encrypted Virtualization - Encrypted State */ > #define X86_FEATURE_VM_PAGE_FLUSH ( 8*32+21) /* "" VM Page Flush MSR is supported */ > +#define X86_FEATURE_KVM_MEM_PROTECTED ( 8*32+22) /* KVM memory protection extenstion */ ^^^^^^^^^^ What's that feature bit for? Also, use a spellchecker pls: "extenstion". -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette