Message ID | 20201020061859.18385-7-kirill.shutemov@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=Dpe1=D3=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B9DC14B4 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 20 Oct 2020 06:19:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C2E52223BF for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 20 Oct 2020 06:19:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="wqgOv0Ad" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2E52223BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 79B336B0073; Tue, 20 Oct 2020 02:19:11 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 74FB26B0074; Tue, 20 Oct 2020 02:19:11 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 55B526B0075; Tue, 20 Oct 2020 02:19:11 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 0F02B6B0071 for <linux-mm@kvack.org>; Tue, 20 Oct 2020 02:19:11 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A50933629 for <linux-mm@kvack.org>; Tue, 20 Oct 2020 06:19:10 +0000 (UTC) X-FDA: 77391301260.20.bike79_59116e92723d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 7F2B6180C07A3 for <linux-mm@kvack.org>; Tue, 20 Oct 2020 06:19:10 +0000 (UTC) X-Spam-Summary: 1,0,0,64a7bfd9fd08165d,d41d8cd98f00b204,kirill@shutemov.name,,RULES_HIT:41:355:379:541:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1539:1711:1714:1730:1747:1777:1792:2198:2199:2393:2559:2562:2731:3138:3139:3140:3141:3142:3350:3865:3867:3868:3871:3872:5007:6261:6653:6742:7903:10004:11026:11658:11914:12043:12048:12297:12438:12517:12519:12555:12895:13069:13311:13357:13894:14096:14181:14384:14721:21080:21444:21451:21627:30054,0,RBL:209.85.208.196:@shutemov.name:.lbl8.mailshell.net-66.201.201.201 62.8.84.100;04ygsg814dqkc1igzznzegyehxowiopatuer3a56s84ft7bfagcsce4dezs475s.jjzbxknis8qcu8wc13pym93chw4cjaidpp3ybd5nkro53id36oq31y151xd4xd6.a-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: bike79_59116e92723d X-Filterd-Recvd-Size: 4654 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf23.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Tue, 20 Oct 2020 06:19:10 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id y16so760209ljk.1 for <linux-mm@kvack.org>; Mon, 19 Oct 2020 23:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pE6faVejbkAIUEORvfpEBGX8dWE5OEtccf8+g3bpDfA=; b=wqgOv0AdT4cxsnlRIT/UMGHB0RcEbRbr7Zk7Ij6sVDDKQ58f7O/mJyeJdUG+lVOM3W QjB2s1DT+SUQVCNFzdwwY6LrGOrnKqHLcaVwezTp/Ec9EVQ9VbKanXvyaP7kWY8cU2fq xY9yC+/+uB431+nxnsp4hOyXOgds8MRIVEpVaR03fauEGuiOFNxj51NvTD9SyN28NpnC Ze3LwVbA7FzXuB5GisL6E+XJJtIHsF28V/8BG4LccqzrGvrvEyfsyh2ImhaGa6ZZkVI4 qdy3YOAYaheLIrtXdvNRCy3VuuIYqQBQxV5+IXrn8aZ8CysQLNcewpbbGqREi6qJO9Iu GMTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pE6faVejbkAIUEORvfpEBGX8dWE5OEtccf8+g3bpDfA=; b=r0aEMDC8H20w8EnEYVBrBqg9g5yWb6Kzh0rDe/ltrPvH+FO48JEhwLG4QiBMkuiTfL 4ywp6at13aWK53l9iFePDCICD+Zlt96cyq1/NwkYblAhCl2Czs8D64EDTeHv2h1YVuWw 15/8RenTnZPVMjz+nx5DQXgI1gkI5H15seGpntsKvaA5I1ntfLBLyVZ4wBE+/SjHMDiY O94b4SlWmaDAsIg2XPfC8OgWgC/fNchse4TARY6Wpf8zMLLRoDqSycEgdlGpNbdUKtce zQcvyy3D89DAqTpaxF7MtIVELAJOHCu4d1qv0Q+Mz7rGcgN9WmpnD3puB0bEaNXuvbBR W5lA== X-Gm-Message-State: AOAM5308A20kGa24RasUZz3JXQ0nlb3lukw7Q6+0Fo0f8zdNRYH5W3nn CxlVSx4b6+7tfJeepO/gJ9tMpQ== X-Google-Smtp-Source: ABdhPJx7ahPxugd4z72ja1bSn+DqbXFXAuU8ORtiw6nlDwM9v5+X158Jixbz9FhEJVNgbphYkh7WWA== X-Received: by 2002:a2e:8992:: with SMTP id c18mr456881lji.318.1603174748897; Mon, 19 Oct 2020 23:19:08 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id m203sm135528lfd.195.2020.10.19.23.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 23:19:07 -0700 (PDT) From: "Kirill A. Shutemov" <kirill@shutemov.name> X-Google-Original-From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Received: by box.localdomain (Postfix, from userid 1000) id DFB58102F65; Tue, 20 Oct 2020 09:19:01 +0300 (+03) To: Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <sean.j.christopherson@intel.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org> Cc: David Rientjes <rientjes@google.com>, Andrea Arcangeli <aarcange@redhat.com>, Kees Cook <keescook@chromium.org>, Will Drewry <wad@chromium.org>, "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>, "Kleen, Andi" <andi.kleen@intel.com>, Liran Alon <liran.alon@oracle.com>, Mike Rapoport <rppt@kernel.org>, x86@kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Subject: [RFCv2 06/16] x86/kvmclock: Share hvclock memory with the host Date: Tue, 20 Oct 2020 09:18:49 +0300 Message-Id: <20201020061859.18385-7-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201020061859.18385-1-kirill.shutemov@linux.intel.com> References: <20201020061859.18385-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
KVM protected memory extension
|
expand
|
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 34b18f6eeb2c..ac6c2abe0d0f 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -253,7 +253,7 @@ static void __init kvmclock_init_mem(void) * hvclock is shared between the guest and the hypervisor, must * be mapped decrypted. */ - if (sev_active()) { + if (sev_active() || kvm_mem_protected()) { r = set_memory_decrypted((unsigned long) hvclock_mem, 1UL << order); if (r) {
hvclock is shared between the guest and the hypervisor. It has to be accessible by host. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> --- arch/x86/kernel/kvmclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)