Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4433377pxb; Mon, 21 Feb 2022 21:28:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/zjJY8rBDl7/wEn7qqtnQ2XL+jDmbx+6jCg6seU5Y2VuNrkZ7eITa1NiNE/8gM/d0Yfaj X-Received: by 2002:a17:903:1208:b0:149:8b16:ee19 with SMTP id l8-20020a170903120800b001498b16ee19mr21989102plh.11.1645507720638; Mon, 21 Feb 2022 21:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507720; cv=none; d=google.com; s=arc-20160816; b=y26slVSVyu2kYG+W4/Q6T42kZdsLNLZCFQPC97T94TIp5qvaf/VjMK0EvwqU/Ly1Ci dZ4uWXoPzdB+9Kd/3MnO7HqhlQVwLiGeVE67O5Pxi91UKRy4RstpzpSKy/KRjZvRK0A2 31icSfMsXfmv77bkDgr93MGKIhldJydeGf7NZkXID6bM2+WtsNa3IvbdEerRVK315uZg H9655e/78kdsm7QmG5pw18UTJGfhR+oPQAnmN4XAupuvLn48uiUj8aVaIP4d3/aACBSd 6ZV+x3UtFkNRJRM81ATiyQDZavzChrP/i9M0VSQCzV1dW9IfPI2Mzz+ELeovh7y6NT3d iB+Q== 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=OUdPPZ2NT87B88qz4359G2+QNZZ17wqBwZG4z05PFOM=; b=0viThBX9H5u+eToXUrljehAb9By47m5od6CprwIsveEOZWK7OSy6B6hfWjmNSQ2bYA 0bmV/UPDR7ojyoOoqV6s4DRk/Y80lgAuvDd8FbDJe2kjxiFuFWxPrPSap7MKmLJrOHWX G+0NHYXDbo0kCmPrT+QyWyQplAP4BqjlKoFDIGcoEh2D8Kt67Cv0lxRwVxbZwYL4EG+a dZi672aN35kIVLn46jt0pD1HZenCNJFHAz21vuOZf3xeioHZZbvuXO+wntnBbAidOPOM hgkJmJuNrxwMdXMmc3v57i8T4lFbl3ouqT9ovoNjLenEv3ldZAvBDZwNEmuGlB83IKMf yjJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kHZEzHjM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h22si1111462pju.151.2022.02.21.21.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:28:40 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kHZEzHjM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C68C8654E; Mon, 21 Feb 2022 20:57:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235893AbiBUW41 (ORCPT + 99 others); Mon, 21 Feb 2022 17:56:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235524AbiBUW41 (ORCPT ); Mon, 21 Feb 2022 17:56:27 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4957F2459E for ; Mon, 21 Feb 2022 14:56:02 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 C1DB91EC02DD; Mon, 21 Feb 2022 23:55:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645484156; 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=OUdPPZ2NT87B88qz4359G2+QNZZ17wqBwZG4z05PFOM=; b=kHZEzHjMZByJoEOPA/CQLIWjgX8GUt3xLO9lum3tK2I9mA7vQhw4ZP8QbXVUHnKNMrHIk9 8FmGpJYPeXLdxsSFUNMQUZPlgU94wEgATDPByFn/WfJT977VWADjvoFygIkUGKAcdQdYW4 cgPv1HyVAdH7BUFthzr1Wgp5SuDEfPM= Date: Mon, 21 Feb 2022 23:56:00 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" 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: 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=utf-8 Content-Disposition: inline In-Reply-To: <20220221222149.jpuwlinaihq6fjwy@black.fi.intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 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? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette