All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruben <rubenbryon@gmail.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [question]: BAR allocation failing
Date: Fri, 16 Jul 2021 09:14:33 +0300	[thread overview]
Message-ID: <CALdZjm6BT6vjC47n9bGRak=6mGTb5Ay9XjM6diEYS=e6NQP-MQ@mail.gmail.com> (raw)
In-Reply-To: <20210715170811.5f4f793a.alex.williamson@redhat.com>

My lord, can't believe that was the answer, all GPUs are successfully
passed through now, thanks Alex!
In case it is of interest, here's the resulting dmesg:
https://drive.google.com/file/d/1b0f4bWPhJXifC8j9_NtB34R7GBA8Dky3/view

For the gal/chap finding this thread in 12 years trying to make an old
machine work:
In the qemu command I added "-cpu host", current kernel parameters
were "rcutree.rcu_idle_gp_delay=1 mem_encrypt=off iommu=off
amd_iommu=off pci=realloc=off,check_enable_amd_mmconf".

On to the next chapter of this machine, which is to enable MMIO
filtering by the hypervisor which is required to make VMs with less
than all resources/GPUs. Luckily NVidia provides 0 detailed
documentation on the matter.

Op vr 16 jul. 2021 om 02:08 schreef Alex Williamson
<alex.williamson@redhat.com>:
>
> On Thu, 15 Jul 2021 18:05:06 -0500
> Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> > On Thu, Jul 15, 2021 at 11:39:54PM +0300, Ruben wrote:
> > > Thanks for the response, here's a link to the entire dmesg log:
> > > https://drive.google.com/file/d/1Uau0cgd2ymYGDXNr1mA9X_UdLoMH_Azn/view
> > >
> > > Some entries that might be of interest:
> >
> > ACPI tells us the host bridge windows are:
> >
> >   acpi PNP0A08:00: host bridge window [mem 0x000a0000-0x000bffff window] (ignored)
> >   acpi PNP0A08:00: host bridge window [mem 0x80000000-0xafffffff window] (ignored)
> >   acpi PNP0A08:00: host bridge window [mem 0xc0000000-0xfebfffff window] (ignored)
> >   acpi PNP0A08:00: host bridge window [mem 0x800000000-0xfffffffff window] (ignored)
> >
> > The 0xc0000000 window is about 1GB and is below 4GB.
> > The 0x800000000 window looks like 32GB.
> >
> > But "pci=nocrs" means we ignore these windows ...
> >
> > > pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffff]
> >
> > and instead use this 1TB of address space, from which DRAM is
> > excluded.  I think this is basically everything the CPU can address,
> > and I *think* it comes from this in setup_arch():
> >
> >   iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1;
> >
> > But you have 8 GPUs, each of which needs 128GB + 32MB + 16MB, so you
> > need 1TB + 384MB to map them all, and the CPU can't address that much.
> >
> > Since you're running this on qemu, I assume x86_phys_bits is telling
> > us about the capabilities of the CPU qemu is emulating.  Maybe there's
> > a way to tell qemu to emulate a CPU with more address bits?
>
> "-cpu host" perhaps
>

      reply	other threads:[~2021-07-16  6:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 21:32 [question]: BAR allocation failing Ruben
2021-07-14 22:03 ` Alex Williamson
2021-07-14 22:43   ` Ruben
2021-07-15 14:49     ` Bjorn Helgaas
2021-07-15 20:39       ` Ruben
2021-07-15 21:50         ` Keith Busch
2021-07-15 23:05         ` Bjorn Helgaas
2021-07-15 23:08           ` Alex Williamson
2021-07-16  6:14             ` Ruben [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALdZjm6BT6vjC47n9bGRak=6mGTb5Ay9XjM6diEYS=e6NQP-MQ@mail.gmail.com' \
    --to=rubenbryon@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.