[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2 3/9] xen/mm: move modify_identity_mmio to global file and drop __init
Hi roger,On Tue, Apr 25, 2017 at 03:32:50AM -0600, Jan Beulich wrote:
> >>> On 25.04.17 at 11:25, <roger.pau@xxxxxxxxxx> wrote:
> > On Tue, Apr 25, 2017 at 10:09:34AM +0100, Julien Grall wrote:
> >> My understanding is BARs may be allocated by the kernel because the firmware
> >> didn't do it. This is the current case on ARM (and I guess x86) where Linux
> >> will always go through the BARs.
> >
> > No, on x86 BARs are allocated by the firmware. Linux or whatever OS will scan
> > the BARs in order to get it's position/size, but will not try to move them
> > AFAIK.
>
> That depends. Firmware is not required to set up all of them (only
> such on devices needed for booting obviously need to be set up).
> And Linux may (voluntarily or forced via command line option) still
> move BARs.
The spec seems more strict here:
"Power-up software needs to build a consistent address map before booting the
machine to an operating system. This means it has to determine how much memory
is in the system, and how much address space the I/O controllers in the system
require. After determining this information, power-up software can map the I/O
controllers into reasonable locations and proceed with system boot."
It does not seem that strict to me. The spec says "power-up software can map".
It is neither must nor should. So it may or may not.
As we spoke on the PCI passthrough design document the firmware is only required to initialize device at used for boot.
So it does not cover hotplug devices nor devices not used for boot.
This is from PCI LOCAL BUS SPECIFICATION, REV. 3.0. I read that as "firmware
will position all the BARs".
Moving the BARs is not a huge problem, this series already allows the guest to
move where the BARs are mapped in it's p2m, allowing a guest to set the initial
BAR position would also be feasible, but I haven't been able to find any device
on my boxes that's not initialized by the firmware, hence it would be hard for
me to test that.
I will have a look on my ARM box when I am back to test it.
Cheers,
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|