On 02/02/2018 12:04, Peter Xu wrote:
> On Thu, Feb 01, 2018 at 10:01:31PM +0200, Marcel Apfelbaum wrote:
>> Root ports can't be nested, anyway, I suppose the migration should
>> follow the bus numbering order.
> Could I ask whether this is a must? And if yes, why?
Not sure. The above will ensure that if a device needs some parent/bus
info at load time, the information will be valid.
But if it worked until now, maybe most of the devices do not need that.
>> The question now is what happens if the migration is happening before
>> the guest firmware finishes assigning numbers to buses...
> Do you mean that vIOMMU may fetch wrong context entries too?
No, only that the bus number will not be available at load time.
In this case is OK since the firmware will continue to
assign bus numbers at target side.
> Note that as long as vIOMMU DMAR is off globally, vIOMMU will not
> fetch context entries at all. So IMHO this problem should not happen
> during the firmware execution time (assuming that the firmware should
> not enable vIOMMU at all).