From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3042BAC0700 for ; Fri, 22 Nov 2024 00:23:39 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LfCB3D0e6kUDjbEQjekp3VEoTfkMA9g1WzuW+5z23RU=; c=relaxed/simple; d=groups.io; h=Subject:To:From:User-Agent:MIME-Version:Date:References:In-Reply-To:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1732235019; v=1; x=1732494218; b=OKbRKOFVjkJkKRtp/QVNgZX+hdcNluliuw+RQ0lwDFw5lxwhirKfsWt/fPIlKMgwjEqHF2W7 TD1kq1AiD0VSjn81uJaCSqnAUzX8As2nvboIRexWd6lUe0aKeYSluXTfuNZFuktb8bie6uyEOuY Oo0Gvu+CDX3nfAKhnEGji2RrBtU09SFXIaxRgGgiAVU8b0pDd0pY6lKaSP1kav9B7M+p0juQgNR Cq2nAsDndVhq0kyMz9gjrR7meDocj9GZFhwrZv8ECxRS5doXmorF+U2jbB31zcvYTL3ppPzZjXT GQd5RD+S9foTwjj1GUsVguaS0rfL8gGh8iMGnE3/2L2dg== X-Received: by 127.0.0.2 with SMTP id XIqlYY7687511xMrh8aPveqB; Thu, 21 Nov 2024 16:23:38 -0800 Subject: Re: [edk2-devel] [BUG] Extremely slow boot times with CPU and GPU passthrough and host phys-bits > 40 To: "Gerd Hoffmann" , devel@edk2.groups.io From: "mitchell.augustin via groups.io" X-Originating-Location: Waterloo, Illinois, US (65.87.55.115) X-Originating-Platform: Linux Chrome 129 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 21 Nov 2024 16:23:32 -0800 References: In-Reply-To: Message-ID: <24555.1732235012902185669@groups.io> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mitchell.augustin@canonical.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: F9FCHccoFQbbkErP1JcSI6Pgx7686176AA= Content-Type: multipart/alternative; boundary="t3QtdZI8m0nrVTXBIgQx" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=OKbRKOFV; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --t3QtdZI8m0nrVTXBIgQx Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thanks for the suggestions, Gerd. > '-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=3Doff' Unfortunatly, this did not result in any change in boot time. > '-cpu $name,host-phys-bits=3Don,host-phys-bits-limit=3D$bits' -cpu host,host-phys-bits=3Don,host-phys-bits-limit=3D40 does result in the = desired very fast boot time, but I get errors when I try to load the GPU dr= iver: NVRM: BAR0 is 0M @ 0x0 (PCI:0000:06:00.0) NVRM: This PCI I/O region assigned to your NVIDIA device is invalid: ** *This is the same thing I see when trying to load the driver on OVMF versio= ns without the DynamicMMIOWindowSize patch as well, but with those versions= , I don't get the errors and everything works if I boot with `pci=3Drealloc= pci=3Dnocrs`. That is not the case here, when I just override the physbits= .* *Two possible workarounds come to mind:* * *Is there some command line option that would allow me to override the MM= IO window size? (basically bypassing the DynamicMMIOWindowSize heuristic wi= thout having to switch OVMF versions)* * *Alternatively, is there a way to override the virtual address bits in th= e same way as we can for the physical bits, via some command line option?* * *I ask this because I notice that when I disable=C2=A0host passthrough *(= which works with my GPUs and results in a fast boot if `pci=3Drealloc pci= =3Dnocrs` are used)* , my VM shows "Address sizes: 40 bits physical, 48 bit= s virtual", but when I use host passthrough and only override the physbits = (which fails as described above), my VM shows "Address sizes: 40 bits physi= cal, 57 bits virtual". (so I'm wondering if that could be a factor here.)* * *(context: we do need CPU host passthrough for our use case)* Thanks, Mitchell Augustin -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120814): https://edk2.groups.io/g/devel/message/120814 Mute This Topic: https://groups.io/mt/109651206/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --t3QtdZI8m0nrVTXBIgQx Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Thanks for the suggestions, Gerd.
 
> '-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=3Doff'
 
Unfortunatly, this did not result in any change in boot time.
 
> '-cpu $name,host-phys-bits=3Don,host-phys-bits-limit=3D$bits'
 
-cpu host,host-phys-bits=3Don,host-phys-bits-limit=3D40 does result in= the desired very fast boot time, but I get errors when I try to load the G= PU driver: 

NVRM: BAR0 is 0M @ 0x0 (PCI:0000:06:00.0)

NVRM: This PCI I/O region assigned to your NVIDIA de= vice is invalid:

 
This is the same thing I see wh= en trying to load the driver on OVMF versions without the DynamicMMIOWindow= Size patch as well, but with those versions, I don't get the errors and eve= rything works if I boot with `pci=3Drealloc pci=3Dnocrs`. That is not the c= ase here, when I just override the physbits.
 
Two possible workarounds come t= o mind:
  1. Is there some command line optio= n that would allow me to override the MMIO window size? (basically bypassin= g the DynamicMMIOWindowSize heuristic without having to switch OVMF version= s)
  2. Alternatively, is there a way to= override the virtual address bits in the same way as we can for the physic= al bits, via some command line option?
    • I ask this because I notice that= when I disable host passthrough
      • (context: we do need CPU host pa= ssthrough for our use case)
 
Thanks,
Mitchell Augustin
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#120814) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--t3QtdZI8m0nrVTXBIgQx--