From patchwork Thu Jul 13 10:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Het Gala X-Patchwork-Id: 13311840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 340A5C3DA41 for ; Thu, 13 Jul 2023 10:59:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJu1C-0002XH-VB; Thu, 13 Jul 2023 06:57:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJu0t-0002TP-8D for qemu-devel@nongnu.org; Thu, 13 Jul 2023 06:57:39 -0400 Received: from mx0a-002c1b01.pphosted.com ([148.163.151.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJu0l-0003aC-6M for qemu-devel@nongnu.org; Thu, 13 Jul 2023 06:57:31 -0400 Received: from pps.filterd (m0127837.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36D4rtjm028091; Thu, 13 Jul 2023 03:57:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= from:to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=proofpoint20171006; bh=YxoUntoOPe6d7sniac+VvaJdJ+Q3pokB7gW9+FY+7SY=; b=O4HE6HBrhfIX jM1fIHT8El8i6EMR4S63m/z2IGCbZx1zvksZoB3IAFbsrGdyJbB/4nRBRvLFEDqq NeHhIWht877LIQMwaNlqGSF2du4lxk7AJZyMpaH//h0uEmZ1aPzS04E/i3byMGu1 Ykb8BKJF1jpN086CxelE79eDvBL2XndV/pSuzV2ZHzkIH1dwJF49d6MOMCIKL+bQ 7DMgJbx6o+cr4WQkT6X4y0GvfIQVLa+2/KkVzmhA2O3H6208IIDFCNESYWH5Ke85 1sdwnUjnJoH8hE+1TsrfwoOpd3BhbxdqX7on0PXn/0K+RRWkOtGcT1G+4DJh2yv+ jt345T8cag== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2174.outbound.protection.outlook.com [104.47.55.174]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3rsyb41s42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 03:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cCwhU+J6bylVp8IJ9ON3aSANn9HUe5NXXAERwornpvd9i9hQXwIeA7n4qClboxHWXhyBsWK1D5p8wdjwpVzo1Se5zj6ygDjk0qX4Fn2Ceo+otMsDBt4qfxRxr7YH9CxOMqphfaZPd8fMqi1YKNMQWzrBbA+IVv+Kysu19o/Uqmgfz2xoOgTPRyXbN44xlMBt+PmkJiXTNkcbkYcoLz5Jo2f2IXS8L4kB1ung5Yy8EGT5qHRUXz3j7l66efrwuAfGmFY2DzO6b+74p6JrzEQyP+TqSLPBxxqh8OL4IqTIzWSjfqRRIXAIBsHh2VUTMGbnoYOmXISCH2oSfVWAOtCKDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YxoUntoOPe6d7sniac+VvaJdJ+Q3pokB7gW9+FY+7SY=; b=N7Z4nfnpKw65JZbQViIcaos+Kh/7vrBe58uqekvr2A1+PFQsHlfJhKPo/BrthoSfvdXQisv5YAwRK5UD97vk6xgy8WSfBpISQ0OMvGecnL8YpU2t2ZrXB0YuWBLTQWz4Dr0k2JoMzufu36Xl04N2CTxgJMOPFRhX6hgyjVMANcf2D+gQ9L8K1wEkGMW4Lw41nJbqORfK2HPfUZpGsq6RKoKRESzp2EQ8WFHVs/Z1I6t6GviomgMCtUhRBWBnNEguIR7StIquTgyC3830NvlUe8KecWngNzO7p5OdmrSU9iAWsqhC37hj4m+t8R0HxKVUsia9djeR6nRPKObMzbsJeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YxoUntoOPe6d7sniac+VvaJdJ+Q3pokB7gW9+FY+7SY=; b=VRwnT+v6lU8JSSgP0bx+I+ywenG348FLc9Ka2r2x03l3w0gcAda6pOcQfXEwCLS+vsUPEIj8sas2cgzWlTL8Hw6wpVKGU7H2+XTDdiCa7/WBZtO+eD6hNTlQyQk7mmJ/KZwBvoizjQyxr5nvNbTdVAAcnJcqH7jicElhJtgUjs3Y9BIKLHVR9fr+b7wO0GKzjqXnnF+4mrbQInCrsPE3Cl4jpFGnST3qGj14VVaS0YBU9tDnQphT5npOWEn0dsInpvZUCIM4zbxOCu9ArYV2RvhzD11wX/pG/vUTASAUDEmZ/rlYTkC5KIWAxs0sGF/LsPA2oL1o/WwBHMYef/wLGw== Received: from BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) by CH0PR02MB7946.namprd02.prod.outlook.com (2603:10b6:610:103::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 10:57:19 +0000 Received: from BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::26a6:11ae:fb38:5920]) by BYAPR02MB4343.namprd02.prod.outlook.com ([fe80::26a6:11ae:fb38:5920%7]) with mapi id 15.20.6588.024; Thu, 13 Jul 2023 10:57:18 +0000 From: Het Gala To: qemu-devel@nongnu.org Cc: prerna.saxena@nutanix.com, quintela@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com, berrange@redhat.com, armbru@redhat.com, eblake@redhat.com, manish.mishra@nutanix.com, aravind.retnakaran@nutanix.com, Het Gala Subject: [PATCH v8 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration Date: Thu, 13 Jul 2023 10:57:04 +0000 Message-Id: <20230713105713.236883-1-het.gala@nutanix.com> X-Mailer: git-send-email 2.22.3 X-ClientProxiedBy: PH0P220CA0014.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::28) To BYAPR02MB4343.namprd02.prod.outlook.com (2603:10b6:a03:57::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR02MB4343:EE_|CH0PR02MB7946:EE_ X-MS-Office365-Filtering-Correlation-Id: 530a9867-a3e9-4795-300a-08db838fecf3 x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JF6+QMoO6lbpAjZU1V2Jeu4G3Dq2Rd71IKs6oGfHIV+NG/jLEdzT4L7+wm8jnaJPt8PEjU9rcUYAHNxfqqNZ/A6CPQLi7u1rG/iw7/qHlG42Gki3Jf0iOSN7eLKnB2YHxBKuBSvhiojwpfzIqmtUF4j0JaFwzOgqLg072ObSCN+L+1Lf7YclJxRSJeIwB2IqveaWdgou8izrztB1Ijnuqmh/CMN0GPgYbAtOzJ9PXMgB0S9fxjvpds2yTk/RB76qgfyZTxcQ9sGLboswiKBWbmWalh3HHoPaW4RPp2k9igKaDa3Jq5y21VlGQyzQThUkKMJPfwAqVnA+5aLzNPt6M46H52fhyxokEPkxXzPwxPV+v4ry9NxKqg2A8ekIElFcC//M0IxK0QCxQkiQ9jUguuKWVfNCVmkxjKZ+Ga3te0zetPu7ZR7j4FWAMJj4FINc8pDqGmZUZ6NGziqUXA8Ttul7yXY3KNgxkBatGmE2aXXRQNJ/p+PJ6KjIXOhw31wkmYdnEj/UWLKa0G9sKma8uS8pEjFOdyze+j9L1+fR8tw+IBPTFQzsUcOnPeq38Z0l14EuXJjNn+wD6fh8Kr/Yfj61KVZ5fwheA80fA4Xx1tE6Me4cSExWItkBt+D0V34MJ3Nw6smdIBuTuVg5Jb9Hng== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR02MB4343.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(376002)(39860400002)(396003)(136003)(366004)(451199021)(44832011)(5660300002)(8936002)(66556008)(8676002)(4326008)(41300700001)(316002)(66476007)(2906002)(6916009)(66946007)(6666004)(6486002)(6512007)(966005)(52116002)(1076003)(6506007)(26005)(186003)(107886003)(83380400001)(2616005)(36756003)(86362001)(38350700002)(38100700002)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ywPfHzFrr5c9hqiTJFShmIeoR+AL?= =?utf-8?q?Dd0OFYnTDx1stDu9ie8wTgP+aiR2a2rZUvbX7yMmS4SY023LBPs7AmwAL7R5/GquV?= =?utf-8?q?jPfGWzQlYJQh2V1k9qfuoL30iQh+IaDU8hqxKIpP4GTDgysf2GmL/ENbqhlwHR4cu?= =?utf-8?q?kUYKmS+9I7AzjLaFNurEI0a6VvA2fyRy3DERDj8MVW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n2azv66XGis3fe9ZCuCw5Ie0V8?= =?utf-8?q?AtX+6tA/zcb/w4IICHZdm+BYRdyF4bmDD7sijiNBcOL41RSUJQYHM15fEuNv1j003?= =?utf-8?q?CworFz7MXiZh1HIC1Zv3Y+mvzUxBtA4L+9nUfVDjC7kXt4HR7nWZcUeHiOUBERDPR?= =?utf-8?q?Bk0j/JYbmRTpsRkC78GLKdZzKzoiQUdWG5hliMOTDx++960/+AjM7dMYN51P17aWn?= =?utf-8?q?6G88DNIYZLCvUdge1A7HgWfxC8Dk1sEHYWuJcH5bAc3LwMJtGPnF1e2hPudZEk+fR?= =?utf-8?q?vQ9ygtI/oIYoMNV5AkETtFxrSyzsI9/dYkdi3LSzePPNYUJtMva/2dXCIUwtbsbqq?= =?utf-8?q?COAQjAGQqFQECIrXOx0cvpDp41amSBfZW1a2tseK2rSZ2uyoAX+Vhu7nv9fCRBUC/?= =?utf-8?q?j8JCP4U+FDf6sJD+OwVBzme2ss80TpF2LNMtmaIl34u7yZU4rysHU5+rHYa3NkgkT?= =?utf-8?q?PC5VePF3510C?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 530a9867-a3e9-4795-300a-08db838fecf3 X-MS-Exchange-CrossTenant-AuthSource: BYAPR02MB4343.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 10:57:18.3692 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AU2C7RbXcog7SldxCbAKQO8GACnJNJRnrRr6mxE1ZtimoxrYqfBNHoxw1Xj/2XDA2GRitdtUdjP+fuLpC+x0vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR02MB7946 X-Proofpoint-ORIG-GUID: fxAwU6olPC0utdvGkAJ6ipsWc9hecZuQ X-Proofpoint-GUID: fxAwU6olPC0utdvGkAJ6ipsWc9hecZuQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-13_04,2023-07-11_01,2023-05-22_02 X-Proofpoint-Spam-Reason: safe Received-SPF: pass client-ip=148.163.151.68; envelope-from=het.gala@nutanix.com; helo=mx0a-002c1b01.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This is v8 patchset of modified 'migrate' and 'migrate-incoming' QAPI design for upstream review. Would like to thank all the maintainers that actively participated in the v7 patchset discussion and gave insightful suggestions to improve the patches. Link to previous upstream community patchset links: v1: https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg04339.html v2: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02106.html v3: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg02473.html v4: https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg03064.html v5: https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg04845.html v6: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg01251.html v7: https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg02027.html v7 -> v8 changelog: ------------------- - Formatting, improvemnt around migration qapi documentation and commit message descriptions Abstract: --------- Current QAPI 'migrate' command design (for initiating a migration stream) contains information regarding different migrate transport mechanism (tcp / unix / exec), dest-host IP address, and binding port number in form of a string. Thus the design does seem to have some design issues. Some of the issues, stated below are: 1. Use of string URIs is a data encoding scheme within a data encoding scheme. QEMU code should directly be able to work with the results from QAPI, without resorting to do a second level of parsing (eg. socket_parse()). 2. For features / parameters related to migration, the migration tunables needs to be defined and updated upfront. For example, 'migrate-set-capability' and 'migrate-set-parameter' is required to enable multifd capability and multifd-number of channels respectively. Instead, 'Multifd-channels' can directly be represented as a single additional parameter to 'migrate' QAPI. 'migrate-set-capability' and 'migrate-set-parameter' commands could be used for runtime tunables that need setting after migration has already started. The current patchset focuses on solving the first problem of multi-level encoding of URIs. The patch defines 'migrate' command as a QAPI discriminated union for the various transport backends (like socket, exec and rdma), and on basis of transport backends, different migration parameters are defined. (uri) string --> (channel) Channel-type Transport-type Migration parameters based on transport type ------------------------------------------------------------------------------ Het Gala (9): migration: New QAPI type 'MigrateAddress' migration: convert migration 'uri' into 'MigrateAddress' migration: convert socket backend to accept MigrateAddress migration: convert rdma backend to accept MigrateAddress migration: convert exec backend to accept MigrateAddress. migration: New migrate and migrate-incoming argument 'channels' migration: modify migration_channels_and_uri_compatible() for new QAPI syntax migration: Implement MigrateChannelList to migration flow. migration: Add test case for modified QAPI syntax migration/exec.c | 72 +++++++++---- migration/exec.h | 8 +- migration/migration-hmp-cmds.c | 16 ++- migration/migration.c | 182 ++++++++++++++++++++++++++------- migration/rdma.c | 34 +++--- migration/rdma.h | 6 +- migration/socket.c | 39 ++----- migration/socket.h | 7 +- qapi/migration.json | 150 ++++++++++++++++++++++++++- softmmu/vl.c | 2 +- tests/qtest/migration-test.c | 45 ++++++++ 11 files changed, 435 insertions(+), 126 deletions(-)