Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2044013imw; Sat, 16 Jul 2022 23:16:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sLJIFAmwK3/8nRtqX1ZONpZMy/oppGg/uCFY7uoJpXt79osBqfq1/QhY/pvLh0itWsSYMv X-Received: by 2002:a17:90b:4a47:b0:1f0:3f92:8c80 with SMTP id lb7-20020a17090b4a4700b001f03f928c80mr25046594pjb.199.1658038569668; Sat, 16 Jul 2022 23:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658038569; cv=none; d=google.com; s=arc-20160816; b=BZ9WF+0D9vYi8PT7PkRtLUieojPQBhLaI0p1pMjg7+GcL4qGZRiNzHtsAQXVZhL7y6 a+L+1ZY99i1IXYlthO/bwNvLx/qeJhZ+xCBDfweDq7lXc/+jbYzyFJV9jlzGX59tR9J3 nlujXTR8tECTH+/kEad7GpnWblpNE6bh370si1NHsZ0INg9boIZ7yF6n0WE1DjyqVqn2 WSaIWqKMFH2RC9+0KbYwHa3jIdWNLCXMX0gffaYKzBJgqcF5g4Eltq5+FBrCUI7yvYEg d1+VW9IKdua8dHnufLKAFvm2ji94VU4Cf9GpX4L6YZYYzEet8/BAK8thXk6HCQdsWUvv 6YfQ== 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:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature:dkim-filter; bh=2oBoSTWNfbYjfQp5I53ct47lO8uP5kHvPPZlw0O0iT4=; b=gLpMWQalWDW6LjjP8YAMY7X4ivxYvlVTv2AM9+wsBM21oTm3CrZOpmD6Y1f/2aXWUU ay19N+NYne6/6vsbE4HJpxqi0ApGMsTlSO6IqePatl21uDKwANlbKz3ZlLnOFhGw1aCs uI3gzSnBCwz4KEt4ULaXTQwRLjbDYLFcxgbypEBojUt6X1IR/xANMDY9s8cSOkxtkhVw vAsBL290/xYh1I9Awfhpmf7awftbTiiFIpvDi20h6ogcqSJi6KmWtprup5h1LrT+NbXF vLvNxlMdDJZWyrJYXwdXxKGXqrVb80Ty7T0UJ+kxuBtzKuhfxypM2I1tXEmVgscGcp+n p3lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2022070501 header.b=x9NX+33N; 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=zytor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a1709027b8b00b0016a5384072asi10623503pll.138.2022.07.16.23.15.32; Sat, 16 Jul 2022 23:16:09 -0700 (PDT) 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=@zytor.com header.s=2022070501 header.b=x9NX+33N; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbiGQFQe (ORCPT + 99 others); Sun, 17 Jul 2022 01:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiGQFQc (ORCPT ); Sun, 17 Jul 2022 01:16:32 -0400 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8BA21BEB4 for ; Sat, 16 Jul 2022 22:16:31 -0700 (PDT) Received: from [IPv6:::1] ([IPv6:2601:646:8600:40c1:ae5e:3057:2e2c:7f5b]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.15.2) with ESMTPSA id 26H5FeWZ725281 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Sat, 16 Jul 2022 22:15:40 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 26H5FeWZ725281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2022070501; t=1658034943; bh=2oBoSTWNfbYjfQp5I53ct47lO8uP5kHvPPZlw0O0iT4=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=x9NX+33NijYF6F4JSe2y1tPLDO3Vv0GKcb2L66yq+xscfClCQYR3I0FKpfj+dnHXH d7BHMb3RN1f+jpj5lZyLsoxAvENnGI+BDriJ+MekMAcKOf8oXYP1/DI2qZrnXiAx/Z 1rKyWVEzlND39q2MTT55L2fCG4Xgvvnuglu7tQmZQMuieim0Ipe+aGD3a+ItWQdWeI z74RwIF3MX13sn9vkrl54IpGsQMq5Tzpwm9MsMLf1vYfqUDpx7xFiNEB+gftJHYS31 YIb/nb6phxefYclwPAukUrvcU4CzYiEdYMrl8b7K7w9pi6jthuuMt5zEeWk9DaBXCv EfPsfdx3helig== Date: Sat, 16 Jul 2022 22:08:09 -0700 From: "H. Peter Anvin" To: Brijesh Singh , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org CC: brijesh.singh@amd.com, Ingo Molnar , Joerg Roedel , Tom Lendacky , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v12_29/46=5D_x86/boot=3A_Add_Co?= =?US-ASCII?Q?nfidential_Computing_type_to_setup=5Fdata?= User-Agent: K-9 Mail for Android In-Reply-To: <91ed3c18-6cff-c6d4-a628-81f1f71b21dc@amd.com> References: <20220307213356.2797205-1-brijesh.singh@amd.com> <20220307213356.2797205-30-brijesh.singh@amd.com> <87v8vlzz8x.ffs@tglx> <91ed3c18-6cff-c6d4-a628-81f1f71b21dc@amd.com> Message-ID: <496A3732-C91B-48B0-9DBB-126108174D93@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 On April 7, 2022 7:57:22 AM PDT, Brijesh Singh = wrote: > > >On 4/6/22 16:19, Thomas Gleixner wrote: >> On Mon, Mar 07 2022 at 15:33, Brijesh Singh wrote: >>> =20 >>> +/* >>> + * AMD SEV Confidential computing blob structure=2E The structure is >>> + * defined in OVMF UEFI firmware header: >>> + * https://github=2Ecom/tianocore/edk2/blob/master/OvmfPkg/Include/Gu= id/ConfidentialComputingSevSnpBlob=2Eh >>> + */ >>> +#define CC_BLOB_SEV_HDR_MAGIC 0x45444d41 >>> +struct cc_blob_sev_info { >>> + u32 magic; >>> + u16 version; >>> + u16 reserved; >>> + u64 secrets_phys; >>> + u32 secrets_len; >>> + u32 rsvd1; >>> + u64 cpuid_phys; >>> + u32 cpuid_len; >>> + u32 rsvd2; >>> +}; >>=20 >> Shouldn't this be packed? >>=20 > >Yep, to avoid any additional compiler alignment we should pack it=2E > >thanks It shouldn't be *necessary*, any more than it is necessary for kernel-user= space structures, since EFI is a C-based ABI=2E On x86 it doesn't hurt, ei= ther, though, so might as well=2E