Received: by 2002:a05:6a10:ffa2:0:0:0:0 with SMTP id hs34csp4955389pxb; Tue, 22 Feb 2022 14:27:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCZFjn+KGkT94JsC4DvvOjnqrD3PErsubSCATeBvSKnvFpj08tSzm/Ejho9lAk+1bVFQti X-Received: by 2002:a63:ec46:0:b0:35e:7865:ac76 with SMTP id r6-20020a63ec46000000b0035e7865ac76mr20901046pgj.453.1645568837358; Tue, 22 Feb 2022 14:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645568837; cv=none; d=google.com; s=arc-20160816; b=WEbMUWGU7ln+P4UxLasWjgRIkty11ND1BQ5zS/lzWg3tGHP7ZSImm3XETMnIjS0neQ Wj04m2NsbrQc9HgGUM4thbGmA4LzE7UULGRbiyKeKOPcFI0Alurkxw+3EUXLxA15hihw gS9zV3iOWbQc9nF4a1d/AqFpFLRCLqK3yWgVju2/ZEQ8/AHf3Qb2kPMB4IbxAb3zlBqY kIXi5dk5NtaluxymxR/KTcFcHw6FmTKOLLgJgPkreVKC9tL68HLFcJRnd6Xhd2/0Sp4H dOnC9QfDDA4LLlpYKvoR4OxCs2Xbc//WhGaq6NGCdhi2JetB7kvRVyVTppCjL+vFuXAm euZw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=J/WvYhSSlL1KaJv4BrToZlX6Ln1SlP7S7zTTKYr66es=; b=NxvvsP0XjWq6MnK+gevfDVeZM5NM/jTJ+xcuHCk/jmg9Ppn4bPm8Ao6fmpqMFwPhY9 HpFzEgkoUmHyYZoeaMLvBr41S0B5xmZ5TF9gfMedYdxs1mn3DDa7pP8UuoHVkW9ArfRS MAQALB67kahgwqo2Nax84UXTWmF64WwSYO1ZRK7ZIkh9o8Ov5riJBBZ/WT4ArPafF+/u QQ7dK7ZpAZ0VRA2LJdEk2fh6gF6bfnh/Vwb6gmKHil+S6IpAOojLGTIfZhyreO/lNZ0S FnU94cQcb4Du+M5RW3pznGHe0X5x63624i7R7GdK+WA5EpGbl6xZ+MYqm8TqTIIQy2UF JI2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mk1GSR3q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2si12291740pfj.54.2022.02.22.14.27.01; Tue, 22 Feb 2022 14:27:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mk1GSR3q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235155AbiBVS6Q (ORCPT + 99 others); Tue, 22 Feb 2022 13:58:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235147AbiBVS6P (ORCPT ); Tue, 22 Feb 2022 13:58:15 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F1ABF97B for ; Tue, 22 Feb 2022 10:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645556269; x=1677092269; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ofWFZpzYO/qnLxOCsHEB1xbjxhDgd/GCEJLCnQf88OQ=; b=Mk1GSR3qctuLQqHAyCAPsnNWWJXu60WKC/IJ5rEmCdLdrdqlG14wqNL8 XTI6pABveH6r91R6LTDSUAxO6IS3/XyTOuomqTqEB0AULyoZ55VUhwyFH y+3KMiiUKzWhz9D/1R1AlvF/FzjSVgno6XpFFLIqeOsNdpmAiFfcz2C5G acgz3hogcesYZBmDMKZyHXwhSkDV9c/G+1ABPntZfQdA0exmKbelbyzdS ifofFs9rikZnD/yN/eGLsuMIMULLuDNH9MDx/woQDijJim6rnjbCwlnlq hZ60jOmrAJC2pv5Dxf0hGJ1xwQH3s7YMt2GEVTOQMVAK2jmbPG68K3CtJ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="231756953" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="231756953" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 10:57:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="490900618" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 22 Feb 2022 10:57:34 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 3905D142; Tue, 22 Feb 2022 20:57:50 +0200 (EET) From: "Kirill A. Shutemov" To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org Cc: sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jmattson@google.com, seanjc@google.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH 0/4] x86: Cleanup and extend computing computing API Date: Tue, 22 Feb 2022 21:57:36 +0300 Message-Id: <20220222185740.26228-1-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Updates for CC API: - Fix for HyperV when AMD SME/SEV disabled; - New home for CC code: arch/x86/coco; - Explicitly declare vendor of CC platform; - New cc_mkenc() and cc_mkdec(); Kirill A. Shutemov (4): x86/hyperv: Add missing ARCH_HAS_CC_PLATFORM dependency x86: Rename cc_platform.c to arch/x86/coco/core.c x86/coco: Explicitly declare type of confidential computing platform x86/coco: Add API to handle encryption mask arch/x86/Kbuild | 2 + arch/x86/coco/Makefile | 6 ++ .../x86/{kernel/cc_platform.c => coco/core.c} | 56 +++++++++++++++---- arch/x86/include/asm/coco.h | 32 +++++++++++ arch/x86/include/asm/pgtable.h | 13 +++-- arch/x86/kernel/Makefile | 5 -- arch/x86/kernel/cpu/mshyperv.c | 3 + arch/x86/mm/mem_encrypt_identity.c | 12 ++-- arch/x86/mm/pat/set_memory.c | 5 +- drivers/hv/Kconfig | 1 + 10 files changed, 106 insertions(+), 29 deletions(-) create mode 100644 arch/x86/coco/Makefile rename arch/x86/{kernel/cc_platform.c => coco/core.c} (73%) create mode 100644 arch/x86/include/asm/coco.h -- 2.34.1