xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* PCIe devices that are hotplugged after MMIO has been setup fail due to _CRS not covering 64-bit area
@ 2016-09-27 14:43 Konrad Rzeszutek Wilk
  2016-09-28  9:21 ` Jan Beulich
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-09-27 14:43 UTC (permalink / raw)
  To: xen-devel, jbeulich

Hey!

If the guest is booted with 'pci' we nicely expand the MMIO region below
4GB and try to fit in the BARs in there. If that fails (not enough
space) we move it above the memory (64-bit). And throughout all of this
we also update the _CRS field to cover these ranges.

(Note, I need to check if the 64-bit area is also set, I think it is).

But the situation is different if we hot-plug a device that has too big
BAR to fit in the MMIO region. We move it in the 64-bit area but we
don't update the _CRS. Which means that Linux will complain (unless
booted with pci=nocrs)). Not sure about Windows but I would assume so
to.

I was wondering what would be a good way to solve this? I looked at some
Dell machines to see how they deal with hotplug PCIe devices and they
just declared all the memory in the _CRS (including RAM).

We could do a hybrid - during bootup make the _CRS region have entry from
end of RAM to .. end of memory?

Or perhaps add some extra logic between QEMU and ACPI AML to expand (or
perhaps modify the last _CRS entry) when PCIe devices are hotplugged?

I am wondering what folks think is the best way going forward?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-02 10:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27 14:43 PCIe devices that are hotplugged after MMIO has been setup fail due to _CRS not covering 64-bit area Konrad Rzeszutek Wilk
2016-09-28  9:21 ` Jan Beulich
2016-09-28  9:52   ` Konrad Rzeszutek Wilk
2016-10-12 21:15   ` Konrad Rzeszutek Wilk
2016-10-13  9:20     ` Jan Beulich
2016-11-01 14:39       ` Konrad Rzeszutek Wilk
2016-11-01 14:56         ` Konrad Rzeszutek Wilk
2016-11-02 10:14         ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).