Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Mar 2020 10:31:39 +1000
From:      Peter Grehan <grehan@freebsd.org>
To:        Alex Troussov <erleya@gmail.com>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: [GPU pass-through] no compatible bridge window for claimed BAR
Message-ID:  <07921dcf-11d5-f440-a42f-d7ec950cab10@freebsd.org>
In-Reply-To: <CAONCVozTcKP_=8AdOCfFNiRQnQ254%2BFVn0ZDRK-V8Zo%2BFFd_qQ@mail.gmail.com>
References:  <CAONCVozTcKP_=8AdOCfFNiRQnQ254%2BFVn0ZDRK-V8Zo%2BFFd_qQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alex,

>> dmesg | grep "no compatible bridge window"
> pci 0000:00:01.0: can't claim BAR 1 [mem 0xd000000000-0xd00fffffff 64bit
> pref]: no compatible bridge window
  ...>  From what I can read from all the info above,
> somehow the requested memory space for BAR1 for that device is
> 0xd000000000-0xd00fffffff which is out of addressable space on the system.

  Yep, that's the issue, and it's a bhyve bug - there is no check to see 
if the 64-bit window is within the addressable range of the processor.

  A quick fix is to change the constant for that range in pci_emul.c

#define PCI_EMUL_MEMBASE64      0xD000000000UL
#define PCI_EMUL_MEMLIMIT64     0xFD00000000UL

   .. to a value that is within the address bits of the CPU, but also 
above guest DRAM.

later,

Peter.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07921dcf-11d5-f440-a42f-d7ec950cab10>