The vsock channel is more widely use in some new features, for example,
the Nitro/Enclave. It can also be used as the migration channel.
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
---
migration/migration.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 3160b95..fcf7974 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -383,7 +383,8 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
if (!strcmp(uri, "defer")) {
deferred_incoming_migration(errp);
} else if (strstart(uri, "tcp:", &p) ||
- strstart(uri, "unix:", NULL)) {
+ strstart(uri, "unix:", NULL) ||
+ strstart(uri, "vsock:", NULL)) {
socket_start_incoming_migration(p ? p : uri, errp);
#ifdef CONFIG_RDMA
} else if (strstart(uri, "rdma:", &p)) {
@@ -2072,7 +2073,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
}
if (strstart(uri, "tcp:", &p) ||
- strstart(uri, "unix:", NULL)) {
+ strstart(uri, "unix:", NULL) ||
+ strstart(uri, "vsock:", NULL)) {
socket_start_outgoing_migration(s, p ? p : uri, &local_err);
#ifdef CONFIG_RDMA
} else if (strstart(uri, "rdma:", &p)) {
--
1.8.3.1
* Longpeng(Mike) (longpeng2@huawei.com) wrote:
> The vsock channel is more widely use in some new features, for example,
> the Nitro/Enclave. It can also be used as the migration channel.
>
> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
OK; it might be worth adding some tests for this.
Can I ask what your use case is - is this migrating an L2 inside an L1
or what?
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/migration.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 3160b95..fcf7974 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -383,7 +383,8 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
> if (!strcmp(uri, "defer")) {
> deferred_incoming_migration(errp);
> } else if (strstart(uri, "tcp:", &p) ||
> - strstart(uri, "unix:", NULL)) {
> + strstart(uri, "unix:", NULL) ||
> + strstart(uri, "vsock:", NULL)) {
> socket_start_incoming_migration(p ? p : uri, errp);
> #ifdef CONFIG_RDMA
> } else if (strstart(uri, "rdma:", &p)) {
> @@ -2072,7 +2073,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> }
>
> if (strstart(uri, "tcp:", &p) ||
> - strstart(uri, "unix:", NULL)) {
> + strstart(uri, "unix:", NULL) ||
> + strstart(uri, "vsock:", NULL)) {
> socket_start_outgoing_migration(s, p ? p : uri, &local_err);
> #ifdef CONFIG_RDMA
> } else if (strstart(uri, "rdma:", &p)) {
> --
> 1.8.3.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
在 2020/8/12 17:52, Dr. David Alan Gilbert 写道:
> * Longpeng(Mike) (longpeng2@huawei.com) wrote:
>> The vsock channel is more widely use in some new features, for example,
>> the Nitro/Enclave. It can also be used as the migration channel.
>>
>> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
>
> OK; it might be worth adding some tests for this.
>
OK, I'll try when I'm free.
> Can I ask what your use case is - is this migrating an L2 inside an L1
> or what?
>
Yes, L2 migrationg is a potential use case for this. However, our use
case is still focusing on the L1 migration.
There is no network stack in our platform ( [1] ), so we use the vsock
channel to communicate between the QEMU (on x86/ARM) and an Agent (on a
PCIe card), the source Agent will transport the data to the destination.
Links:
[1]
https://kvmforum2019.sched.com/event/Tmzh/zero-next-generation-virtualization-platform-for-huawei-cloud-jinsong-liu-zhichao-huang-huawei
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
Thanks.
>> ---
>> migration/migration.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/migration/migration.c b/migration/migration.c
>> index 3160b95..fcf7974 100644
>> --- a/migration/migration.c
>> +++ b/migration/migration.c
>> @@ -383,7 +383,8 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
>> if (!strcmp(uri, "defer")) {
>> deferred_incoming_migration(errp);
>> } else if (strstart(uri, "tcp:", &p) ||
>> - strstart(uri, "unix:", NULL)) {
>> + strstart(uri, "unix:", NULL) ||
>> + strstart(uri, "vsock:", NULL)) {
>> socket_start_incoming_migration(p ? p : uri, errp);
>> #ifdef CONFIG_RDMA
>> } else if (strstart(uri, "rdma:", &p)) {
>> @@ -2072,7 +2073,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>> }
>>
>> if (strstart(uri, "tcp:", &p) ||
>> - strstart(uri, "unix:", NULL)) {
>> + strstart(uri, "unix:", NULL) ||
>> + strstart(uri, "vsock:", NULL)) {
>> socket_start_outgoing_migration(s, p ? p : uri, &local_err);
>> #ifdef CONFIG_RDMA
>> } else if (strstart(uri, "rdma:", &p)) {
>> --
>> 1.8.3.1
>>
© 2016 - 2025 Red Hat, Inc.