From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.14877.1678697153322978287 for ; Mon, 13 Mar 2023 01:45:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MMgy74Ti; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678697152; 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: in-reply-to:in-reply-to:references:references; bh=w63i2lxGdDOGIz3xE1NJbkTFWVWAgNtcNqy/hQMc+KM=; b=MMgy74TilW6oKt78xp5UGwg5j9UJxmBhmZpOHEimOeuptVA1QHCt2xsjWmaQpVPRojrzCb vjKx/r8y4ijI34AyZvZDKTYBozDDlzDdAXHHtrinf4A7auGzSzwnocy4y9DCHT5Q1h+O7O d6HwPGorEWG5Jj78yC1AECXRMgLejNo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-178-hr4dbEegONmY29oh2ZTvHQ-1; Mon, 13 Mar 2023 04:45:49 -0400 X-MC-Unique: hr4dbEegONmY29oh2ZTvHQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96EFD80280D; Mon, 13 Mar 2023 08:45:48 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 680D440C6E68; Mon, 13 Mar 2023 08:45:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 05FDA1801CF6; Mon, 13 Mar 2023 09:45:47 +0100 (CET) Date: Mon, 13 Mar 2023 09:45:46 +0100 From: "Gerd Hoffmann" To: "Ni, Ray" Cc: Tom Lendacky , "devel@edk2.groups.io" , "Dong, Eric" , "Kumar, Rahul R" , Michael Roth , Ashish Kalra Subject: Re: [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Message-ID: <20230313084546.artxw4yzggxd4rrb@sirius.home.kraxel.org> References: <0ae6206c682709f09214222bd597d4aa6578c56a.1678467840.git.thomas.lendacky@amd.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 13, 2023 at 08:28:57AM +0000, Ni, Ray wrote: > > > > +#define IS_ALIGNED(x, y) ((((UINTN)(x) & (y - 1)) == 0)) > > 1. Can you use the existing macro ALIGN_POINTER() defined in Base.h? Having copies of this all over the tree is indeed a bad idea. See https://edk2.groups.io/g/devel/message/100695 which adds this and a few more commonly used macros to Base.h. Can we get that reviewed and merged please? thanks & take care, Gerd