X-Received: by 2002:a17:90a:1b4f:b0:1bc:2c9e:bce8 with SMTP id q73-20020a17090a1b4f00b001bc2c9ebce8mr2408613pjq.143.1645508426592; Mon, 21 Feb 2022 21:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645508426; cv=none; d=google.com; s=arc-20160816; b=chKHnnTJa5JNknkQWflEUG1YGTDR/Z980QrIXAgfkE9qlKHB5EaW+GKm+mZ0Gzl9SY kGLlLrYX96+ZTwKe2bWWXfKUjdH1Nwefb8zSEU+eeyW1+4pbwOSDCjdTAuZxiiZml66B XyCy7W9KVr0ar5bJ84Itn3sNn3lzGavioZFCFl0Y/kVm3xBJerZc3vg/hz5RdWfqqP+x CCdnvkwa6pePm6walY02wvYk/wLn0Jo6Vm+vtnkNOnBBCp5g4y2OUpHro1fN9u0faav9 bFRD4unCUIpJnKlY+1lagu+YCM+bWiiAz+B00OMYZv+ZTqpzzsvvLT53n4UxPA0lXmG+ A6TA== 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=2CqZkpiS4DJB5JsH31IZu4CtCa4Q3yLu9wNZWnNpvGY=; b=axXMLUS6XYP6ENXIMk4dJ8DPnar8HncJbGPNhTwRveVuDDTnQytdPUI9VvVP9G6SkF 6o5ACBu5lFkOHAKhoCc4jzn7w2yuKcZjKAHVWi2gQIhIuWYtYiat8jtWlJMpXyXUT028 GoJ28+aqdsXgog2e5WGnx3wtKnhU25XaQgG2TCumzFrqP/8XP6sXPJkne251pp85eHlg ueuZyUbLgETV3lYCQqQ710JzQ0sI+udIKlnw2s54/s16t1bnN4Y2DBd2dnBbeT50R3FY KvvyguCkQC9roCKNhCHF4AlqyMl5DFapEmMI6qBEuCrCnowAdolQb7LBeXIwFy/y2yiG 4lnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TwBV+rDX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k12si16520268pgt.805.2022.02.21.21.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:40:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TwBV+rDX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C18C9C12C9; Mon, 21 Feb 2022 21:06:58 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236665AbiBUXTt (ORCPT + 99 others); Mon, 21 Feb 2022 18:19:49 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236520AbiBUXTR (ORCPT ); Mon, 21 Feb 2022 18:19:17 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71E7C24F25 for ; Mon, 21 Feb 2022 15:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645485502; x=1677021502; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6cWXqnm3BDGaKFT3v5LpcFFRCelK7Kg/AgqC0yuSaeM=; b=TwBV+rDXTZS4iwE0flFrSKC+7L/4gKBO1y68WwP3SoVAxXhWxf9fJa2k wLyRxHpVuh3srpHFRyLsteOQL8fe/jl6/7gGujBO13AGQ0Jd5RdSaoSCE Qpu6wNvLL4HW/jFQW9M/55fFf0Qae6T81DY2gnMap/iy/uQloeTW/EG9B WjOt4vTdlEFJivvT61xXUDT44+qpwpi5JNzxDnlcvXZM62F4m7s2Y27tU VgQc7I95FXNlJq6jGZoezTxf3yddCmQfzkCu7aD0vHQC6ToGmi4JtidLf pBOz0tiZOimhak1iF7VLBU2NUCP2WBb5ALWL94yJsbQNKV3qMPYwvLNGe g==; X-IronPort-AV: E=McAfee;i="6200,9189,10265"; a="250400470" X-IronPort-AV: E=Sophos;i="5.88,386,1635231600"; d="scan'208";a="250400470" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 15:18:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,386,1635231600"; d="scan'208";a="591099072" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 21 Feb 2022 15:18:15 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 1207A12C; Tue, 22 Feb 2022 01:18:31 +0200 (EET) Date: Tue, 22 Feb 2022 02:18:31 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: Dave Hansen , tglx@linutronix.de, mingo@redhat.com, luto@kernel.org, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 02/32] x86/coco: Add API to handle encryption mask Message-ID: <20220221231831.dukkbvjdc5e3mu7c@black.fi.intel.com> References: <20220218161718.67148-1-kirill.shutemov@linux.intel.com> <20220218161718.67148-3-kirill.shutemov@linux.intel.com> <66fcd7e7-deb6-f27e-9fc6-33293ce04f16@intel.com> <20220218213300.2bs4t3admhozonaq@black.fi.intel.com> <7ebd6ba1-85a4-6fee-c897-22ed108ac8b7@intel.com> <20220221222149.jpuwlinaihq6fjwy@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, Feb 21, 2022 at 11:56:00PM +0100, Borislav Petkov wrote: > On Tue, Feb 22, 2022 at 01:21:49AM +0300, Kirill A. Shutemov wrote: > > Well, it actually going to be > > > > cpa.mask_set = enc ? cc_mkenc(__pgprot(0)) : cc_mkdec(__pgprot(0)); > > cpa.mask_clr = enc ? cc_mkdec(__pgprot(0)) : cc_mkenc(__pgprot(0)); > > > > as '0' is not a valid pgprot_t. > > > > Still wonna go this path? > > Why "still"? What's wrong with that? IMO, it makes these statement substantially uglier. -- Kirill A. Shutemov