From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web09.9736.1631099210431112102 for ; Wed, 08 Sep 2021 04:06:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=t4Ha43rW; spf=pass (domain: nuviainc.com, ip: 209.85.128.44, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f44.google.com with SMTP id u19-20020a7bc053000000b002f8d045b2caso1221127wmc.1 for ; Wed, 08 Sep 2021 04:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2yC2N68OOmeGaNmR4ygas56bSe2VZiVZU3mZEMiqTHQ=; b=t4Ha43rWuTte2Rb6ztGmDuo3zrR0ozWI83lLG9dnubWGDuCHMu7bMge6NHXN0QiEpn OFJ5V551H14zs3LSI78hrnC8iecYZQ0iY6aBV42lq885tFOF5K1Qk/nykBkRyJcUaVkT nBVNs3QcqnFUPiWAv1mE9sVt6xJURHVR4BGxMg8dy81B0TfpcBsdt/zj0Rmd3Wq+VODz KN9v88RVw2/6gcLSm3d+qhazHHiHhfAT4Dd5Mh8SZ3WpIu3TY4Z7V6lACBtHau640MWg imPY3P6Ssm6hC2GSWfc7N2/lDCssBcRizlkQHAXqm7OBEbhfwhcD097PW3kpTDk381Qv DC0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2yC2N68OOmeGaNmR4ygas56bSe2VZiVZU3mZEMiqTHQ=; b=Tp3aIDrZL9Fys/177Bxnbg2jGWrCPjXZ745uwJdHThBpMVYMWbQyCyd2bjO9eh1+MO GemYMOiKrLDm+v7WbFwvO+W+iKHCozVHX3/5CpnSjyg4RFXEqI5ATevJTMlCFNCIqjVm 6pK1lZ5hCIvXKul4hbLIzcxbLldreV7hRUyz/yrFBEM7WPlcwCplVRruhOfCscB00QXt AalbYGPIfQ4lcND1elGOVxzf/Hl9TFp86evO7hfusfJgEeoFYFS46TRAp06/NuSqIWgK g7hms1w89k2uLXSyo2ksIOc43tvgjyz2PDOtDIwqXYgm2yaVbgibfaVheJ9ZGvSNlXiz FW4Q== X-Gm-Message-State: AOAM532IIU1wBUN0sK5zgh0jcq2uHSnxMAlEjn/qHLTi6QUflvSVtlPh QgiYfHU8/Y+YUXSzyT8lx2x+bQ== X-Google-Smtp-Source: ABdhPJymviilIHxidaFqg65Ltltv3WOmBGDXvRDKN/q9KELIa2OM+3e5DaljlebiuRDRY53AcvtONw== X-Received: by 2002:a1c:a187:: with SMTP id k129mr2994230wme.66.1631099208822; Wed, 08 Sep 2021 04:06:48 -0700 (PDT) Return-Path: Received: from leviathan (cpc92314-cmbg19-2-0-cust559.5-4.cable.virginm.net. [82.11.186.48]) by smtp.gmail.com with ESMTPSA id y15sm2147123wmi.18.2021.09.08.04.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 04:06:48 -0700 (PDT) Date: Wed, 8 Sep 2021 12:06:46 +0100 From: "Leif Lindholm" To: Gerd Hoffmann Cc: devel@edk2.groups.io, Jiewen Yao , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Michael D Kinney , Andrew Fish , Jordan Justen , Julien Grall , Anthony Perard , Ard Biesheuvel , Stefan Berger Subject: Re: [PATCH v3 11/19] OvmfPkg/Microvm: PlatformPei/MemDetect tweaks Message-ID: <20210908110646.zuvhetarmi2bvszb@leviathan> References: <20210908090119.2378189-1-kraxel@redhat.com> <20210908090119.2378189-12-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: <20210908090119.2378189-12-kraxel@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 08, 2021 at 11:01:11 +0200, Gerd Hoffmann wrote: > Skip host bridge setup on microvm. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599 > Signed-off-by: Gerd Hoffmann > Acked-by: Jiewen Yao > --- > OvmfPkg/PlatformPei/MemDetect.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c > index 2c2c4641ec8a..d736b85e0d90 100644 > --- a/OvmfPkg/PlatformPei/MemDetect.c > +++ b/OvmfPkg/PlatformPei/MemDetect.c > @@ -135,6 +135,10 @@ QemuUc32BaseInitialization ( > UINT32 LowerMemorySize; > UINT32 Uc32Size; > > + if (mHostBridgeDevId == 0xffff /* microvm */) { > + return; > + } > + This, and the same conditional in the subsequent patch, weirds me out a bit. This doesn't tell us we're on microvm, it tells us the device ID is invalid. Since we know at compile-time that we want to skip this function, could we achieve that some other way? / Leif > if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { > // > // On q35, the 32-bit area that we'll mark as UC, through variable MTRRs, > -- > 2.31.1 >