On 24/07/2017 17:39, Alexander Bezzubikov wrote:
2017-07-24 12:42 GMT+03:00 Gerd Hoffmann <kraxel@redhat.com mailto:kraxel@redhat.com>:
On Sun, 2017-07-23 at 22:44 +0300, Alexander Bezzubikov wrote: > By the way, any ideas on how to avoid 'bus overstealing' would > be greatly appreciated. > Static BIOS variable isn't applicable since its value isn't saved > across reboots. I think the reservation hints should be a absolute number, not a increment. i.e. if qemu suggests to reserve three extra bus numbers seabios should reserve three, no matter whenever there are zero, one, two or three child busses present. And I guess seabios should interpret that as minimum, so in case it finds five child busses it will allocate five bus numbers of course ...
Personally I have nothing against it. Marcel, Michael, what do you think?
Sounds good to me.
Same with the other limit hints. If the hint says to allocate 16M, and existing device bars sum up to 4M, allocate 16M (and therefore leave 12M address space for hotplug). If the device bars sum up to 32M, allocate that. While being at it: I have my doubts the capability struct layout (which mimics register layout) buys us that much, seabios wouldn't blindly copy over the values anyway. Having regular u32 fields looks more useful to me.
Again, if nobody has any objections, I can change it in v3.
I also had my reservations about prev layout, let's see if it will look cleaner.
Thanks, Marcel
cheers, Gerd
-- Alexander Bezzubikov