Vladimir Sementsov-Ogievskiy <[email protected]> writes: > Support transferring of TAP state (including open fd). > > Add new property "x-permit-local-migration", which defines whether > local migration is actually permitted for this TAP device. > > Note that local-migration is enabled by global "local" migration > parameter, but individual devices may have additional options to > enable/disable it per device. > > The tricky thing is that we need to know whether to call open/connect in > TAP initialization code, i.e. we need to know the value of migration > parameter "local" when creating the TAP device. For incoming migration, > we can know only for TAP devices created with QMP after setting the > migration parameter with QMP. > > So the full picture is: > > On source, to start outgoing "local" migration you need: > > - migration parameter "local" set to true > - "x-permit-local-migration" TAP option set to true > > If at least one of these options is not set, TAP backend > doesn't participate in migration. > > On target, things are more difficult: > > Same, you need both "local" and "x-permit-local-migration" > be set. And same, if one of them is not set, TAP backend > is initialized as usual, and doesn't accept any incoming > state. > > Additionally, if you are going to set "local", it must be > set before creating the TAP device. If TAP device created > with "local" unset, it initializes as usual. If you enable > "local" after it and start incoming migration, it will fail > in .pre_load handler of TAP backend. > > Moreover, there are interface restrictions: if you create TAP > device when QEMU is in INCOMING state, and both "local" > and "x-permit-local-migration" set, most of TAP options are > not allowed, and script/downscript are required to be explicitly > disabled. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> > Reviewed-by: Ben Chaney <[email protected]>
QAPI schema Acked-by: Markus Armbruster <[email protected]>
