From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from netsrv01.beckhoff.com (netsrv01.beckhoff.com [62.159.14.10]) by mx.groups.io with SMTP id smtpd.web12.3485.1649144862865816858 for ; Tue, 05 Apr 2022 00:47:43 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: beckhoff.com, ip: 62.159.14.10, mailfrom: c.koehne@beckhoff.com) Received: from 172.17.5.171 by netsrv01.beckhoff.com (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey256); Tue, 05 Apr 2022 07:47:42 GMT Received: from ex04.beckhoff.com (172.17.5.170) by ex06.beckhoff.com (172.17.5.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.24; Tue, 5 Apr 2022 09:47:39 +0200 Received: from ex04.beckhoff.com ([fe80::c545:54e6:8481:2958]) by ex04.beckhoff.com ([fe80::c545:54e6:8481:2958%6]) with mapi id 15.01.2375.024; Tue, 5 Apr 2022 09:47:39 +0200 From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: Gerd Hoffmann CC: "virtualization@freebsd.org" , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Rebecca Cran , Peter Grehan , "devel@edk2.groups.io" Subject: Re: [PATCH] OvmfPkg: reserve igd memory by E820 Thread-Topic: [PATCH] OvmfPkg: reserve igd memory by E820 Thread-Index: AQHYR+4gR0J1mf/cg0yeubefYjkNkKzff6AAgAAoPdCAAR4jgIAAJajQ Date: Tue, 5 Apr 2022 07:47:38 +0000 Message-ID: <7de01ae500554923941dc5ff9e537637@beckhoff.com> References: <20220404063448.280-1-c.koehne@beckhoff.com> <20220404113830.6novz55zpid3l6fl@sirius.home.kraxel.org> <20220405070639.uq5uiydxhirwu4gb@sirius.home.kraxel.org> In-Reply-To: <20220405070639.uq5uiydxhirwu4gb@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.204.203] x-olx-disclaimer: EX06.BECKHOFF.COM MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, > Where does the intel gop driver come from? Extracted from host > firmware? https://projectacrn.github.io/latest/tutorials/gpu-passthru.html#enable-the= -gvt-d-gop-driver I don't know if it's possible to extract it from host firmware within OS context easily. According to Intel you should ask your board manufacturer. We're producing our own motherboards with an own BIOS. So, I'm reusing the Intel GOP driver from our host BIOS. > Ah, ok, didn't notice the subtile differences with the small letter at > the end. GVT-d + GVT-g is clear then. What is GVT-s ? https://01.org/sites/default/files/downloads/igvt-g/gvtflyer.pdf I'm not familiar with GVT-s. I just know that it exists. > Ideally the guest would allocate and initialize this all itself. > That is hard for the GSM though when it requires an identity > mapping. > > Having the guest check whenever the GSM register points to reserved > memory and if so use it instead of allocating memory should work I > think. To allocate GSM, the guest has to detect the size of GSM. Detecting the size is platform dependent. Writing a small EFI driver to detect the GSM size and to allocate a proper memory region should be easy. https://github.com/torvalds/linux/blob/master/arch/x86/kernel/early-quirks.= c#L353-L460 > Once we have the code for vgabios and PlatformGopPolicy we can roll them > with the intelgop driver into a rom image with EfiRom. Ideally also add > opregion content to the rom somehow. Sounds good. Does these EFI drivers have to be maintained outside of EDKII? Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Bec= khoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075