[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 20/26] kvm: vmi: intercept live migration
From: |
Adalbert Lazăr |
Subject: |
Re: [RFC PATCH v1 20/26] kvm: vmi: intercept live migration |
Date: |
Tue, 28 Apr 2020 17:38:40 +0300 |
User-agent: |
void |
On Tue, 28 Apr 2020 14:43:20 +0100, "Dr. David Alan Gilbert" <address@hidden>
wrote:
> * Adalbert Lazăr (address@hidden) wrote:
> > One use case is to do VM introspection all the time the guest is running.
> > From the user perspective, the pause/suspend/shutdown/snapshot/migrate
> > commands should work regardless if the VM is currently introspected
> > or not. Our first option was to delay these commands for a couple of
> > seconds when the VM is introspected, while the introspection app reverts
> > its changes, without blocking the vCPUs.
>
> Ah OK, so it's not really about blocking it completely; just delaying it
> a bit; in that case add_blocker is the wrong thing.
>
> > I'll see if we can mix the migrate notifier with migrate_add_blocker(),
> > or add a new migration state. To block the migration (with an error)
> > is our second option, because the user doing this might not be allowed
> > to stop the VM introspection.
>
> Maybe the right thing is to do something just like
> MIGRATION_STATUS_WAIT_UNPLUG, it's right near the start of the thread.
> Again it's job is just to make the migration wait while it does some
> stuff before it can let migration continue.
>
This is it! Thank you, Dave.
We already register a VMStateDescription structure to save the VM start time
([18/26] kvm: vmi: store/restore 'vm_start_time' on migrate/snapshot [1]).
All we have to do is setup the dev_unplug_pending callback and
return true when the introspection channel is still active.
[1]: https://lore.kernel.org/qemu-devel/address@hidden/
- [RFC PATCH v1 16/26] kvm: vmi: intercept pause/resume, (continued)
- [RFC PATCH v1 16/26] kvm: vmi: intercept pause/resume, Adalbert Lazăr, 2020/04/14
- [RFC PATCH v1 25/26] kvm: vmi: extend handshake to include the e820 table, Adalbert Lazăr, 2020/04/14
- [RFC PATCH v1 26/26] kvm: vmi: add 'command' and 'event' properties, Adalbert Lazăr, 2020/04/14
- [RFC PATCH v1 10/26] kvm: vmi: add the handshake with the introspection tool, Adalbert Lazăr, 2020/04/14
- [RFC PATCH v1 20/26] kvm: vmi: intercept live migration, Adalbert Lazăr, 2020/04/14
Re: [RFC PATCH v1 00/26] VM introspection, no-reply, 2020/04/14
Re: [RFC PATCH v1 00/26] VM introspection, no-reply, 2020/04/14