Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1488723imm; Tue, 3 Jul 2018 12:06:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKpq7ehXsT+A50MpFuL7DmZdnBQvsgCRHKnwo6shvz8DQzOWlzWgG4E3oplfZRWlyXd1fjj X-Received: by 2002:a17:902:a508:: with SMTP id s8-v6mr31727721plq.223.1530644776776; Tue, 03 Jul 2018 12:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530644776; cv=none; d=google.com; s=arc-20160816; b=YaU6+PSFF3n6T0NZ3dR+fsM48DB2wBBdbhtsypdzFPLgyeU9AObLIT9LSe614DgMmj jVrKT5VMX7vP4PvlnMHI01RYzaAY9b5ch5mlKbqW2cabN1+qKec0SgREN3ECS4RnZoSN 7vB7YccUUKv1FDfz9CDzuWsF8jMT48kLqHHVLY/fO7YLuELEUpxI1a71W3DNIq4C5EWB zRqXBiYaSZD1pxYXmeh67wy+ZrLjzriS2U+7ucknFyHK8cPnKcTe6ZxYcU2G0telXWua Aoujj7igplZP8LRb51tgW+1jAaiK+lHzfIuzZzJP8Xfdnb3bHqPk5C0bvleTqOhzJHDF RdLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=zgr8x6OsXOFD6KPJJZfZVTMvy7BHXOGxjZtJWytUAoE=; b=TzaVcxu6LUJI82oIgIaXy49pfofsFqr88qqkjJFfVa8Q4AJ2f6MrSN/KZizO2yR2NY S1C7wPGE4WtKx/g5mz5QxCLcUU42ROZ5uCsQFvUwqDk/YZRLqn4ds7a8B0ghIHxlguNM edxiZE1RU6p/ao3H6JYlpwukYSC0WfN1rJMfsl2i1ZxY/B+atYiGjrJj51b2n/3lhpKb pg2dvAOGoJ4h+fCGdd8n8NmcoyAiDr0r0c+NTEcF6tSdtRZtv+kEqNp7Ek3kUgqXW9WZ mkWGTds0dZkc6kHxPYUBTW1Ck91ExgGNB38gnyl3IlZhly4ET9PIj6FENoV4SVMorTa+ cmsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62-v6si1669258ply.176.2018.07.03.12.06.02; Tue, 03 Jul 2018 12:06:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934580AbeGCTEK (ORCPT + 99 others); Tue, 3 Jul 2018 15:04:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45223 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932698AbeGCTEI (ORCPT ); Tue, 3 Jul 2018 15:04:08 -0400 Received: from p4fea482e.dip0.t-ipconnect.de ([79.234.72.46] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1faQao-0001Ac-8b; Tue, 03 Jul 2018 21:04:02 +0200 Date: Tue, 3 Jul 2018 21:04:01 +0200 (CEST) From: Thomas Gleixner To: Jarkko Sakkinen cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, linux-sgx@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v12 05/13] x86/sgx: architectural structures In-Reply-To: <20180703182118.15024-6-jarkko.sakkinen@linux.intel.com> Message-ID: References: <20180703182118.15024-1-jarkko.sakkinen@linux.intel.com> <20180703182118.15024-6-jarkko.sakkinen@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Jul 2018, Jarkko Sakkinen wrote: > This commit adds arch/x86/include/asm/sgx_arch.h that contains definitions This is not a commit. Simply: Add ..... > for data structures used by the SGX. > > Signed-off-by: Jarkko Sakkinen > Co-developed-by: Suresh Siddha Documentaiton: A Co-Developed-by: states that the patch was also created by another developer along with the original author. This is useful at times when multiple people work on a single patch. Note, this person also needs to have a Signed-off-by: line in the patch as well. Please fix all over the place. > + > +#define SGX_MISC_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL L ? ULL I'd say... > +#define SGX_ATTR_RESERVED_MASK 0xFFFFFFFFFFFFFFC9L Ditto > +#define SGX_SECS_RESERVED1_SIZE 24 > +#define SGX_SECS_RESERVED2_SIZE 32 > +#define SGX_SECS_RESERVED3_SIZE 96 > +#define SGX_SECS_RESERVED4_SIZE 3836 > + > +struct sgx_secs { > + uint64_t size; > + uint64_t base; > + uint32_t ssaframesize; > + uint32_t miscselect; > + uint8_t reserved1[SGX_SECS_RESERVED1_SIZE]; > + uint64_t attributes; Please make these tabular aligned for readility sake > + uint32_t miscselect; > + uint8_t reserved1[SGX_SECS_RESERVED1_SIZE]; > + uint64_t attributes; Hmm? All over the place... > +enum sgx_tcs_flags { > + SGX_TCS_DBGOPTIN = 0x01, /* cleared on EADD */ Please do not use tail comments. Either put the comment above the define or use kernel doc. > +}; > + > +#define SGX_TCS_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL See above. > +#define SGX_SECINFO_PERMISSION_MASK 0x0000000000000007L > +#define SGX_SECINFO_PAGE_TYPE_MASK 0x000000000000FF00L > +#define SGX_SECINFO_RESERVED_MASK 0xFFFFFFFFFFFF00F8L Ditto Thanks, tglx