Received: by 2002:a05:6830:16d2:b0:61c:ac69:ca1b with SMTP id l18csp2110649otr; Mon, 25 Jul 2022 07:33:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlWy4zBXcBs2bwVySr1SeGeLeze9YDh4aAHEMy/U1VGa3i2BIU8lffBcc0XTuLVRU0afj6 X-Received: by 2002:a17:907:1c11:b0:72f:20:e1ea with SMTP id nc17-20020a1709071c1100b0072f0020e1eamr10654816ejc.427.1658759623652; Mon, 25 Jul 2022 07:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658759623; cv=none; d=google.com; s=arc-20160816; b=AofBSvxjZpCUxfyOYwmBIUQw6qzxFOqpwmgTNcLjbaAnxsvO3Tp49g33aA03LcxNbv 3x8VixqNOTLj5osD1veSC+9maKgHb0qUlzLBSVAokYsBINn/UskSAEBwi36Ubn73EFfr 5Se92MzeZP+xgTyVHIFq3DkZgLL+7SiT8PnvIXz2mlOtmGD+9Ue39tKlodq8ackO49b+ LNV1qefebTiUclMqg1gnRgJnyLIFH4bQhkUxCf+b2KlStEfx/Zl0xEOtm0wXRhOoh6nx 9RJGxxqZsTEonKmqbgiZ6YraDAFpPbsLd6bP5/14IzPh0SbeMDVuHqwc9gXpOlOGPm7y P7Fg== 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=eFkyFfYwzdjMe2TFbK6JN+UuA/fBO6Fgi7kfcYlY0nc=; b=D9CKkvnLEhLenYJ7G1Jr7cOPYT8wA9Ga4bhvJKtlzLS0swaV5XZJWPkN0SZtiF8doZ rSLh1U+yZnd5Uf2PPk+dinstJYEV5IBbNKJvRtgjmvdnuY4kE0BcInzNGdHFv7nQBOnb XmCo7LkAgYidEjJi7YDM7ZCgltwUyaP7W4yyllVqp5d7KvRuowK6EyDO8zCZ3iWH7STL f/AT4xMlhvLNSM089wxHuX5/zsjrfv66R+2c4zvLoldykD4RhyjclsnX93J2A+SLE+s8 6XR0PpvBBFBQw2q7iRcSo9oxjnwUHIdjRWrBYnw5AwuSF+F7hXJoxESpTpfd/x4CIbK0 /J1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RxNdjRWI; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he9-20020a1709073d8900b007123952b00dsi44687ejc.100.2022.07.25.07.33.10; Mon, 25 Jul 2022 07:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@alien8.de header.s=dkim header.b=RxNdjRWI; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbiGYOcT (ORCPT + 99 others); Mon, 25 Jul 2022 10:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235549AbiGYOcQ (ORCPT ); Mon, 25 Jul 2022 10:32:16 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F88A167C2; Mon, 25 Jul 2022 07:32:13 -0700 (PDT) Received: from zn.tnic (p200300ea972976f8329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:76f8:329c:23ff:fea6:a903]) (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 DA9011EC0554; Mon, 25 Jul 2022 16:32:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658759527; 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=eFkyFfYwzdjMe2TFbK6JN+UuA/fBO6Fgi7kfcYlY0nc=; b=RxNdjRWIDGQmYeYuo2H9YlPOtj+XPvvNc9IkCJlRaohNd1UK1e+L6ZmctWEneBEvOBjGn4 M8/4UarWyUZRy359qf45+k4Q2Vubx9mXD/e3xYgsKBfpWybZWR1/FofQAFJO8sfT3+ZeWZ P33CncvQHT0Y4iyE2NZLgmcUsCCrjG4= Date: Mon, 25 Jul 2022 16:32:02 +0200 From: Borislav Petkov To: Ashish Kalra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, dovmurik@linux.ibm.com, tobin@ibm.com, michael.roth@amd.com, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, dgilbert@redhat.com, jarkko@kernel.org Subject: Re: [PATCH Part2 v6 05/49] x86/sev: Add RMP entry lookup helpers Message-ID: References: <8f63961f00fd170ba0e561f499292175f3155d26.1655761627.git.ashish.kalra@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8f63961f00fd170ba0e561f499292175f3155d26.1655761627.git.ashish.kalra@amd.com> 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_NONE,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-crypto@vger.kernel.org On Mon, Jun 20, 2022 at 11:02:33PM +0000, Ashish Kalra wrote: > +/* > + * The RMP entry format is not architectural. The format is defined in PPR > + * Family 19h Model 01h, Rev B1 processor. > + */ > +struct __packed rmpentry { That __packed goes... > + union { > + struct { > + u64 assigned : 1, > + pagesize : 1, > + immutable : 1, > + rsvd1 : 9, > + gpa : 39, > + asid : 10, > + vmsa : 1, > + validated : 1, > + rsvd2 : 1; > + } info; > + u64 low; > + }; > + u64 high; > +}; ... here, at the end. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette