From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web08.45186.1622473102227573295 for ; Mon, 31 May 2021 07:58:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fKZ34kky; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622473101; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I+bq8VYZkm7m5eGcOljUgtPAL2VLg5NN/wiozBc/YP0=; b=fKZ34kkyDmmC/11+BopJ0B+HGSKT0H3hgoECffKoKGCXkN7lGPrRmm8xmoxxjT0PiRXUIV IuuSSi5pvAfYojs7lsDyDjmK2JUoTwP4MRR97bGV4zBQqgpFx8Yc6Z0mWxD1GxayE+v09u mr9G0TOLHeIsAGMhriZA94/gMRnLhsY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-0bp2x-pBOdi3cw8Sq5LX6w-1; Mon, 31 May 2021 10:58:19 -0400 X-MC-Unique: 0bp2x-pBOdi3cw8Sq5LX6w-1 Received: by mail-wm1-f71.google.com with SMTP id o10-20020a05600c4fcab029014ae7fdec90so52718wmq.5 for ; Mon, 31 May 2021 07:58:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I+bq8VYZkm7m5eGcOljUgtPAL2VLg5NN/wiozBc/YP0=; b=nseGyThaa4ezKziGqa5EsK9LeXisLqRlvC8I4hx8iI3cf+C6xpITInXTmpN6WB+zGZ aIIdP4aFrEsWlJy9QYuBqxdoaj1sJFZPmfBETcPlmPIzlQUTw4pj2UK3bS0D5DNm7I9w Px3NwiZDfgqf0ywKgu7eBEW9019KEd4oZXqAB9nJFGImYgpoRI9SjgGLIZyGdjKkflfN fMTl+80ugACJ3T8IynPSt1v8liSPALL9afDHUPnSSRn/r08sKUJnm8UDIr7Tr2snzAmK MkT1aCRZhnIJ2P7Z325C7jH0JLLO4gvktS520HdbfqUSDvKDqt6FzGnPTUAehp4nrqER TcJg== X-Gm-Message-State: AOAM531Z25pGWhJHY1x/39DlIk8LchAEydyKaI0E4SIpUq2Vb0SLhMkH 7PKZV8uS+9353ye6UeT0lJS8tYUAuqsfK2i0+WXPMsLh1OC3yLckkf0yIq+2nCVytj7oteuZblm SoZyMDKe8ZxI3VA== X-Received: by 2002:adf:fbce:: with SMTP id d14mr22441389wrs.201.1622473098479; Mon, 31 May 2021 07:58:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx98Ywsm1JCMODZ2ZTyc/HEECwpuIu3wIz/qpzS9xzYsK5FJQTgpEAsgBZ2gBLILtRIfvvT2A== X-Received: by 2002:adf:fbce:: with SMTP id d14mr22441382wrs.201.1622473098314; Mon, 31 May 2021 07:58:18 -0700 (PDT) Return-Path: Received: from [192.168.1.36] (235.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.235]) by smtp.gmail.com with ESMTPSA id j101sm18736027wrj.66.2021.05.31.07.58.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 May 2021 07:58:17 -0700 (PDT) Subject: Re: [PATCH 43/43] OvmfPkg: restrict XenPlatformLib to BdsDxe in the IA32, IA32X64, X64 DSCs To: Laszlo Ersek , devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen References: <20210526201446.12554-1-lersek@redhat.com> <20210526201446.12554-44-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Mon, 31 May 2021 16:58:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210526201446.12554-44-lersek@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 5/26/21 10:14 PM, Laszlo Ersek wrote: > The "OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf" > library instance is used in the following platform DSC files in edk2: > > OvmfPkg/OvmfPkgIa32.dsc > OvmfPkg/OvmfPkgIa32X64.dsc > OvmfPkg/OvmfPkgX64.dsc > OvmfPkg/OvmfXen.dsc > > The Xen customizations are very light-weight in this > PlatformBootManagerLib instance. Isolating them statically, for the sake > of the first three DSC files, would save negligible binary code size, and > would likely worsen code complexity (by way of introducing new internal > interfaces) or blow up source code size (by duplicating almost the entire > lib instance source code). So for now, keep this one bit of Xen dynamism > even on QEMU. > > However, because it's only PlatformBootManagerLib now that uses > XenPlatformLib (for the above-stated enlightenment), restrict the > XenPlatformLib class resolution in the first three DSC files to the only > DXE driver that consumes PlatformBootManagerLib (and therefore > XenPlatformLib): BdsDxe. This will cause a build failure later if someone > attempts to call a XenPlatformLib API (that is, tries to re-introduce Xen > enlightenment) in a different module in these non-Xen DSC files. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Philippe Mathieu-Daudé > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 > Signed-off-by: Laszlo Ersek > --- > OvmfPkg/OvmfPkgIa32.dsc | 2 +- > OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- > OvmfPkg/OvmfPkgX64.dsc | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daude