From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: solarflare.com, ip: 67.231.154.164, mailfrom: tpilar@solarflare.com) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by groups.io with SMTP; Tue, 25 Jun 2019 08:15:00 -0700 X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id B5B84B400AE; Tue, 25 Jun 2019 15:14:58 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 25 Jun 2019 16:14:54 +0100 Received: from ukex01.SolarFlarecom.com ([fe80::40de:58ad:e2bb:6942]) by ukex01.SolarFlarecom.com ([fe80::40de:58ad:e2bb:6942%14]) with mapi id 15.00.1395.000; Tue, 25 Jun 2019 16:14:54 +0100 From: "Tomas Pilar (tpilar)" To: =?iso-8859-1?Q?Philippe_Mathieu-Daud=E9?= , Devel EDK2 CC: "jordan.l.justen@intel.com" , Laszlo Ersek , Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg: Use DxeRuntimeCapsuleLib from DxeCapsuleLibFmp in X64 builds Thread-Topic: [edk2-devel] [PATCH v2] OvmfPkg: Use DxeRuntimeCapsuleLib from DxeCapsuleLibFmp in X64 builds Thread-Index: AQHVKqUCpHRIy8ihbkq+LeDvyFUmaaasZRsAgAAVQjA= Date: Tue, 25 Jun 2019 15:14:54 +0000 Message-ID: References: <6ef09714-fd1f-2f7b-5a1d-fdf5e1a609fb@solarflare.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.17.25.143] x-tm-as-product-ver: SMEX-12.5.0.1300-8.5.1010-24712.000 x-tm-as-result: No-6.855500-8.000000-10 x-tmase-matchedrid: xcONGPdDH5oikhyG+/kfahvgzEPRJaDEWw/S0HB7eoMTiSW9r3PknEfj d+aXilyPc7HQMVzrcjJgXbk4nRy2Cpwa5dKJP/Xoz1H9Spactbj7V9590Rm2YMd4gWcpDnUcrL/ dYc9oKZXZYix/V81kpWD+X7m/bpCi6Ne/nacGH0HiHyvyXeXh5ilj52CeQMtq5lhx0mBJyPG8Lm pxn1vl7ogopU++spx9/SV58XeCizOYXuSElV1g6hmlzjMYni4oqmRbFDx9ddC1eX0jEQ9c6v784 iqX5cil/ye/3Hc9K1oxBEOTJXaR+pvpe1MTgRlkhjlBjwpom1PE7bRw0ZDPdS7PenZRVijSYNtQ Bww5RnRedfIGgCGw9j1zSK31DpQg2+mt/U2r0OD1WO1NzV/CYJY4MP/LOm93B2QWi8BF5SiCkke 44NObBYbJJKgxTyk/X7bicKxRIU23sNbcHjySQd0H8LFZNFG7/nnwJ52QYi89zdFMl2nL2ohB3y p2YHGytzreomIoa0l8/qNPxb/GfvuzOgnU5l9Me46XuDFFaKhFpgyFUXxA1jH/iOuggRDgTvgcm otH810cDaqQwWgpu+f3tOmTVFRyUysIYQW7SlZq9oascRUICTSAm54tW+m8Vlxr1FJij9s= x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No x-tmase-result: 10--6.855500-8.000000 x-tmase-version: SMEX-12.5.0.1300-8.5.1010-24712.000 MIME-Version: 1.0 X-MDID: 1561475699-zmQR7Qt0LOh2 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I mean you need a PCI device with a UEFI driver that implements FMP to test= this. Our Solarflare driver currently does, so I can test this, I've sent = two of our NICs to Peter Jones @ RedHat (If you are interested, I can get y= ou a sample of our adapter along with drivers). Once you have your PCI device and a driver, you make a capsule using Genera= teCapsule, adding the driver alongside your payload.=20 With newish qemu and ovmf you can use PCI passthrough (also called hostdev)= to pass the PCI device entirely into the VM. Then you run CapsuleApp.efi (= built from MdeModulePkg) in UEFI shell in that VM and pass the capsule as f= irst parameter. That's all there is to it. I can share my libvirt XML containing the hostdev configuration if you'd li= ke. Cheers, Tom -----Original Message----- From: Philippe Mathieu-Daud=E9 =20 Sent: 25 June 2019 15:52 To: Devel EDK2 ; Tomas Pilar Cc: jordan.l.justen@intel.com; Laszlo Ersek ; Ard Bieshe= uvel Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg: Use DxeRuntimeCapsuleLib from= DxeCapsuleLibFmp in X64 builds Hi Tomas, On 6/24/19 5:53 PM, Tomas Pilar (tpilar) wrote: > Switching to this library enables capsule support for FMP devices. > This will allow testing of FMP for PCI devices using OVMF and PCI=20 > passthrough as well as software parts of the FMP API. >=20 > Simple tests show that a capsule with an embedded driver now updates=20 > using CapsuleApp. How can I test this? Thanks, Phil. > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Signed-off-by: Tomas Pilar > --- > OvmfPkg/OvmfPkgX64.dsc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index=20 > 39ac791565..4c41e59a75 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -125,7 +125,7 @@ > UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootMan= agerLib.inf > BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf > =20 > FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i > nf > - =20 > CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.in > f > + =20 > + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLi > + b.inf > DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf > DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl= eLib.inf > =20 > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BaseP > eCoffGetEntryPointLib.inf >=20