Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1886447pxv; Fri, 2 Jul 2021 15:10:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFJvu+YSfub+bbpkZY5IZeLc9ymiRPxCP6rJilmPLmp7whJp7nSVOvSLb7JmvPt3DRpgQz X-Received: by 2002:a17:906:c106:: with SMTP id do6mr1981315ejc.116.1625263825136; Fri, 02 Jul 2021 15:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625263825; cv=none; d=google.com; s=arc-20160816; b=GrrZCGH2x88LXTu3vZQGOrCGCBF/eYklz1IPrxdMAcXzKgAaUllMrwxZSgmYuGK2/f AqeaLF9ZQoQgUN8w1Yc1eaR/GonYEi3lWD1uj37mFd878coKrzFsSpKyYDRzJyRBdKyM iVzMSXnmk83A2qwhOkd6D8Rl+UIoyD9smrYwkuJG6K7yAQzYHtEuWv2PdtnoAu9+37Dj VfGlYd4VEQpQKglz+gEazrkzBLjr5Ryg4rptBpoi8htuzpz+aPM6iHAznbV450FUOpX5 rCLsWxivoL2gWVja0tvXOB2tFLQpC/XdIszgz48W8BRj/a7E9uV51uR4uCAO0Kr9QpuD BOjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HqPVVyeoWce8fSLmIh8+Qt47w22IQtnE13rCp173TpU=; b=dgquGs5QwvkBWN36GYRzfjwYrQ2f0x+SkVlTafWjj5nt5+/f/WJwcpGwGVXAYh1/x4 OSPHKcfCnIwSb3jxVoMabHqcqbN/Kief+w7bqZcW5HZrgV/2ShubC23FKuYtbUnQu0ro SU5visGLjC7qLml0OnPm8OOkB7lE+JjNZpdvKCtDyUzAihXo/LSmzRR9lmWCd4MuGqxU ag47Qgpv3w5rcFdRbuqoDFjuncf5Ah51uGpQfzdnP3ZpRgOin+K6T5TW3k26IOGY/hUp lqTs4BPv9HBBQNUX5Wr1OQli9zfuU5BMY5onIEYpIkp1zyLRFQv5Ci5yw3aLH4076RmK lJRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by10si4387723ejc.77.2021.07.02.15.10.02; Fri, 02 Jul 2021 15:10:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233681AbhGBWIv (ORCPT + 99 others); Fri, 2 Jul 2021 18:08:51 -0400 Received: from mga12.intel.com ([192.55.52.136]:50197 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233218AbhGBWIA (ORCPT ); Fri, 2 Jul 2021 18:08:00 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10033"; a="188472754" X-IronPort-AV: E=Sophos;i="5.83,320,1616482800"; d="scan'208";a="188472754" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 15:05:27 -0700 X-IronPort-AV: E=Sophos;i="5.83,320,1616482800"; d="scan'208";a="642814805" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 15:05:26 -0700 From: isaku.yamahata@intel.com To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Sean Christopherson Subject: [RFC PATCH v2 40/69] KVM: Export kvm_is_reserved_pfn() for use by TDX Date: Fri, 2 Jul 2021 15:04:46 -0700 Message-Id: <1ef40d74af89c4e347e46412a5d07f6e7eebf839.1625186503.git.isaku.yamahata@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson TDX will use kvm_is_reserved_pfn() to prevent installing a reserved PFN int SEPT. Or rather, to prevent such an attempt, as reserved PFNs are not covered by TDMRs. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata --- virt/kvm/kvm_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 8b075b5e7303..dd6492b526c9 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -188,6 +188,7 @@ bool kvm_is_reserved_pfn(kvm_pfn_t pfn) return true; } +EXPORT_SYMBOL_GPL(kvm_is_reserved_pfn); bool kvm_is_transparent_hugepage(kvm_pfn_t pfn) { -- 2.25.1