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.web12.30358.1641815680464042458 for ; Mon, 10 Jan 2022 03:54:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QRQGeOwj; 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=1641815679; 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=+hgIhQvrLUcsNPNrf/cqsYHzrNEg917gDkdEA/mP608=; b=QRQGeOwjA/gU1mFRPl3B9LL07A/JdXiMNGdkiDPc5kw5ICIkw02ACMIoHr0XhfFWn1acxS iD6oQWznpcgzQ0bGR+36s19W4Eo9bAcFKb/MBLRxt/2I/pm8k6MN3uk7ibpNA6LSmGACFQ 4782usL9LBNGqJUVX/Cn5Yhv/rG/dw0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-568-ypDsnhBFN3iXAEQYHyAGIw-1; Mon, 10 Jan 2022 06:54:34 -0500 X-MC-Unique: ypDsnhBFN3iXAEQYHyAGIw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 09F60100CCC0; Mon, 10 Jan 2022 11:54:33 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D8FA2B4B8; Mon, 10 Jan 2022 11:54:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BDD1118003A0; Mon, 10 Jan 2022 12:54:30 +0100 (CET) Date: Mon, 10 Jan 2022 12:54:30 +0100 From: "Gerd Hoffmann" To: "Boeuf, Sebastien" Cc: "Yao, Jiewen" , "devel@edk2.groups.io" Subject: Re: Creating new target for Cloud Hypervisor Message-ID: <20220110115430.abcu55ox5l44bajl@sirius.home.kraxel.org> References: <20220110104542.hrfoi5ndwdeh3lal@sirius.home.kraxel.org> <145e521b95cb383c1f343d46acca2faf70fad761.camel@intel.com> MIME-Version: 1.0 In-Reply-To: <145e521b95cb383c1f343d46acca2faf70fad761.camel@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, > > So, what problem you are facing which makes you think a separate > > target would work better?  The timer thing should be a non-issue as > > we plan to switch over OvmfPkgX64 to use apic timer anyway. > Well I have a problem regarding SerialDxe because it breaks a bit QEMU > since adding it without removing the PciSerial registers two ways of > reading from serial. Gotcha. > From microvm, you simply removed PciSerial since you know it doesn't > support LPC bridge, but I can't do the same here. Can you think of > any other way of properly handling this with a runtime switch? Well, tianocore isn't really designed for this. Typically image builds have to handle one specific platform only, so that kind of runtime switches is not needed and support for it is not really present in tianocore. Virtualization is kind of special here as we have a single build supporting multiple platforms (pc & q35 qemu machine types with various config variants like sev/tdx on/off) to avoid the number of builds for qemu explode and to make things less confusing for users. So the ovmf runtime checks are open-coded in many places (all those switch (mHostBridgeDevId) statements for example). There is ovmf-specific code for PCI where alot of the code only exists to allow for runtime-switching between PCI (pc) and PCIe (q35). So, yes, I guess it makes sense to have a separate target. Avoids the Serial issue, you can drop drivers, you can probably also simplify PCI as I suspect you don't need the PCI/PCIe runtime switching, ... take care, Gerd