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.9161.1635952015695075688 for ; Wed, 03 Nov 2021 08:06:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NDZhtMsV; 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=1635952014; 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=LJIKj4dQM4k5dhE/Dl24Hk2a588VosAdHEWsjmyxJIM=; b=NDZhtMsV1YHoZHW8mi3vIooynwE1grdK1jzUfg92FHRLtJ936nAHN50iA3oKOykUgpHYdZ yQ9+T6nFrcNtZUhnNTpt4d6a+Ed9eNeasHWehNitvbwaxXEy3pSy7HhTmMxhVaW8TkId+g 1Nuw5ql+WARfvjAXB0xPalYDM4blbYw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-336-rBxQLTdTOFi-jxnB2zMCcA-1; Wed, 03 Nov 2021 11:06:51 -0400 X-MC-Unique: rBxQLTdTOFi-jxnB2zMCcA-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 B34D1100B780; Wed, 3 Nov 2021 15:06:50 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7187719723; Wed, 3 Nov 2021 15:06:49 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 92EE318221B7; Wed, 3 Nov 2021 16:06:27 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , Gerd Hoffmann , Jordan Justen , Ard Biesheuvel Subject: [PATCH v2 4/5] OvmfPkg/Microvm/virtio: add virtio-mmio support Date: Wed, 3 Nov 2021 16:06:26 +0100 Message-Id: <20211103150627.3133189-5-kraxel@redhat.com> In-Reply-To: <20211103150627.3133189-1-kraxel@redhat.com> References: <20211103150627.3133189-1-kraxel@redhat.com> MIME-Version: 1.0 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-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Add virtio-mmio support (VirtioMmioDeviceLib and VirtioFdtDxe). With this patch added and a new enough qemu version (6.2+) edk2 will detect virtio-mmio devices, so it is possible to boot from storage (virtio-blk, virtio-scsi) or network (virtio-net). https://bugzilla.tianocore.org/show_bug.cgi?id=3689 Signed-off-by: Gerd Hoffmann --- OvmfPkg/Microvm/MicrovmX64.dsc | 2 ++ OvmfPkg/Microvm/MicrovmX64.fdf | 1 + 2 files changed, 3 insertions(+) diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 27d2024266c2..85afdca9beba 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -233,6 +233,7 @@ [LibraryClasses.common] SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf + VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf [LibraryClasses.common.SEC] QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf @@ -743,6 +744,7 @@ [Components] # device tree # EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf + OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf # # SMBIOS Support diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf b/OvmfPkg/Microvm/MicrovmX64.fdf index cc8892a459ee..0bf20a702764 100644 --- a/OvmfPkg/Microvm/MicrovmX64.fdf +++ b/OvmfPkg/Microvm/MicrovmX64.fdf @@ -278,6 +278,7 @@ [FV.DXEFV] INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf +INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf !if $(TOOL_CHAIN_TAG) != "XCODE5" INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf -- 2.31.1